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/name
endpoint and parse the JSON response so you can automate tenant setup, permission checks, and any downstream API calls that require your organizationId
.
Example use case to retrieve an organization ID
Use this endpoint to retrieve your organization’s UUID (organizationId
) using its domain name.
Request
curl -G -L 'https://api.cloudbees.io/v1/organizations/name' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <personal_access_token>' \ --data 'name=<domain_name>'
Response
{ "organization": { "organizationId": "<organization_id>", "displayName": "your organization", "domainName": "<domain_name>" } }