Skip to content

Send a group text

POST
/sms/group
curl --request POST \
--url https://api.pingram.io/sms/group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "example", "to": [ "example" ], "message": "example", "subject": "example", "mediaUrls": [ "example" ], "from": "example" }'

Send one text to 2–8 numbers in the US or Canada. Each recipient is billed at the multimedia message rate. An optional subject is shown with the text. A follow-up is another send to the same numbers.

Authorizations

Request Bodyrequired

Media typeapplication/json

Send one text to several numbers at once. Phones keep a later text to the same numbers in the same chat.

object
type
required

Notification type you can use later for filtering, analytics, and more. For example, “onboarding” or “threshold_alert”.

string
to
required

Two to eight mobile numbers in the US or Canada. Each number is billed at the multimedia message rate, including a text with no attachment.

Array<string>
message

Text to send. Required when mediaUrls is omitted.

string
subject

Subject shown with the group text. Optional.

string
mediaUrls

Public HTTPS URLs of pictures or files to attach.

Array<string>
from

Number the group text is sent from. When omitted, a number on this account is used.

string
Examplegenerated
{
"type": "example",
"to": [
"example"
],
"message": "example",
"subject": "example",
"mediaUrls": [
"example"
],
"from": "example"
}

Responses

200

Successful response

Media typeapplication/json
Any of:

Success response for POST /sms.

object
trackingId
required
string
messages
required

Warnings about this send. Empty when the text was accepted.

Array<string>
Examplegenerated
{
"trackingId": "example",
"messages": [
"example"
]
}

400

Bad Request - validation errors, invalid input

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

401

Unauthorized

402

Payment Required - usage limits exceeded

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

500

Internal Server Error

502

Bad Gateway - provider error

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}