Skip to content
campaiDeveloper
campai.com

Connect · Team roles

POST/connect/organizations/{organizationId}/team-roles/{roleId}

Update team role

Updates a team role identified by organizationId and roleId using the supplied name, description, and permissions fields. It returns no value.

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 organization access.
  • The caller must have the team.edit permission.

Request

Path parameters

  • organizationIdidrequired
  • roleIdidrequired

Body

Content-Type: application/json

  • namestringrequired

    1–32 characters

  • descriptionstringrequired

    at most 256 characters

  • permissionsobjectrequired
    5 properties
    • contactobject
      10 properties
      • readobject of boolean
        Keys: one of 7 values
        member address customer sponsor contributor employee supplier
      • communicationboolean
      • personalboolean
      • departmentsboolean
      • groupsboolean
      • billingboolean
      • contractsboolean
      • notesboolean
      • proofsCertificatesboolean
      • tagsboolean
    • userobject of boolean
      Keys: one of 3 values
      list read chat
    • chatobject
      22 properties
      • createActivityboolean
      • createPollboolean
      • createAvailabilityboolean
      • createSignupboolean
      • createChecklistboolean
      • createFormboolean
      • createChallengeboolean
      • participatePollboolean
      • participateAvailabilityboolean
      • participateSignupboolean
      • participateChecklistboolean
      • participateFormboolean
      • participateChallengeboolean
      • manageActivitiesboolean
      • replyboolean
      • reactboolean
      • mentionboolean
      • mentionEveryoneboolean
      • manageboolean
      • changeAppearanceboolean
      • pinboolean
      • viewContactNameboolean
    • todoobject of boolean
      Keys: one of 2 values
      read manage
    • fileobject of boolean
      Keys: one of 4 values
      view manageFolders manageOwnFiles manageAllFiles
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/connect/organizations/YOUR_ORGANIZATION_ID/team-roles/YOUR_ROLE_ID' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

No response body is specified.

What else happens

  • If the role is found, the endpoint updates its teamRoles record.

Errors

Other errors

StatusErrorWhen
404The team role was not foundIf the role is not found in the organization, the endpoint returns HTTP 404 with key routes.connect.teams.roles.notFound.

Errors nearly every request can meet are listed under Errors.