Create organization invitations

edit

Creates or refreshes organization invitations. Currently unavailable in self-hosted ECE.

Request

edit

POST /api/v1/organizations/{organization_id}/invitations

Path parameters

edit
Name Type Required Description

organization_id

string

Y

Identifier for the Organization

Request body

edit

(OrganizationInvitationRequest) (required) The organization invitations to create or refresh

Responses

edit
201

(OrganizationInvitations)

Organization invitations created successfully

400

(BasicFailedReply)

  • 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)

Headers

x-cloud-error-codes (string; allowed values: [organization.invitation_invalid_email, organization.invitation_already_exists, organization.user_organization_already_belongs])
The error codes associated with the response
403

(BasicFailedReply)

The current user authentication is not valid. (code: root.invalid_authentication)

Headers

x-cloud-error-codes (string; allowed values: [root.invalid_authentication])
The error codes associated with the response
404

(BasicFailedReply)

  • 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)

Headers

x-cloud-error-codes (string; allowed values: [organization.not_found, user.not_found, organization.user_organization_does_not_belong])
The error codes associated with the response
429

(BasicFailedReply)

Request exceeds organization invitation creation rate limits. (code: organization.invitations_rate_limit_exceeded)

Headers

x-cloud-error-codes (string; allowed values: [organization.invitations_rate_limit_exceeded])
The error codes associated with the response

Request example

edit
curl -XPOST https://{{hostname}}/api/v1/organizations/{organization_id}/invitations \
-H "Authorization: ApiKey $ECE_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "emails" : [
      "string"
   ],
   "expires_in" : "string"
}
'