Skip to main content
POST
/
contacts
Create Contact
curl --request POST \
  --url https://api.unosend.co/contacts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "audience_id": "<string>",
  "email": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "unsubscribed": true
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.unosend.co/llms.txt

Use this file to discover all available pages before exploring further.

audience_id
string
required
The ID of the audience to add the contact to.
email
string
required
The contact’s email address.
first_name
string
The contact’s first name.
last_name
string
The contact’s last name.
unsubscribed
boolean
default:"false"
Whether the contact is unsubscribed.

Request

curl -X POST https://api.unosend.co/contacts \
  -H "Authorization: Bearer un_xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "audience_id": "aud_123",
    "email": "john@example.com",
    "first_name": "John",
    "last_name": "Doe"
  }'

Response

201
{
  "success": true,
  "data": {
    "id": "con_123",
    "email": "john@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "subscribed": true,
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}