Skip to Content
SendlySendly
API ReferenceContacts

Create a contact

POST
/api/v1/contacts

Create a contact. The address is unique per project, so creating one that already exists answers 409 conflict rather than updating the existing row — there is no upsert on this surface, because a silent update is not what a caller who wrote create asked for.

Requires the contacts:write scope — Create, update, and delete your contacts.

headerAuthorizationBearer <API Key>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

application/json
  1. body

Body for POST /api/v1/contacts.

email*string
Formatemail
subscribed?boolean
Defaulttrue
custom_fields?||||array<any>|

Arbitrary JSON stored on the contact and available to templates as {{ variables }}.

Response Body

The created contact

application/json
  1. response

A contact as exposed on the v1 API.

id*string
Formatuuid
email*string
subscribed*boolean
custom_fields*||||array<any>|

Arbitrary JSON value (string, number, boolean, null, array, or object).

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.sendly.now/api/v1/contacts' \  -H 'Content-Type: application/json' \  -d '{  "email": "user@example.com"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "email": "string",  "subscribed": true,  "custom_fields": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}