Skip to main content
POST
/
public-api
/
contacts
Create a new contact
curl --request POST \
  --url https://agents.nineteen58.co.za/public-api/contacts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "identifier": "1234567890",
  "name": "John Doe",
  "channel": "whatsapp",
  "email": "john.doe@example.com",
  "personal_context": "Met at Tech Conference 2024",
  "notes": "Interested in AI solutions",
  "relevant_information": "Prefers communication in the morning"
}'
{
  "message": "Contact created successfully",
  "contact_id": "123e4567-e89b-12d3-a456-426614174000"
}

Authorizations

x-api-key
string
header
required

Headers

x-api-key
string
required

API key for authentication

Body

application/json
identifier
string
required

Unique identifier for the contact (phone number for WhatsApp, email for email channel)

Example:

"1234567890"

name
string
required

Contact's full name

Example:

"John Doe"

channel
enum<string>
required

Communication channel

Available options:
whatsapp,
email
Example:

"whatsapp"

email
string<email>

Contact's email address

Example:

"john.doe@example.com"

personal_context
string

Personal context or background information about the contact

Example:

"Met at Tech Conference 2024"

notes
string

Additional notes or comments about the contact

Example:

"Interested in AI solutions"

relevant_information
string

Any other relevant information about the contact

Example:

"Prefers communication in the morning"

Response

Contact created successfully

message
string
Example:

"Contact created successfully"

contact_id
string<uuid>
Example:

"123e4567-e89b-12d3-a456-426614174000"