Skip to content

Provisioning API

The provisioning API is currently an internal API for enabling integration between external PBX systems and the Botsquad platform. It is based on REST.

Authorization

To use the provioning APIs, you need a valid JWT token. Contact the Botsquad team to obtain such a token.

The authorization itself is through a standard Authorization: Bearer <your token here> HTTP header.

GET /provisioning/pbx/:pool/registrations

Retrieve a list of all SIP registrations for a given pool, as JSON.

curl https://studio.botsqd.com/api/provisioning/pbx/mobileconnect/registrations -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5c....'

Retrieves a list where each registration is a registration entry:

[
    {
        "bot_id": "7cb3bbcc-70fa-4416-93b4-2ab24ae6336d",
        "contact": "<sip:myusername@12.34.56.78>",
        "domain": "sipdomain.nl",
        "password": "mypassword",
        "pbx_type": "mv3",
        "remote_host": "12.34.56.79",
        "remote_port": 5060,
        "username": "myusername"
    }
]

POST /provisioning/pbx/:pool/registrations-status

Update the registration status for each bot.

The input payload is a JSON map in which each key is the bot_id, and the value is a string containing an arbitrary status string, e.g. "registered".

curl -vv -X POST  https://studio.botsqd.com/api/provisioning/pbx/mobileconnect/registrations-status \
  -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9....'  \
  -H 'Content-type: application/json' \
  --data-binary '{"7cb3bbcc-70fa-4416-93b4-2ab24ae6336d": "offline"}'

The HTTP response is 204 (no content) when the update is processed OK.