When you need to obtain your organization’s UUID from its domain name, use the Organization API example below. It shows how to call the /v1/organizations endpoint and parse the JSON response so you can automate tenant setup, permission checks, and any downstream API calls that require your organizationId.
All requests require a personal access token in the Authorization: Bearer header.
To generate one, refer to Manage personal access tokens.
|
Retrieve an organization ID
Use this endpoint to retrieve your organization’s UUID (organizationId) using its domain name. This endpoint supports partial name matching and returns a list of matching organizations.
Request
curl -G -L 'https://api.cloudbees.io/v1/organizations/name?name=<domain_name>' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <personal_access_token>'
Response
{ "organizations": [ { "id": "<organization_id>", "displayName": "your organization", "domainName": "<domain_name>" } ] }