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/insertPersonDestinationContent Type
application/json
Parameter Description
| Property | Type | Required | Description |
|---|---|---|---|
personId | string | Required | ID of the contact to add the destination to (must belong to your account) |
value | string | Required | Phone number or email, must not be empty (format is not validated; stored as sent) |
isPrimary | boolean | Optional | Marks this as the primary destination (default false) |
Response Description
| Property | Type | Description |
|---|---|---|
status | number | 200 on success |
data.destinationId | string | Destination ID (UUID) — store it, you need it for Delete Destination |
data.personId | string | ID of the owning contact |
data.accountId | number | Your account ID |
data.value | string | The stored phone number or email |
data.isPrimary | boolean | Whether it is the primary destination |
data.isDeleted | boolean | false |
data.createdAt | string | Creation time (ISO 8601) |
data.updatedAt | string | Last 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
| HTTP | Response | Cause |
|---|---|---|
| 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.
