Retrieve the organization ID

This is for:

System Administrator
In this article

Most Coveo Platform REST API operations require that you specify a value for the organizationId parameter. As its name implies, this parameter expects the unique and permanent ID of an existing Coveo organization as an argument.

Whenever a new Coveo organization is created, its ID is automatically generated from its lowercase original name value, stripped of any special characters and white spaces. A random alphanumeric sequence is also typically appended to the resulting string.

For example, if your Coveo organization was originally created with My Coveo Organization as a display name, and the random alphanumeric sequence that was generated for this organization is 8tp8wu3, then its resulting ID is: mycoveoorganization8tp8wu3.

Note

Coveo administrators can change the display name of a Coveo organization whenever they want. However, the ID value of a Coveo organization is permanent. This implies that the ID of a Coveo organization can significantly differ from its current display name.

Use the Get all organizations operation to find the unique and permanent ID of a Coveo organization. You can also find it in the Coveo Administration Console.

Note

You can also get this information from the Settings page of the Coveo Administration Console, under Organization > Details (platform-ca | platform-eu | platform-au).

Request template

GET https://platform.cloud.coveo.com/rest/organizations HTTP/1.1

Accept: application/json
Authorization: Bearer <MyAccessToken>

In the Authorization HTTP header:

The body of a successful response (200 OK) is an array in which each element contains information about a Coveo organization your access token allows you to view. The id property of each element is the unique and permanent ID of the corresponding Coveo organization.

Note

If you authenticate this call using a Coveo OAuth2 token whose corresponding identity has the privilege to view more than one Coveo organization (that is, the View access level on the Organization domain), the body of a successful response contains information about each of those organizations.

Otherwise, if you authenticate this call using a valid API key, the body of a successful response only contains information about the Coveo organization this API key was created in.

Sample request

Request - Getting information about the Coveo organizations an access token is allowed to see

GET https://platform.cloud.coveo.com/rest/organizations HTTP/1.1

Accept: application/json
Authorization: Bearer **********-****-****-****-************

Successful response - 200 OK

[
  {
    "createdDate": 1460705726000,
    "displayName": "My Coveo Organization",
    "emailNotificationsEnabled": false,
    "id": "mycoveoorganizationg8tp8wu3",
    "owner": {
      "email": "asmith@example.com"
    },
    "readOnly": false
  }
]