Skip to content

Add Destination POST ​

Adds a destination (a phone number or email) to a contact. A contact can have several destinations.

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/insertPersonDestination

Content Type ​

application/json

Parameter Description ​

PropertyTypeRequiredDescription
personIdstringRequiredID of the contact to add the destination to (must belong to your account)
valuestringRequiredPhone number or email, must not be empty (format is not validated; stored as sent)
isPrimarybooleanOptionalMarks this as the primary destination (default false)

Response Description ​

PropertyTypeDescription
statusnumber200 on success
data.destinationIdstringDestination ID (UUID) — store it, you need it for Delete Destination
data.personIdstringID of the owning contact
data.accountIdnumberYour account ID
data.valuestringThe stored phone number or email
data.isPrimarybooleanWhether it is the primary destination
data.isDeletedbooleanfalse
data.createdAtstringCreation time (ISO 8601)
data.updatedAtstringLast update time (ISO 8601)

Request Example ​

bash
curl -X POST 'https://public-api.smsup-plus.com/Person/insertPersonDestination' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "personId": "3f8b2c1e-7a4d-4e9b-9c2f-1d5e6a7b8c90",
    "value": "66812345678",
    "isPrimary": true
  }'
js
const res = await fetch('https://public-api.smsup-plus.com/Person/insertPersonDestination', {
  method: 'POST',
  headers: { Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    personId: '3f8b2c1e-7a4d-4e9b-9c2f-1d5e6a7b8c90',
    value: '66812345678',
    isPrimary: true,
  }),
})
console.log(await res.json())

Response Example ​

json
{
  "status": 200,
  "data": {
    "destinationId": "7e6d5c4b-3a29-4180-9f7e-6d5c4b3a2918",
    "personId": "3f8b2c1e-7a4d-4e9b-9c2f-1d5e6a7b8c90",
    "accountId": 1024,
    "value": "66812345678",
    "isPrimary": true,
    "isDeleted": false,
    "createdAt": "2026-11-16T03:20:05.987654321Z",
    "updatedAt": "2026-11-16T03:20:05.987654321Z"
  }
}

Possible Errors ​

HTTPResponseCause
200{"status":400,"description":"personId and value are required."}personId or value missing, body is not JSON, or a field has the wrong type
200{"status":404,"description":"Person not found."}Contact does not exist, was deleted, or belongs to another account
200{"status":500,"description":"Failed to add destination."}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

The public API has no endpoint to list destinations, so keep the destinationId from the response. Duplicates are not checked, and sending isPrimary: true does not change the contact's other destinations.