Create Contact
Create a new contact.
POST
/v2/contacts
Request Body
Writeable fields
| Field | Type | Status | Format | Notes |
|---|---|---|---|---|
| data | object | required | - | - |
| data.user_id | string (uuid) | optional | uuid | uuid of owner of the contact, defaults to the user_id of the caller |
| data.email | string | required | Email of the contact, Must be unique | |
| data.phone | string (phone) | optional | phone | Contacts phone number |
| data.company | string | optional | - | Contacts company |
| data.first_name | string | required | - | Contacts First name |
| data.last_name | string | optional | - | Contacts Last name |
| data.job_title | string | optional | - | Contacts Job title |
| data.notes | string | optional | - | Notes attached to contact |
cURl example
curl -X POST 'https://lunarsend.com/api/v2/contacts' \
-H 'x-api-key: $LUNARSEND_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "Joe@example.com",
"first_name": "Joe",
"last_name": "Doe",
"phone": "+12025550123"
}'Response
[
{
status: "success",
data: {
email: "Joe@example.com",
phone: "+12025550123",
company: null,
created_at: "2025-10-04T14:17:28.266864+00:00",
id: "150c081d-5d5f-401d-abd1-727c35222054",
user_id: "77f463d7-4107-1957-8b71-ab03acc319a2",
owner: "John",
last_activity: null,
last_name: "Doe",
job_title: null,
notes: "",
first_name: "Bob",
},
},
]Response Fields
| Field | Type | Status | Format | Notes |
|---|---|---|---|---|
| status | enum successerror | read-only optional | - | - |
| error | string - Error description (only present on error) | read-only optional | - | - |
| data | object | required | - | - |
| data.id | string (uuid) | read-only optional | uuid | Server-assigned UUID |
| data.user_id | string (uuid) | optional nullable | uuid | uuid of owner of the contact, defaults to the user_id of the caller |
| data.email | string | required | Email of the contact, Must be unique | |
| data.phone | string (phone) | optional nullable | phone | Contacts phone number |
| data.company | string | optional nullable | - | Contacts company |
| data.first_name | string | required | - | Contacts First name |
| data.last_name | string | optional nullable | - | Contacts Last name |
| data.job_title | string | optional nullable | - | Contacts Job title |
| data.owner | string | read-only optional | - | Server-assigned based on user_id, will show the linked user_id's display name |
| data.notes | string | optional nullable | - | Notes attached to contact |
| data.last_activity | string (ISO 8601) | read-only optional nullable | date-time | Set by the system. |
| data.created_at | string (ISO 8601) | read-only optional | date-time | Server-assigned. |