Retrieving the ID of a Coveo Cloud V2 Organization

Most Coveo Cloud 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 Cloud organization as an argument.

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

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

mycoveocloudorganizationg8tp8wu3.

Coveo Cloud administrators can change the display name of a Coveo Cloud organization whenever they want. However, the ID value of a Coveo Cloud organization is permanent. This implies that the ID of a Coveo Cloud 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 Cloud organization.

You can also get this information from the Coveo Cloud administration console (see Manage Coveo Cloud Organization Settings).

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 where each element contains information about a Coveo Cloud organization your access token allows you to view. The id property of each element is the unique and permanent ID of the corresponding Coveo Cloud organization.

If you authenticate this call using a Coveo Cloud platform OAuth2 token whose corresponding identity has the privilege to view more than one Coveo Cloud organization (i.e., 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 Cloud organization this API key was created in.

Sample Request

Request - Getting information about the Coveo Cloud 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 Cloud Organization",
    "emailNotificationsEnabled": false,
    "id": "mycoveocloudorganizationg8tp8wu3",
    "owner": {
      "email": "asmith@example.com"
    },
    "readOnly": false
  }
]