Add a texter as a contact

Add a texter as a contact

POST/api/v1/sms/{id}/contact

POST /sms/{id}/contact
curl -X POST 'https://www.unitpost.com/api/v1/sms/sms_123/contact' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 200
{
  "object": "contact",
  "id": "id_123",
  "email": "customer@example.com",
  "phone": "string",
  "first_name": "string",
  "last_name": "string",
  "unsubscribed": false,
  "unsubscribed_at": "2026-01-01T00:00:00.000Z",
  "unsubscribe_reason": "USER",
  "custom_fields": {},
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Make the sender of a received text a contact, or file the text under the contact that already has the number. Phone only: no name and no consent (texting a number isn't consent to marketing). Every earlier text with that number that no contact holds is filed under the contact too, so contact_id reads it from then on. Answers the contact: 201 when it is new, 200 when it existed. It counts against the plan's contacts (403 limit_reached when full). A number that texted STOP stays opted out. A text you sent is refused (409). Requires the contacts:write capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Response · 200 fields12 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
emailrequiredstring | null—
phonestring | null—
first_namerequiredstring | null—
last_namerequiredstring | null—
unsubscribedrequiredboolean—
unsubscribed_atrequiredstring | null—
unsubscribe_reasonrequiredenum | null—
custom_fieldsrequiredobject—
created_atrequiredstring—
updated_atrequiredstring—
200201400401403404409422

Search docs and guides

Search the docs and product guides.