Create contact
Create a new contact in your organization.
POST/api-contacts
Requires the contacts:write scope. Returns 201 Created with the new contact.
Request body
Only first_name is required. Unspecified fields default to null, except tags ([]), status ("active"), and source ("api"). Any unknown fields are ignored.
Body
| Name | Type | Description |
|---|---|---|
first_namerequired | string | Given name. |
last_name | string | Family name. Stored as empty string if omitted. |
email | string | Primary email. |
phone | string | Phone number. |
company | string | Free‑text company name. |
company_id | uuid | Link to an existing company record. |
job_title | string | Job title. |
industry | string | |
address_line1 | string | |
address_line2 | string | |
city | string | |
state | string | |
zip | string | |
country | string | |
tags | string[] | Tags to apply on creation. Defaults to []. |
status | string | Lifecycle status. Defaults to active. |
stage | string | Pipeline stage label. |
source | string | Where the contact came from. Defaults to api. |
notes | string | |
linkedin_url | string |
Example request
bash
curl -X POST \
'https://api.wundertreos.com/functions/v1/api-contacts' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"company": "Acme Inc",
"job_title": "Head of Growth",
"tags": ["lead"]
}'Response
json
{
"data": {
"id": "c8b1f3a0-4d2e-4f9a-9b1c-2d4e5f6a7b8c",
"org_id": "a1b2c3d4-1111-2222-3333-444455556666",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"company": "Acme Inc",
"job_title": "Head of Growth",
"tags": ["lead"],
"status": "active",
"source": "api",
"created_at": "2026-05-17T14:00:00Z",
"updated_at": "2026-05-17T14:00:00Z"
}
}Errors
| Status | error | When |
|---|---|---|
| 400 | invalid_request | first_name is missing, or the body is not valid JSON. |
| 403 | forbidden | The credential lacks the contacts:write scope. |
| 500 | server_error | Database write failed. |
