Passer au contenu principal
POST
/
member-invitations
Create member invitations
curl --request POST \
  --url https://{tenantDomain}/my-org/v1/member-invitations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "invitees": [
    {
      "email": "user@example.com",
      "roles": [
        "rol_0000000000000001"
      ]
    }
  ],
  "inviter": {
    "name": "Allison the Admin"
  },
  "identity_provider_id": "con_2CZPv6IY0gWzDaQJ",
  "ttl_sec": 3600
}
'
[
  {
    "id": "uinv_12345678abcdefgh",
    "organization_id": "org_12345678abcdefgh",
    "inviter": {
      "name": "Allison the Admin"
    },
    "invitee": {
      "email": "user@example.com"
    },
    "identity_provider_id": "con_2CZPv6IY0gWzDaQJ",
    "created_at": "2025-04-11T20:11:45.431Z",
    "expires_at": "2025-04-11T20:11:45.431Z",
    "roles": [
      "rol_BKW1BKIfBKd0BaI0"
    ],
    "invitation_url": "https://example.auth0.com/login?invitation=uinv_12345678abcdefgh&organization=org_12345678abcdefgh",
    "ticket_id": "1asdfasd23usjdef"
  }
]

Autorisations

Authorization
string
header
requis

The access token received from the authorization server in the OAuth 2.0 flow.

En-têtes

auth0-custom-domain
string

Corps

application/json
invitees
object[]
requis
Required array length: 1 - 10 elements
inviter
object
identity_provider_id
string

Identity provider identifier.

Pattern: ^con_[A-Za-z0-9]{16}$
ttl_sec
integer
défaut:604800

Number of seconds for which the invitation is valid before expiration. If unspecified or set to 0, this value defaults to 604800 seconds (7 days). Max value: 2592000 seconds (30 days).

Plage requise: 0 <= x <= 2592000

Réponse

Create Member Invitations for an Organization.

id
string
read-only

The id of the member invitation

Pattern: ^uinv_[A-Za-z0-9]{16}$
organization_id
string
read-only

Organization identifier.

Pattern: ^org_[A-Za-z0-9]{16}$
inviter
object
invitee
object
identity_provider_id
string
read-only

Identity provider identifier.

Pattern: ^con_[A-Za-z0-9]{16}$
created_at
string<date-time>

The ISO 8601 formatted timestamp representing the creation time of the invitation.

expires_at
string<date-time>

The ISO 8601 formatted timestamp representing the expiration time of the invitation.

roles
string[]
read-only

The ID of a role that can be assigned to a member of an organization.

Pattern: ^rol_[A-Za-z0-9]{16}$
invitation_url
string<uri>

The invitation url to be sent to the invitee.

ticket_id
string

The ID of the invitation ticket.