Saltar al contenido principal
POST
https://{tenantDomain}/api/v2
/
organizations
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &management.CreateOrganizationRequestContent{
        Name: "name",
    }
    client.Organizations.Create(
        context.TODO(),
        request,
    )
}
{
  "branding": {
    "colors": {
      "page_background": "<string>",
      "primary": "<string>"
    },
    "logo_url": "<string>"
  },
  "display_name": "Acme Users",
  "enabled_connections": [
    {
      "assign_membership_on_login": true,
      "connection": {
        "name": "<string>",
        "strategy": "<string>"
      },
      "connection_id": "<string>",
      "is_signup_enabled": true,
      "show_as_button": true
    }
  ],
  "id": "<string>",
  "metadata": {},
  "name": "organization-1",
  "token_quota": {
    "client_credentials": {
      "enforce": true,
      "per_day": 1073741824,
      "per_hour": 1073741824
    }
  }
}

Autorizaciones

Authorization
string
header
requerido

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

Cuerpo

name
string<organization-name>
predeterminado:organization-1
requerido

El nombre de esta organización.

Required string length: 1 - 50
branding
object

Theme define cómo aplicar estilo a las páginas de Login.

display_name
string
predeterminado:Acme Users

Nombre descriptivo de esta organización.

Required string length: 1 - 255
enabled_connections
object[]

Conexiones que se habilitarán para esta organización. Consulte el endpoint POST enabled_connections para conocer el formato del objeto. (Se permite un máximo de 10 conexiones)

metadata
object

Metadatos asociados a la organización, en forma de objeto con valores de cadena (máx. 255 caracteres). Se permite un máximo de 25 propiedades de metadatos.

token_quota
object
EA

Respuesta

Organización creada correctamente.

branding
object

Theme define cómo aplicar estilo a las páginas de Login.

display_name
string
predeterminado:Acme Users

Nombre descriptivo de esta organización.

Required string length: 1 - 255
enabled_connections
object[]
id
string<organization-id>

Identificador de la organización.

Maximum string length: 50
metadata
object

Metadatos asociados a la organización, en forma de objeto con valores de cadena (máx. 255 caracteres). Se permite un máximo de 25 propiedades de metadatos.

name
string<organization-name>
predeterminado:organization-1

El nombre de esta organización.

Required string length: 1 - 50
token_quota
object
EA