WebHooks provide a way to allow third party applications to receive events related to the account. Configure the appropriate webhooks with your URL and we'll send the URL an HTTP request with the relevant information.

  • Channel create i.e. a new call
  • Answered channel
  • Destroyed channel i.e. hung up calls
  • GET /accounts/{account_id}/webhooks
    • Listing of current webhooks
    • Sample cURL request:

      curl -X GET -H "X-Auth-Token: 12345abcde" https://c-api.conversant.co.nz/v1/accounts/{account_id}/webhooks
  • PUT /accounts/{account_id}/webhooks
    • Creates a new webhook
    • See the schema for fields to send
    • Sample cURL request:

      curl -X PUT -H "X-Auth-Token: 12345abcde" -H "Content-Type: application/json" https://c-api.conversant.co.nz/v1/accounts/{account_id}/webhooks \
        -d '{"data":{"name":"New Calls", "uri":"http://my.server.com/calls/new.php", "http_verb":"post", "hook":"channel_create", "retries":3}}
  • GET /accounts/{account_id}/webhooks/{webhook_id}
    • See the details of a webhook
    • Sample cURL request:

      curl -X GET -H "X-Auth-Token: 12345abcde" https://c-api.conversant.co.nz/v1/accounts/{account_id}/webhooks/{webhook_id}
  • POST /accounts/{account_id}/webhooks/{webhook_id}
    • Edit the particulars of a webhook
    • Sample cURL request:

      curl -X POST -H "X-Auth-Token: 12345abcde" -H "Content-Type: application/json" https://c-api.conversant.co.nz/v1/accounts/{account_id}/webhooks{webhook_id} \
        -d '{"data":{"name":"New Calls", "uri":"https://external.mydomain.co.nz/new_call.php", "http_verb":"post", "hook":"channel_create", "retries":3}}
  • DELETE /accounts/{account_id}/webhooks/{webhook_id}
    • Delete a webhook
    • Sample cURL request:

      curl -X DELETE -H "X-Auth-Token: 12345abcde" https://c-api.conversant.co.nz/v1/accounts/{account_id}/webhooks/{webhook_id}
  • GET /accounts/{account_id}/webhooks/attempts
    • Get a list of recent attempts to your server (maybe useful in debugging)
    • Sample cURL request:

      curl -X GET -H "X-Auth-Token: 12345abcde" https://c-api.conversant.co.nz/v1/accounts/{account_id}/webhooks/attempts
  • GET /accounts/{account_id}/webhooks/{webhook_id}/attempts
    • Get a list of recent attempts to this webhook
    • Sample cURL request:

      curl -X GET -H "X-Auth-Token: 12345abcde" https://c-api.conversant.co.nz/v1/accounts/{account_id}/webhooks/{webhook_id}/attempts