/
Sending Message Details to Volt Insights API

Sending Message Details to Volt Insights API

 

You can get messages added to your Insights Dashboard by passing along the message details and results from your provider’s webhook responses. This is a step-by-step guide to send message details to our Volt webhook.

 Instructions

Prep

  1. Have your Volt API access token readily available. If you have a Volt GraphQL API, you may use the same token.

  2. Ensure you can reach the endpoint by sending an empty body with your bearer token.

If you are unsure of where to locate your API token, contact api@textvolt.com.

 

Messages Endpoint

URL

  1. https://v1.insights.api.textvolt.com/data/messages

 

POST

  1. Set the Authorization header to the value Bearer <token>, replacing <token> with the API access token belonging to your organization.

  2. Send a POST request to https://v1.insights.api.textvolt.com/data/messages with the body sent as JSON.

For example, to send the above request using curl:

  1. curl --location --request POST https://v1.insights.api.textvolt.com/data/messages --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data-raw '{"id": "ex-am-pl-id-12-34","provider": "telnyx","from_number": "+1234567890","to_number": "+1098765432","body": "The text you sent. Text STOP to Unsubscribe.","status": "delivered",message_created_at: "2024-04-24T00:00:00"}'

 

Request Body

Required Fields

Only id and provider are required, all other fields are nullable if you do not wish to send or if the field is not given from your provider.

Name

Type

Example

Description

Name

Type

Example

Description

id

String

"id": "ex-am-pl-id-12-34"

Unique message ID. You can use the id from provider

provider

String

"provider": "telnyx"

Name of the messaging provider used in lowercase

Current known providers:

twilio bandwidth telnyx pinpoint plivo infobip messagebird commio imimobile sinch vonage smpp ringcentral cdyne tychron

message_created_at

String

"2024-03-14T13:00:00-05:00"

Datetime the message was created by you in ISO 8601 format. If none is given, this will be the time the message is processed.

message_sent_at

String

"2024-03-14T13:00:00-05:00"

Datetime the message was sent (to or from the carrier) by your provider (CPaaS) in ISO 8601 format. If none is given, this will be the time the message is processed.

message_finalized_at

String

"2024-03-14T13:00:00-05:00"

Datetime the message was marked finalized by the provider (CPaaS) in ISO 8601 format. If none is given, this will be the time the message is processed.

error_code

String

"000"

Code the provider returned if there was an issue with sending this message

from_number

String

"+1234567890"

Phone number formatted in E.164 the message is being sent from

to_number

String

"+1098765432"

Phone number formatted in E.164 the message was sent to

body

String

"The text you sent. Text STOP to Unsubscribe."

Contents of the message sent

status

String

"delivered"

Status returned from the provider

direction

String

"outbound"

Direction of the message. Certain providers have more than inbound/outbound descriptions. These will be saved for future reference, but also normalized into inbound/outbound buckets

message_type

String

"SMS"

Kind of message sent: SMS/MMS

segment_count

Integer

2

Number of segments provider broke message into for sending

 

Preferred Fields for Best Experience (not required)

If data is sent on an existing message previously sent to webhook, the field will be updated. Send Dates in ISO 8601 format, example '2024-03-14T13:00:00-05:00' (YYYY-MM-DDTHH:mm:ssZ).

Name

Type

Example

Description

Name

Type

Example

Description

error_message

String

"The destination phone number was deemed invalid by the carrier."

Details passed along from provider on error returned.

mno_name

String

"T-MOBILE USA, INC."

Mobile Network Operator name of the recipient phone number. May be the specific regional carrier used by recipient.

message_profile_id

String

"Sub-Account-Id-123"

Sub account or messaging profile id given by the provider.

messaging_profile_name

String

"Specific Sub Label"

Name or label you have assigned given in the provider for a sub account or messaging profile.

line_type

String

"Wireless"

Indicates the type of number the to_number is such as “Wireless”, “Wireline”..etc