Create organization invitations
Creates or refreshes organization invitations. Currently unavailable in self-hosted ECE.
Path parameters
-
Identifier for the Organization
Body Required
The organization invitations to create or refresh
-
The email addresses to invite to the organization
-
expires_in string
The date and time when the invitation expires. Defaults to three days from now.
Responses
-
Organization invitations created successfully
-
- Invitation email was not valid. (code:
organization.invitation_invalid_email
) - Invitation already sent. (code:
organization.invitation_already_exists
) - User already belongs to organization. (code:
organization.user_organization_already_belongs
)
- Invitation email was not valid. (code:
-
The current user authentication is not valid. (code:
root.invalid_authentication
) -
- Organization not found. (code:
organization.not_found
) - User not found. (code:
user.not_found
) - Invitation sender does not belong to organization. (code:
organization.user_organization_does_not_belong
)
- Organization not found. (code:
-
Request exceeds organization invitation creation rate limits. (code:
organization.invitations_rate_limit_exceeded
)
POST /organizations/{organization_id}/invitations
curl \
-X POST https://{{hostname}}/api/v1/organizations/{organization_id}/invitations \
-d '{"emails":["string"],"expires_in":"string"}'
Request examples
{
"emails": [
"string"
],
"expires_in": "string"
}
Response examples (201)
{
"invitations": [
{
"token": "string",
"email": "string",
"created_at": "2024-05-04T09:42:00+00:00",
"expires_at": "2024-05-04T09:42:00+00:00",
"expired": true,
"accepted_at": "2024-05-04T09:42:00+00:00",
"organization": {
"id": "string",
"name": "string",
"default_disk_usage_alerts_enabled": true,
"notifications_allowed_email_domains": [
"string"
],
"billing_contacts": [
"string"
],
"operational_contacts": [
"string"
]
}
}
]
}
Response examples (400)
# Headers
x-cloud-error-codes: organization.invitation_invalid_email
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (403)
# Headers
x-cloud-error-codes: root.invalid_authentication
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (404)
# Headers
x-cloud-error-codes: organization.not_found
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (429)
# Headers
x-cloud-error-codes: organization.invitations_rate_limit_exceeded
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}