Organizations
editOrganizations
editList organizations
editFetch organizations available to the current user. Currently unavailable in self-hosted ECE.
Request
editGET /api/v1/organizations
Responses
edit-
200
-
Organizations fetched successfully
-
401
-
User not found. (code:
user.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [user.not_found
]) - The error codes associated with the response
-
Request example
editcurl -XGET https://api.elastic-cloud.com/api/v1/organizations \ -H "Authorization: ApiKey $EC_API_KEY"
Get organization invitation
editGets a single invitation to an organization by token. Currently unavailable in self-hosted ECE.
Request
editGET /api/v1/organizations/invitations/{invitation_token}
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Organization invitation token |
Responses
edit-
200
-
Organization invitation fetched successfully
-
404
-
Invitation not found. (code:
organization.invitation_not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invitation_not_found
]) - The error codes associated with the response
-
Request example
editcurl -XGET https://api.elastic-cloud.com/api/v1/organizations/invitations/{invitation_token} \ -H "Authorization: ApiKey $EC_API_KEY"
Accept an organization invitation
editAccepts an organization invitation. Currently unavailable in self-hosted ECE.
Request
editPOST /api/v1/organizations/invitations/{invitation_token}/_accept
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Organization invitation token |
Responses
edit-
200
-
Organization invitation accepted successfully
-
400
-
User already belongs to organization. (code:
organization.user_organization_already_belongs
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.user_organization_already_belongs
]) - The error codes associated with the response
-
-
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 not found. (code:
organization.invitation_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
,user.not_found
,organization.invitation_not_found
]) - The error codes associated with the response
-
Organization not found. (code:
Request example
editcurl -XPOST https://api.elastic-cloud.com/api/v1/organizations/invitations/{invitation_token}/_accept \ -H "Authorization: ApiKey $EC_API_KEY"
Fetch organization information
editFetch a single organization by id. Currently unavailable in self-hosted ECE.
Request
editGET /api/v1/organizations/{organization_id}
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Responses
edit-
200
-
Organization fetched successfully
-
401
-
User not found. (code:
user.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [user.not_found
]) - The error codes associated with the response
-
-
403
-
The current user does not have access to the requested organization. (code:
organization.invalid_access
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invalid_access
]) - The error codes associated with the response
-
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request example
editcurl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id} \ -H "Authorization: ApiKey $EC_API_KEY"
Update organization
editThis endpoint is deprecated and scheduled to be removed in the next major version.
Updates an existing organization. Currently unavailable in self-hosted ECE.
Request
editPUT /api/v1/organizations/{organization_id}
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Request body
edit(OrganizationRequest
) (required) The organization to update
Responses
edit-
200
-
Organization updated successfully
-
400
-
-
Name must be between 2 and 30 characters. (code:
organization.invalid_name
) -
User already has an organization. (code:
organization.user_organization_already_exists
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invalid_name
,organization.user_organization_already_exists
]) - The error codes associated with the response
-
Name must be between 2 and 30 characters. (code:
-
401
-
You are not authorized to perform this action
-
403
-
The current user does not have access to the requested organization. (code:
organization.invalid_access
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invalid_access
]) - The error codes associated with the response
-
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request example
editcurl -XPUT https://api.elastic-cloud.com/api/v1/organizations/{organization_id} \ -H "Authorization: ApiKey $EC_API_KEY" \ -H 'Content-Type: application/json' \ -d ' { "billing_contacts" : [ "string" ], "default_disk_usage_alerts_enabled" : true, "name" : "string", "notifications_allowed_email_domains" : [ "string" ], "operational_contacts" : [ "string" ] } '
List organization invitations
editFetch open invitations to the selected organization. Currently unavailable in self-hosted ECE.
Request
editGET /api/v1/organizations/{organization_id}/invitations
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Responses
edit-
200
-
Organization invitations fetched successfully
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request example
editcurl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations \ -H "Authorization: ApiKey $EC_API_KEY"
Create organization invitations
editCreates or refreshes organization invitations. Currently unavailable in self-hosted ECE.
Request
editPOST /api/v1/organizations/{organization_id}/invitations
Path parameters
editName | 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://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations \ -H "Authorization: ApiKey $EC_API_KEY" \ -H 'Content-Type: application/json' \ -d ' { "emails" : [ "string" ], "expires_in" : "string", "role_assignments" : { "deployment" : [ { "all" : true, "application_roles" : [ "string" ], "deployment_ids" : [ "string" ], "organization_id" : "string", "role_id" : "string" } ], "organization" : [ { "organization_id" : "string", "role_id" : "string" } ], "platform" : [ { "role_id" : "string" } ], "project" : { "elasticsearch" : [ { "all" : true, "application_roles" : [ "string" ], "organization_id" : "string", "project_ids" : [ "string" ], "role_id" : "string" } ], "observability" : [ { "all" : true, "application_roles" : [ "string" ], "organization_id" : "string", "project_ids" : [ "string" ], "role_id" : "string" } ], "security" : [ { "all" : true, "application_roles" : [ "string" ], "organization_id" : "string", "project_ids" : [ "string" ], "role_id" : "string" } ] } } } '
Delete organization invitations
editDeletes one or more organization invitations. Currently unavailable in self-hosted ECE.
Request
editDELETE /api/v1/organizations/{organization_id}/invitations/{invitation_tokens}
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
CSV list of Invitation tokens |
|
|
Y |
Identifier for the Organization |
Responses
edit-
200
-
Organization invitations deleted successfully
-
400
-
No valid invitation token was supplied. (code:
root.invalid_data
)Headers
-
x-cloud-error-codes
(string
; allowed values: [root.invalid_data
]) - The error codes associated with the response
-
-
404
-
-
Organization not found. (code:
organization.not_found
) -
Invitation not found. (code:
organization.invitation_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
,organization.invitation_not_found
]) - The error codes associated with the response
-
Organization not found. (code:
Request example
editcurl -XDELETE https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations/{invitation_tokens} \ -H "Authorization: ApiKey $EC_API_KEY"
List organization members
editFetch users belonging to the selected organization. Currently unavailable in self-hosted ECE.
Request
editGET /api/v1/organizations/{organization_id}/members
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Responses
edit-
200
-
Organization members fetched successfully
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request example
editcurl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/members \ -H "Authorization: ApiKey $EC_API_KEY"
Delete organization memberships
editDeletes one or more organization memberships. Currently unavailable in self-hosted ECE.
Request
editDELETE /api/v1/organizations/{organization_id}/members/{user_ids}
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
|
|
Y |
CSV list of User identifiers |
Query parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
N |
Whether or not to force the removal of Org memberships (effective only for Platform Admins) |
Responses
edit-
200
-
Organization membership deleted successfully
-
404
-
-
User not found. (code:
user.not_found
) -
Organization not found. (code:
organization.not_found
) -
Organization membership not found. (code:
organization.membership_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [user.not_found
,organization.not_found
,organization.membership_not_found
]) - The error codes associated with the response
-
User not found. (code:
Request example
editcurl -XDELETE https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/members/{user_ids} \ -H "Authorization: ApiKey $EC_API_KEY"