Webhooks


GEThttps://api.voxo.co/v2/webhooks?tenantId={tenantId}

List Webhooks

List Webhooks

Parameters

  • Name
    tenantId*
    Type
    integer
    Description
    1234
Header
  • Name
    Authorization*
    Type
    string
    Description

    Bearer {accessToken}

  • Name
    Content-Type*
    Type
    string
    Description
    application/json

Request

GET
/webhooks?tenantId={tenantId}
curl --location -g --request GET 'https://api.voxo.co/v2/webhooks?tenantId={tenantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

[
    {
        "id": 112,
        "tenantId": 875,
        "type": "STARTCALL",
        "url": "https://dummy-url.com/hooks/type/..."
    },
    {
        "id": 113,
        "tenantId": 875,
        "type": "INBOUNDSMS",
        "url": "https://dummy-url.com/hooks/type/..."
    }, 
    ...
],

GEThttps://api.voxo.co/v2/webhooks/list-types

List Webhooks Types

List Webhooks Types

Parameters

Header
  • Name
    Authorization*
    Type
    string
    Description

    Bearer {accessToken}

  • Name
    Content-Type*
    Type
    string
    Description
    application/json

Request

GET
/webhooks/list-types
curl --location -g --request GET 'https://api.voxo.co/v2/webhooks/list-types' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

[
    {
      "type": "STARTCALL",
      "description": "Webhook for when a call starts"
    }
    {
        "type": "ENDCALL",
        "description": "Webhook for end of call"
    },
    {
        "type": "INBOUNDSMS",
        "description": "Webhook for inbound SMS"
    },
    {
      "type": "NEWVOICEMAIL",
      "description": "Webhook for when a new voicemail arrives"
    }
    ...
],

GEThttps://api.voxo.co/v2/webhooks/:id

Get A Webhook By ID

Get a webhook by ID

Parameters

Header
  • Name
    Authorization*
    Type
    string
    Description

    Bearer {accessToken}

  • Name
    Content-Type*
    Type
    string
    Description
    application/json

Request

GET
/webhooks/:id
curl --location -g --request GET 'https://api.voxo.co/v2/webhooks/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "id": 214,
    "tenantId": 37,
    "type": "STARTCALL",
    "url": "https://dummy-url.com/hooks/type/..."
},

POSThttps://api.voxo.co/v2/webhooks

Create A Webhook

Create a webhook

Post Parameters

  • Name
    tenantId*
    Type
    number
    Description
    Account id
  • Name
    type*
    Type
    number
    Description
    Type of webhook. See webhooks list types endpoint.
  • Name
    url*
    Type
    number
    Description
    The endpoint to send the webhook POST request

Header

  • Name
    Authorization*
    Type
    string
    Description

    Bearer {accessToken}

  • Name
    Content-Type*
    Type
    string
    Description
    application/json

Request

POST
/webhooks
curl --location -g --request POST 'https://api.voxo.co/v2/webhooks' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "id": 234,
    "tenantId": 1234,
    "type": "STARTCALL",
    "url": "https://voxo.co"
},

DELETEhttps://api.voxo.co/v2/webhooks/:id

Remove A Webhook

Remove a webhook

Header

  • Name
    Authorization*
    Type
    string
    Description

    Bearer {accessToken}

  • Name
    Content-Type*
    Type
    string
    Description
    application/json

Request

DELETE
/webhooks/:id
curl --location -g --request DELETE 'https://api.voxo.co/v2/webhooks/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "id": 234,
    "tenantId": 37,
    "type": "STARTCALL",
    "url": "https://voxo.co"
},

PATCHhttps://api.voxo.co/v2/webhooks/:id

Update A Webhook

Update a webhook
Support sparse updating of webhook properties

Post Parameters

  • Name
    type
    Type
    number
    Description
    Type of webhook. See webhooks list types endpoint.
  • Name
    url
    Type
    number
    Description
    The endpoint to send the webhook POST request

Header

  • Name
    Authorization*
    Type
    string
    Description

    Bearer {accessToken}

  • Name
    Content-Type*
    Type
    string
    Description
    application/json

Request

PATCH
/webhooks/:id
curl --location -g --request PATCH 'https://api.voxo.co/v2/webhooks/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {accessToken}'

Response

{
    "id": 232,
    "tenantId": 37,
    "type": "INBOUNDSMS",
    "url": "https://dummy-url.com/hooks/type/..."
}