Contacts API

Create and delete contacts via the API.

Create or Update Contact

Creates a new contact or updates an existing one if the email already exists.

POST /api/v1/contacts

Request Body

Field
Type
Required
Description

email

string

Yes

Email address (used as identifier)

externalId

string

No

Your unique identifier (defaults to email if not provided)

name

string

No

Display name

phone

string

No

Phone number

avatarUrl

string

No

Profile image URL

role

string

No

User role (e.g., "admin", "member")

plan

string

No

Subscription plan

signedUpAt

string

No

ISO 8601 date when user signed up

customAttributes

object

No

Custom attributes

Example Request

curl -X POST https://app.cueflow.so/api/v1/contacts \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "externalId": "user-123",
    "name": "Jane Smith",
    "plan": "pro",
    "role": "admin",
    "signedUpAt": "2024-01-15T10:30:00Z",
    "customAttributes": {
      "company": "Acme Inc",
      "teamSize": 50,
      "isEnterprise": true
    }
  }'

Response

Status Codes

Code
Description

201

Contact created

200

Contact updated (already existed)

400

Invalid request body

401

Unauthorized


Delete Contact

Permanently delete a contact and all associated data.

Path Parameters

Parameter
Description

identifier

Email address or externalId of the contact

Example Request

Response

Status Codes

Code
Description

200

Contact deleted

401

Unauthorized

404

Contact not found


Custom Attributes

Custom attributes allow you to store any additional data about your contacts.

Setting Attributes

Include attributes in the customAttributes object:

Attribute Types

Type
Example

Text

"company": "Acme Inc"

Number

"teamSize": 50

Boolean

"isEnterprise": true

Custom attributes must be pre-defined in your workspace's Data > Attributes settings before they can be used.


Code Examples

Node.js

Python

PHP

Last updated