A newer version is available. For the latest information, see the
current release documentation.
Create organization invitations
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Create organization invitations
editCreates or refreshes organization invitations. Currently unavailable in self-hosted ECE.
Request
editPOST /api/v1/organizations/{organization_id}/invitations
Path parameters
edit| Name | Type | Required | Description |
|---|---|---|---|
|
|
Y |
Identifier for the Organization |
Request body
edit(OrganizationInvitationRequest) (required) The organization invitations to create or refresh
Responses
edit-
201 -
Organization invitations created successfully
-
400 -
-
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
-
Invitation email was not valid. (code:
-
403 -
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 -
-
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
-
Organization not found. (code:
-
429 -
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
editcurl -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"
}
'