Skip to main content
POST
/
sms-conversations
Create an SMS conversation
curl --request POST \
  --url https://api.pamhq.com/v1/sms-conversations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentSlug": "recall-sms",
  "toNumber": "+15555550199",
  "fromNumber": "+15555550123",
  "welcomeMessage": "Hi Ada, this is PAM Motors following up on your service recall.",
  "dynamicVariables": {
    "customerName": "Ada",
    "dealershipName": "PAM Motors"
  }
}
'
{
  "data": {
    "conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "providerMessageId": "<string>",
    "status": "queued"
  },
  "meta": {
    "request_id": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pam.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
default:pk_live_your_api_key
required

API key provided as Authorization: Bearer <key>.

Body

application/json

Select exactly one agent. Use agentSlug for PAM-managed agents, or agentId for a specific custom agent.

agentId
string<uuid>
required

Specific custom agent id.

toNumber
string
required

Phone number in E.164 format.

Pattern: ^\+\d{7,15}$
agentSlug
string

Stable slug for a PAM-managed agent.

Required string length: 1 - 255
fromNumber
string

Required when you use agentSlug. Ignored when the selected agent has a configured phone number.

Pattern: ^\+\d{7,15}$
welcomeMessage
string

Exact first SMS body. Required when you use a PAM-managed SMS agent.

dynamicVariables
object

String variables resolved into the agent prompt, tools, or opening copy.

Response

SMS conversation created

data
object
meta
object