Skip to content

Send an SMS or MMS directly without a template. Requires `type` and `to`. Pass `message` and/or `mediaUrls`. Optional: `from`, `schedule`.

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

Authorizations

Request Bodyrequired

Media typeapplication/json

Request body for POST /sms (send SMS or MMS without a template).

object
type
required

The notification type to send.

string
to
required

The phone number of the recipient.

string
message

The message of the SMS or MMS notification. Optional when mediaUrls is provided.

string
mediaUrls

Public HTTPS URLs of media to attach (MMS).

Array<string>
schedule

The ISO 8601 datetime to schedule the SMS notification.

string
from

Override the sender phone number. Must be a dedicated number on your Pingram account.

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

Responses

200

Successful response

Media typeapplication/json
Any of:

Success response for POST /sms.

object
trackingId
required
string
messages
required
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"
}
}