Organizationsedit

List organizationsedit

Fetch organizations available to the current user. Currently unavailable in self-hosted ECE.

Requestedit

GET /api/v1/organizations

Responsesedit

200

(OrganizationList)

Organizations fetched successfully

401

(BasicFailedReply)

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 exampleedit

curl -XGET https://api.elastic-cloud.com/api/v1/organizations \
-H "Authorization: ApiKey $EC_API_KEY"

Get organization invitationedit

Gets a single invitation to an organization by token. Currently unavailable in self-hosted ECE.

Requestedit

GET /api/v1/organizations/invitations/{invitation_token}

Path parametersedit

Name Type Required Description

invitation_token

string

Y

Organization invitation token

Responsesedit

200

(OrganizationInvitation)

Organization invitation fetched successfully

404

(BasicFailedReply)

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 exampleedit

curl -XGET https://api.elastic-cloud.com/api/v1/organizations/invitations/{invitation_token} \
-H "Authorization: ApiKey $EC_API_KEY"

Accept an organization invitationedit

Accepts an organization invitation. Currently unavailable in self-hosted ECE.

Requestedit

POST /api/v1/organizations/invitations/{invitation_token}/_accept

Path parametersedit

Name Type Required Description

invitation_token

string

Y

Organization invitation token

Responsesedit

200

(EmptyResponse)

Organization invitation accepted successfully

400

(BasicFailedReply)

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

(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 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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/organizations/invitations/{invitation_token}/_accept \
-H "Authorization: ApiKey $EC_API_KEY"

Fetch organization informationedit

Fetch a single organization by id. Currently unavailable in self-hosted ECE.

Requestedit

GET /api/v1/organizations/{organization_id}

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the Organization

Responsesedit

200

(Organization)

Organization fetched successfully

401

(BasicFailedReply)

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

(BasicFailedReply)

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

(BasicFailedReply)

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 exampleedit

curl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id} \
-H "Authorization: ApiKey $EC_API_KEY"

Update organizationedit

This endpoint is deprecated and scheduled to be removed in the next major version.

Updates an existing organization. Currently unavailable in self-hosted ECE.

Requestedit

PUT /api/v1/organizations/{organization_id}

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the Organization

Request bodyedit

(OrganizationRequest) (required) The organization to update

Responsesedit

200

(Organization)

Organization updated successfully

400

(BasicFailedReply)

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

(BasicFailedReply)

You are not authorized to perform this action

403

(BasicFailedReply)

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

(BasicFailedReply)

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 exampleedit

curl -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 invitationsedit

Fetch open invitations to the selected organization. Currently unavailable in self-hosted ECE.

Requestedit

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

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the Organization

Responsesedit

200

(OrganizationInvitations)

Organization invitations fetched successfully

404

(BasicFailedReply)

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 exampleedit

curl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations \
-H "Authorization: ApiKey $EC_API_KEY"

Create organization invitationsedit

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

Requestedit

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

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the Organization

Request bodyedit

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

Responsesedit

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 exampleedit

curl -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"
}
'

Delete organization invitationsedit

Deletes one or more organization invitations. Currently unavailable in self-hosted ECE.

Requestedit

DELETE /api/v1/organizations/{organization_id}/invitations/{invitation_tokens}

Path parametersedit

Name Type Required Description

invitation_tokens

string

Y

CSV list of Invitation tokens

organization_id

string

Y

Identifier for the Organization

Responsesedit

200

(EmptyResponse)

Organization invitations deleted successfully

400

(BasicFailedReply)

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

(BasicFailedReply)

  • 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

Request exampleedit

curl -XDELETE https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations/{invitation_tokens} \
-H "Authorization: ApiKey $EC_API_KEY"

List organization membersedit

Fetch users belonging to the selected organization. Currently unavailable in self-hosted ECE.

Requestedit

GET /api/v1/organizations/{organization_id}/members

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the Organization

Responsesedit

200

(OrganizationMemberships)

Organization members fetched successfully

404

(BasicFailedReply)

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 exampleedit

curl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/members \
-H "Authorization: ApiKey $EC_API_KEY"

Delete organization membershipsedit

Deletes one or more organization memberships. Currently unavailable in self-hosted ECE.

Requestedit

DELETE /api/v1/organizations/{organization_id}/members/{user_ids}

Path parametersedit

Name Type Required Description

organization_id

string

Y

Identifier for the Organization

user_ids

string

Y

CSV list of User identifiers

Query parametersedit

Name Type Required Description

force

boolean; default: false

N

Whether or not to force the removal of Org memberships (effective only for Platform Admins)

Responsesedit

200

(EmptyResponse)

Organization membership deleted successfully

404

(BasicFailedReply)

  • 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

Request exampleedit

curl -XDELETE https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/members/{user_ids} \
-H "Authorization: ApiKey $EC_API_KEY"