Skip to content
campaiDeveloper
campai.com

Connect · Teams

GET/connect/organizations/{organizationId}/team-access-optionsReads only

List team access options

Lists the roles, departments and segments available for team access settings in an organization. Provide the organization ID in the path. The response contains roles, departments and segments arrays.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have access to the organization.
  • The caller needs the team.read permission.

Request

Path parameters

  • organizationIdidrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/connect/organizations/YOUR_ORGANIZATION_ID/team-access-options' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • rolesobject[]
    2 properties
    • _idid
    • namestring

      1–32 characters

  • departmentsobject[]
    3 properties
    • _idid
    • namestring

      1–80 characters

    • typesstring[]

      at least 1 items

      member address customer sponsor contributor employee supplier
  • segmentsobject[]
    3 properties
    • keystring

      1–30 characters

    • namestring

      1–40 characters

    • typestring
      member address customer sponsor contributor employee supplier
Response200
{
  "roles": [
    {
      "_id": "000000000000000000000001",
      "name": "string"
    }
  ],
  "departments": [
    {
      "_id": "000000000000000000000001",
      "name": "string",
      "types": [
        "member"
      ]
    }
  ],
  "segments": [
    {
      "key": "string",
      "name": "string",
      "type": "member"
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.