Passer au contenu principal
POST
https://{tenantDomain}/api/v2
/
organizations
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Organizations.CreateAsync(
            new CreateOrganizationRequestContent {
                Name = "name"
            }
        );
    }

}
{
  "id": "<string>",
  "name": "organization-1",
  "display_name": "Acme Users",
  "branding": {
    "logo_url": "<string>",
    "colors": {
      "primary": "<string>",
      "page_background": "<string>"
    }
  },
  "metadata": {},
  "token_quota": {
    "client_credentials": {
      "enforce": true,
      "per_day": 1073741824,
      "per_hour": 1073741824
    }
  },
  "enabled_connections": [
    {
      "connection_id": "<string>",
      "assign_membership_on_login": true,
      "show_as_button": true,
      "is_signup_enabled": true,
      "connection": {
        "name": "<string>",
        "strategy": "<string>"
      }
    }
  ]
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

name
string<organization-name>
défaut:organization-1
requis

The name of this organization.

Required string length: 1 - 50
display_name
string
défaut:Acme Users

Friendly name of this organization.

Required string length: 1 - 255
branding
object

Theme defines how to style the login pages.

metadata
object

Metadata associated with the organization, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed.

enabled_connections
object[]

Connections that will be enabled for this organization. See POST enabled_connections endpoint for the object format. (Max of 10 connections allowed)

token_quota
object
EA
third_party_client_access
enum<string>
GA

Controls whether this organization can be used in user flows with third-party clients. Defaults to block.

Options disponibles:
block,
allow

Réponse

Organization successfully created.

id
string<organization-id>

Organization identifier.

Maximum string length: 50
name
string<organization-name>
défaut:organization-1

The name of this organization.

Required string length: 1 - 50
display_name
string
défaut:Acme Users

Friendly name of this organization.

Required string length: 1 - 255
branding
object

Theme defines how to style the login pages.

metadata
object

Metadata associated with the organization, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed.

token_quota
object
EA
third_party_client_access
enum<string>
GA

Controls whether this organization can be used in user flows with third-party clients. Defaults to block.

Options disponibles:
block,
allow
enabled_connections
object[]