...
First, ensure that you have access to the data necessary for utilizing the Volt GraphQL API:
Have your Volt GraphQL API access token readily available. If you are unsure of where to locate your API token, contact api@textvolt.com.
In order to receive webhooks, you will need a publicly accessible HTTP server capable of listening for
POST
requests. We recommend implementing HTTPS for securely receiving webhook events.
If you register a webhook URL, notification events will be sent to that URL for any phone number belonging to your organization. Any routing based on the sending or receiving phone number, or any other information relating to a message, should be handled as needed within the server that handles the webhook events.
To register a URL for receiving webhook notification events, use the Volt GraphQL API:
Set the
Authorization
header to the valueBearer <token>
, replacing<token>
with the API access token belonging to your organization.Construct a GraphQL query using the
registerWebhook
mutation:Code Block language graphql mutation registerWebhook ($url: String!) { registerWebhook (url: $url) { id url createdAt lastUpdatedAt } }
Construct a JSON object containing the GraphQL variables for the query created in the previous step:
Code Block language json { "url": "https://example.com/webhooks" }
Send a
POST
request tohttps://api.respondflow.com/graphql
with the GraphQL query and variables in the request body. We recommend using a GraphQL client library in the language of your choice to construct and send GraphQL API requests.
For example, to send the above GraphQL request using curl:Code Block curl --location --request POST 'https://api.respondflow.com/graphql' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data-raw '{"query":"mutation registerWebhook ($url: String!) {\n registerWebhook (url: $url) {\n id\n url\n createdAt\n lastUpdatedAt\n }\n}","variables":{"url":"https://example.com/webhooks"}}'
Once a webhook is registered, you should receivePOST
requests containing webhook notification event data related to your SMS messages.
🛠 Example webhook payloads
...