Skip to content
TriedDocs
Contacts

Create contact

Add a contact with a phone number, name, email, custom fields and a do-not-call flag.

POSThttps://api.tried.com.au/create-contact

Creates a contact. A workspace has at most one contact per phone number. Calls to and from that number link to the contact automatically, and its fields reach the agent as dynamic variables (first_name, last_name, contact_email, do_not_call and each custom field).

Request#

Field Type Required Description
phone_number string Yes E.164 number, for example +61412345678.
first_name string or null No Up to 100 characters.
last_name string or null No Up to 100 characters.
email string or null No A valid email address. An empty string is stored as null.
custom_fields object No Keys with string, number or boolean values. Values are stored as strings.
do_not_call boolean No Blocks outbound calls that set honor_internal_dnc. Default false.

Example request#

curl -X POST https://api.tried.com.au/create-contact \
  -H "Authorization: Bearer $TRIED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_number": "+61412345678",
    "first_name": "Sam",
    "last_name": "Nguyen",
    "email": "sam@example.com",
    "custom_fields": { "plan": "Pro", "seats": 12 }
  }'
const res = await fetch("https://api.tried.com.au/create-contact", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    phone_number: "+61412345678",
    first_name: "Sam",
    last_name: "Nguyen",
    email: "sam@example.com",
    custom_fields: { plan: "Pro", seats: 12 },
  }),
});
const contact = await res.json();
import os, requests

res = requests.post(
    "https://api.tried.com.au/create-contact",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
    json={
        "phone_number": "+61412345678",
        "first_name": "Sam",
        "last_name": "Nguyen",
        "email": "sam@example.com",
        "custom_fields": {"plan": "Pro", "seats": 12},
    },
)
contact = res.json()

Response#

201 Created

{
  "contact_id": "contact_4b8e2f1a9c3d5e7f6a0b2c4d",
  "phone_number": "+61412345678",
  "first_name": "Sam",
  "last_name": "Nguyen",
  "email": "sam@example.com",
  "custom_fields": { "plan": "Pro", "seats": "12" },
  "do_not_call": false,
  "created_timestamp": 1760850000000,
  "last_modification_timestamp": 1760850000000
}
Field Type Description
contact_id string Contact ID, prefix contact_.
custom_fields object All values are strings.
created_timestamp integer Unix ms.
last_modification_timestamp integer Unix ms of the last change.

Errors#

Status When
400 Body fails validation, for example phone_number: phone_number must be E.164, e.g. +61412345678.
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request, or the caller has the read-only member role. This route needs the calls scope.
409 A contact with <phone_number> already exists.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.

Retell compatibility#

Same path and method as Retell. The response shape differs: Tried returns email and last_modification_timestamp, and keeps contact memory on Get contact memory instead of in the contact body.