Create organization invitations
Creates or refreshes organization invitations. Currently unavailable in self-hosted ECE.
Path parameters
-
organization_id
string Required Identifier for the Organization
Body
Required
The organization invitations to create or refresh
-
emails
array[string] Required 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.
-
role_assignments
object The roles that will be assigned to users once they accept the invitation. Currently unavailable in self-hosted ECE.
Responses
-
201 application/json
Organization invitations created successfully
-
400 application/json
- 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:
-
403 application/json
The current user authentication is not valid. (code:
root.invalid_authentication
) -
404 application/json
- 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:
-
429 application/json
Request exceeds organization invitation creation rate limits. (code:
organization.invitations_rate_limit_exceeded
)
POST
/organizations/{organization_id}/invitations
curl \
--request POST 'https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations' \
--header "Content-Type: application/json" \
--data '{"emails":["string"],"expires_in":"string","role_assignments":{"platform":[{"role_id":"string"}],"organization":[{"role_id":"string","organization_id":"string"}],"deployment":[{"role_id":"string","organization_id":"string","all":true,"deployment_ids":["string"],"application_roles":["string"]}],"project":{"elasticsearch":[{"role_id":"string","organization_id":"string","all":true,"project_ids":["string"],"application_roles":["string"]}],"observability":[{"role_id":"string","organization_id":"string","all":true,"project_ids":["string"],"application_roles":["string"]}],"security":[{"role_id":"string","organization_id":"string","all":true,"project_ids":["string"],"application_roles":["string"]}]}}}'