Skip to main content
POST
/
contacts
Create or update a contact
curl --request POST \
  --url https://app.getaptly.com/api/contacts \
  --header 'Content-Type: application/json' \
  --header 'x-token: <x-token>' \
  --data '
{
  "name": "Jane Smith",
  "_id": "JShpBxEFgRmZnivTf",
  "email": "jane@example.com"
}
'
{
  "_id": "JShpBxEFgRmZnivTf",
  "name": "Jane Smith",
  "email": "jane@example.com"
}

Headers

x-token
string
required

Your Aptly API Token. Available in the Aptly UI under Card Sources > API.

Body

application/json
name
string
required

The name of the contact.

Example:

"Jane Smith"

_id
string

If provided, updates the existing contact with this ID.

Example:

"JShpBxEFgRmZnivTf"

email
string<email>

The email of the contact.

Example:

"jane@example.com"

{key}
string

Response

Contact created or updated

_id
string
Example:

"JShpBxEFgRmZnivTf"

name
string
Example:

"Jane Smith"

email
string<email>
Example:

"jane@example.com"