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
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Response · 200 fields12 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
emailrequired | string | null | — |
phone | string | null | — |
first_namerequired | string | null | — |
last_namerequired | string | null | — |
unsubscribedrequired | boolean | — |
unsubscribed_atrequired | string | null | — |
unsubscribe_reasonrequired | enum | null | — |
custom_fieldsrequired | object | — |
created_atrequired | string | — |
updated_atrequired | string | — |
200201400401403404409422