Phone.com Connect OpenAPI
Beetexting and Phone.com App
  1. Webhook Subscriptions API
  • Getting Started
  • OAuth 2.0 for Phone.com
  • Postman How-to for Phone.com OpenAPIs
  • Zapier How-to for Phone.com OpenAPIs
  • FAQ
  • APIs
    • Message API
      • Send SMS
      • Send MMS
    • Contacts
      • Get All Contacts in an Org
      • Find contact using Mobile number
      • Search a contact using Number
      • Create or Update Contact
      • Update contact using Mobile number
      • Update Contact
    • Consent
      • Create Custom Consent
      • Update Custom Consent
      • Get Custom Consent Details Using ID
      • Get All Custom Consents
      • Change Custom Consent Status by Id
      • Add or Remove Custom Consent Type
    • Webhook Subscriptions API
      • Get All Subscriptions
        GET
      • Create or Update Subscription
        POST
    • Sites API
      • Get Sites
  1. Webhook Subscriptions API

Create or Update Subscription

POST
/webhooksubscription

Description :

Client applications subscribe for webhook notifications and listen for the various events pertaining to their data in Beetexting, including; create or update contact, delete contact, and message outbound events. This API helps create or update subscription using "SubscriptionRequest" object in the request body.

URL :

https://connect.beetexting/prod/webhooksubscription
(While sending the request please make sure to append https://connect.beetexting.com/prod if the url in the cUrl command starts with /message ...)

**Note : To add the OAuth2.0 Auth Token please see the section 'OAuth2.0 For Phone.com' and 'Postman How-to for Phone.com section'

Users can subscribe to the inbound message by sending below request to Beetexting.

API End Point : https://connect.beetexting.com/prod/webhooksubscription

Method : POST

Request Body:

{
"uri": "https://callbackurl.com/",
"eventFilters": [
"/orgId//department//message?direction=inbound"
],
"expiresDateInMillies":
}

Then, Beetexting will validate by sending a GET call to the callback URL, e.g. https://callbackurl.com/ with a validation-token in the request header.
The caller should then send a response with the same validation-token in the response header with https 200 status. If the response header validation-token matches with the request-header validation-token that we sent, we will then send below response for the create subscription call as below:

Response:

{
"id": "",
"uri": "https://callbackurl.com",
"eventFilters": [
"/orgId//department//message?direction=inbound"
],
"disabledFilters": [
{
"filter": "string",
"reason": "string",
"message": "string",
"orgId": "string",
"id": "string"
}
],
"expirationTime": "2024-03-10T18:07:52.534Z",
"expiresIn": ,
"status": "ACTIVE",
"createdDateTime": "2023-06-10T18:07:52.534Z",
"lastUpdateDateTime": "2023-06-10T20:07:52.534Z",
"orgId": ""
}

With this, now the user has subscribed to get notification for any inbound/oubound messages.

Once an Inbound message comes Beetexting will send the following payload to the above mentioned uri.
See below the sample payload for the inbound message

Payload :

{
"uuid": "",
"timestamp": 1704067200000,
"event": " "/orgId//department//message?direction=inbound",
"subscriptionId": "",
"messageInfo": {
"organizationId": "",
"departmentId": "",
"lastUpdated": 1704067200000,
"messageId": "",
"carrierMessageId": "",
"status": ""
}
}

Using the messageId part of the above payload, user can call the below end point to get the message details.

API End Point : https://connect.beetexting.com/prod/message/getmessagebyid/{messageId}

Method : GET

Response:

{
"id": "",
"owner": "user@example.com",
"time": "2024-01-01T12:00:00Z",
"direction": "in",
"to": [
"",
""
],
"from": "",
"text": "",
"media": [
""
],
"attachments": [
""
]
}

Sample Response:

{
"id": "67070af782b96f464c18bc7b",
"owner": null,
"time": null,
"direction": "in",
"to": [
"+112353623623"
],
"from": "",
"text": "Hi ",
"media": [],
"attachments": []
}

Request

Authorization
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/webhooksubscription' \
--header 'x-api-key: HvG7OZaxgz3raDMzX9CYp9105hV9VwDa6zrCS234' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "uri": "https://beetexting.com",
    "eventFilters": [
        "/orgId/<organizationId>/department/<departmentId>/contact",
        "/orgId/<organizationId>/department/<departmentId>/message?direction=outbound"
    ],
    "expiresDateInMillies": 0
}'
Response Response Example
{
    "id": "string",
    "uri": "string",
    "eventFilters": [
        "string"
    ],
    "disabledFilters": [
        {
            "filter": "string",
            "reason": "string",
            "message": "string",
            "orgId": "string",
            "id": "string"
        }
    ],
    "expirationTime": "2024-03-10T18:07:52.534Z",
    "expiresIn": 0,
    "status": "ACTIVE",
    "createdDateTime": "2023-06-10T18:07:52.534Z",
    "lastUpdateDateTime": "2023-06-10T20:07:52.534Z",
    "orgId": "string"
}
Modified at 2025-12-05 15:46:41
Previous
Get All Subscriptions
Next
Get Sites
Built with