Contacts

Create Contact

Save a contact to an agent's contact list.

Each agent has its own contact list. Store who someone is (name), why the agent deals with them (label, e.g. "dentist", "landlord", "customer") and their phone number in E.164 format. Use list_contacts to look a number up before a call, or to find who an inbound caller is.

A phone number can appear once per agent; saving it again returns HTTP 409 with the existing contact_id, so update that contact instead.

post/v1/agents/{agent_id}/contacts

Request

  • Base URL: https://api.agentline.cloud
  • URL: https://api.agentline.cloud/v1/agents/{agent_id}/contacts
  • Auth: HTTP bearer

Path parameters

agent_idstring required

ID (agt_...) of the agent whose contact list to use, from create_agent or list_agents.

Request body

namestring required

Who this is, e.g. 'Dr. Patel' or 'Joe's Plumbing'

phone_numberstring required

The contact's phone number with a leading + and country code, e.g. '+12125551234'. Spaces, dashes, dots and parentheses are removed before saving; a number without a country code is rejected.

labelstring nullable

Why the agent deals with this person, e.g. 'dentist', 'landlord', 'customer', 'Mom'. list_contacts can filter by it. Omit for no label.

Response

Successful Response

idstring required

Unique contact identifier (e.g. 'con_abc123')

agent_idstring required

Agent whose contact list this entry belongs to

namestring required

Contact name

labelstring nullable

Purpose or relationship

phone_numberstring required

Phone number in E.164 format

created_atstring date-time required

When the contact was saved

updated_atstring date-time required

When the contact was last changed

Changes

No recorded changes to this operation across all 1 revision of this API.