Skip to content

Capability

A capability query determines which options are available for reaching a contact on the channels on which the contact has a channel identity.

To execute the request, either the contact ID or the channel recipient identities of the contact are required.

The request is executed asynchronously. Therefore the service responds with immediate acknowledgment. The final result of the capability query is sent to a webhook registered for the CAPABILITY trigger.

When no authoritative source of truth exists for a given channel's capability, the endpoint MUST respond as Capable for that channel. This ensures that any configured fallback and upscale routing strategies continue to function as expected.

Note:

The status received via the MESSAGE_DELIVERY callback should be treated as the definitive indication of reachability for the corresponding recipient at the time of the delivery attempt. For example, a RECIPIENT_NOT_REACHABLE status may legitimately follow an earlier Capable response from the Capability endpoint, as reachability can change between the time of capability assessment and the time of actual message delivery.

Capability lookup

Request

This method is asynchronous - it immediately returns the requested Capability registration. Capability check is then delivered as a callback to registered webhooks with trigger CAPABILITY for every reachable channel.

Security
Basic or oAuth2
Path
project_idstringrequired

The unique ID of the project. You can find this on the Sinch Dashboard.

Bodyapplication/jsonrequired

The query capability request.

app_idstringrequired

The ID of the app to use for capability lookup.

Example:"{APP_ID}"
recipientChannel Identities (object) or Contact ID (object)(Recipient)required
One of:

Identifies the recipient.

request_idstring

ID for the asynchronous response, will be generated if not set. Currently this field is not used for idempotency.

curl -i -X POST \
  -u '<username>:<password>' \
  'https://us.conversation.api.sinch.com/v1/projects/{project_id}/capability:query' \
  -H 'Content-Type: application/json' \
  -d '{
    "app_id": "{APP_ID}",
    "recipient": {
      "identified_by": {
        "channel_identities": [
          {
            "channel": "WHATSAPP",
            "identity": "string"
          }
        ]
      }
    },
    "request_id": "string"
  }'

Responses

A successful response.

Bodyapplication/json
app_idstring

The ID of the app to use for capability lookup.

recipientChannel Identities (object) or Contact ID (object)(Recipient)
One of:

Identifies the recipient.

request_idstring

ID for the asynchronous response, will be generated if not set.

Response
{ "app_id": "string", "recipient": { "identified_by": { … } }, "request_id": "string" }