User

Endpoint to verify if list of (users, emails, phones) have access to a specific resource

post/users/verify-access

Request

  • Base URL: https://api.carbonvoice.app
  • URL: https://api.carbonvoice.app/users/verify-access
  • Auth: one of:
    • API key in header pxtoken
    • OAuth 2 (implicit, authorization URL https://api.carbonvoice.app/oauth/authorize)

Request body

resource_type'workspace' | 'channel' | 'message' | 'sharelink' required
resource_idstring required

The resource id to verify who has access to it (workspace_id, channel_id, message_id, etc)

user_idsstring[]

List of user_ids to verify if they have access to the resource

emailsstring[]

List of emails to verify if they have access to the resource

phonesstring[]

List of phones to verify if they have access to the resource

Example request

{
  "resource_type": "workspace",
  "resource_id": "5f9b3b4b9c6d2c0012c9e3d0",
  "user_ids": [
    "PGjIOWjtEjQZW1Ey",
    "cj0iFquUILzBTSKd"
  ],
  "emails": [
    "jane@phononx.com",
    "john.doe@phononx.com"
  ],
  "phones": [
    "+5553999999999",
    "+174128129"
  ]
}

Response

resource_type'workspace' | 'channel' | 'message' | 'sharelink' required
resource_idstring required

The resource id to verify who has access to it (workspace_id, channel_id, message_id, etc)

Example response

{
  "resource_type": "workspace",
  "resource_id": "5f9b3b4b9c6d2c0012c9e3d0",
  "has_access": {
    "user_ids": [
      "cj0iFquUILzBTSKd"
    ],
    "emails": [
      {
        "john.doe@phononx.com": "5f9b3b4b9c6d2c0012c9e3d0"
      }
    ],
    "phones": [
      {
        "+5553999999999": "SIIRnfNwKgIqwp77"
      }
    ]
  },
  "no_access": {
    "user_ids": [
      "cj0iFquUILzBTSKd"
    ],
    "emails": [
      {
        "john.doe@phononx.com": "5f9b3b4b9c6d2c0012c9e3d0"
      }
    ],
    "phones": [
      {
        "+5553999999999": "SIIRnfNwKgIqwp77"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.