Create contact
/api/v1/ext/contacts
Create a contact in a workspace.
workspace_id is required and must belong to the installer.
⚠️ At least one of `email` or `phone_number` is required. Sending both omitted returns 400 Either email or phone_number is required. The two fields each have their own uniqueness constraint inside a workspace, so a contact is always identifiable by at least one of them.
Every other field is optional — see the response Schema tab for the full row that comes back on success.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workspace_id | body | number | yes | Workspace to attach the contact to. Must belong to the installer. |
| first_name | body | string | no | Given name. Max 50 chars. |
| last_name | body | string | no | Family name. Max 50 chars. |
body | string | no | Conditionally required — at least one of email or phone_number must be provided. Normalized to lowercase. Max 100 chars. | |
| phone_number | body | string | no | Conditionally required — at least one of email or phone_number must be provided. Max 20 chars. |
| company_name | body | string | no | Company / organization. Max 100 chars. |
| website | body | string | no | Public website URL. Max 255 chars. |
| linkedin_profile | body | string | no | LinkedIn profile URL. Max 255 chars. |
| summary | body | string (text) | no | Free-form summary / bio. |
| details | body | object | no | Loosely-typed JSON details bag. |
| address | body | string | no | Street address. Max 255 chars. |
| city | body | string | no | Max 100 chars. |
| state | body | string | no | Max 100 chars. |
| country | body | string | no | Max 100 chars. |
| timezone | body | string | no | IANA timezone, e.g. Europe/London. |
| custom_fields | body | object | no | Workspace-defined custom fields (JSON). |
| tags | body | array<string> | no | Up to 20 strings, each max 64 chars. |
| notes | body | string | array<string> | no | Free-form notes. Accepts a single string or an array of strings. |
| is_verified_sms | body | boolean | no | Phone has been verified for SMS. |
| is_verified_whatsapp | body | boolean | no | Phone has been verified for WhatsApp. |
| is_verified_imessage | body | boolean | no | Phone has been verified for iMessage. |
| last_contacted | body | string (ISO 8601) | no | When this contact was last contacted. |
Responses
| Status | When |
|---|---|
201 | Created |
400 | Missing required fields |
404 | workspace_id not accessible to this token |
409 | Duplicate contact in this workspace |
Response schema
contactobjectThe newly created contact
idnumberUnique identifier of the contact.
1234workspace_idnumberThe workspace this contact lives in.
7user_idnumberThe installer this contact belongs to.
42first_namestringGiven name. Max 50 chars.
Adalast_namestringFamily name. Max 50 chars.
LovelaceemailstringPrimary email. Unique within a workspace. Normalized to lowercase. Max 100 chars.
ada@example.comphone_numberstringPrimary phone number. Unique within a workspace. Max 20 chars.
+15551234567company_namestringCompany / organization name. Max 100 chars.
Analytical Engines LtdwebsitestringPublic website URL. Max 255 chars.
https://analyticalengines.example.comlinkedin_profilestringLinkedIn profile URL. Max 255 chars.
https://linkedin.com/in/adasummarystring (text)Free-form summary / bio.
detailsobjectLoosely-typed details bag (JSON). Use this for app-specific metadata that doesn't fit a column.
addressstringStreet address. Max 255 chars.
citystringCity. Max 100 chars.
statestringState / region. Max 100 chars.
countrystringCountry name. Max 100 chars.
timezonestringIANA timezone (e.g. Europe/London). Max 100 chars.
custom_fieldsobjectWorkspace-defined custom fields (JSON).
tagsarray<string>Up to 20 short labels.
notesarray<string>Free-form notes. Accepts a string or an array on write; reads always return an array.
is_verified_smsbooleanPhone number has been verified for SMS.
falseis_verified_whatsappbooleanPhone number has been verified for WhatsApp.
falseis_verified_imessagebooleanPhone number has been verified for iMessage.
falselast_contactedstring (ISO 8601)When the contact last had a message exchange.
created_atstring (ISO 8601)When the contact was first created.
2026-05-21T09:14:22.000Zupdated_atstring (ISO 8601)When the contact was last modified.
2026-05-21T09:14:22.000Zdeleted_atstring (ISO 8601)Set when the contact has been soft-deleted. null for active records.
curl -X POST "https://backend.mysmsgateway.app/api/v1/ext/contacts" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 7,
"first_name": "Ada",
"last_name": "Lovelace",
"email": "ada@example.com",
"phone_number": "+15551234567",
"company_name": "Analytical Engines Ltd",
"website": "https://analyticalengines.example.com",
"linkedin_profile": "https://linkedin.com/in/ada",
"summary": "Mathematician + first programmer. Interested in early CRM tooling.",
"details": {
"source": "newsletter",
"priority": "high"
},
"address": "12 Mayfair St",
"city": "London",
"state": "Greater London",
"country": "United Kingdom",
"timezone": "Europe/London",
"custom_fields": {
"lead_score": 92,
"owner": "gary"
},
"tags": [
"lead",
"priority",
"engineer"
],
"notes": [
"Spoke at conference 2026-05-15",
"Wants a quote on the Pro tier"
],
"is_verified_sms": true,
"is_verified_whatsapp": false,
"is_verified_imessage": false,
"last_contacted": "2026-05-20T11:02:09.000Z"
}'{
"success": true,
"data": {
"id": 1234,
"first_name": "Ada",
"last_name": "Lovelace",
"email": "ada@example.com",
"phone_number": "+15551234567",
"company_name": "Analytical Engines Ltd",
"website": "https://analyticalengines.example.com",
"linkedin_profile": "https://linkedin.com/in/ada",
"summary": "Mathematician + first programmer. Interested in early CRM tooling.",
"details": {
"source": "newsletter",
"priority": "high"
},
"address": "12 Mayfair St",
"city": "London",
"state": "Greater London",
"country": "United Kingdom",
"timezone": "Europe/London",
"custom_fields": {
"lead_score": 92,
"owner": "gary"
},
"is_verified_sms": true,
"is_verified_whatsapp": false,
"is_verified_imessage": false,
"last_contacted": "2026-05-20T11:02:09.000Z",
"notes": [
"Spoke at conference 2026-05-15"
],
"tags": [
"lead",
"priority"
],
"workspace_id": 7,
"user_id": 42,
"created_at": "2026-05-21T09:14:22.000Z",
"updated_at": "2026-05-21T09:14:22.000Z",
"deleted_at": null
}
}« Get contact
Update contact »
