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/contactsRequest Body
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
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
identifier
Email address or externalId of the contact
Example Request
Response
Status Codes
200
Contact deleted
401
Unauthorized
404
Contact not found
Deleting a contact removes all associated data including events, message interactions, and feedback responses. This action cannot be undone.
Custom Attributes
Custom attributes allow you to store any additional data about your contacts.
Setting Attributes
Include attributes in the customAttributes object:
Attribute Types
Text
"company": "Acme Inc"
Number
"teamSize": 50
Boolean
"isEnterprise": true
Code Examples
Node.js
Python
PHP
Last updated