Skip to content

Add Contact POST ​

Creates a new contact (Person) in your account. The system generates a personId and returns it in the response.

Authorization ​

API Key (Authentication) — send the header Authorization: Bearer <API_KEY> (API keys start with smsk_)

HTTP Request ​

http
POST https://public-api.smsup-plus.com/Person/insertPerson

Content Type ​

application/json

Parameter Description ​

PropertyTypeRequiredDescription
firstNamestringRequiredFirst name, must not be empty
lastNamestringOptionalLast name
emailstringOptionalEmail (format is not validated)
phonestringOptionalPhone number (format is not validated; stored as sent)
companyNamestringOptionalCompany name
notestringOptionalNote
tagsstring[]OptionalTags, usable as the tag filter in Search Contacts

Response Description ​

PropertyTypeDescription
statusnumber200 on success
dataobjectThe created contact — same fields as Person
data.personIdstringContact ID (UUID) used by the other endpoints

Request Example ​

bash
curl -X POST 'https://public-api.smsup-plus.com/Person/insertPerson' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "firstName": "Somchai",
    "lastName": "Jaidee",
    "email": "somchai@example.com",
    "phone": "0812345678",
    "companyName": "Example Co., Ltd.",
    "note": "Silom branch customer",
    "tags": ["VIP"]
  }'
js
const res = await fetch('https://public-api.smsup-plus.com/Person/insertPerson', {
  method: 'POST',
  headers: { Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    firstName: 'Somchai',
    lastName: 'Jaidee',
    email: 'somchai@example.com',
    phone: '0812345678',
    companyName: 'Example Co., Ltd.',
    note: 'Silom branch customer',
    tags: ['VIP'],
  }),
})
console.log(await res.json())

Response Example ​

json
{
  "status": 200,
  "data": {
    "personId": "3f8b2c1e-7a4d-4e9b-9c2f-1d5e6a7b8c90",
    "accountId": 1024,
    "firstName": "Somchai",
    "lastName": "Jaidee",
    "email": "somchai@example.com",
    "phone": "0812345678",
    "companyName": "Example Co., Ltd.",
    "note": "Silom branch customer",
    "tags": ["VIP"],
    "isDeleted": false,
    "createdBy": 2048,
    "createdAt": "2026-11-16T03:15:42.123456789Z",
    "updatedAt": "2026-11-16T03:15:42.123456789Z"
  }
}

Possible Errors ​

HTTPResponseCause
200{"status":400,"description":"firstName is required."}firstName missing or empty, body is not JSON, or a field has the wrong type (e.g. tags is not an array)
200{"status":500,"description":"Failed to create person."}Save failed — retry
401{"error":"invalid api key"}Invalid API key — see Errors

WARNING

Once authenticated, this endpoint always answers HTTP 200. Check the status field in the body.

INFO

Duplicates are not checked — calling again with the same data creates another contact with a different personId.