Skip to main content

Contacts API

Get Contact

GET /v1/contacts/{contactId}

Request:

curl -s "https://api.squawkpipe.ai/v1/contacts/{contactId}" \
-H "Authorization: Bearer $SQUAWK_API_KEY"

Response 200 OK:

{
"contactId": "contact_001",
"fullName": "Sarah Chen",
"email": "sarah@example.com",
"phone": "+447700900123",
"agentMuted": false,
"notes": []
}

Get Contact by Conversation

GET /v1/conversations/{conversationId}/contact

Request:

curl -s "https://api.squawkpipe.ai/v1/conversations/conv_abc123/contact" \
-H "Authorization: Bearer $SQUAWK_API_KEY"

Returns the same contact object as Get Contact.


Update Contact

PATCH /v1/contacts/{contactId}

All fields are optional — only include the fields you want to update.

Request body:

{
"firstName": "Sarah",
"lastName": "Chen",
"email": "sarah@example.com"
}

Request:

curl -X PATCH "https://api.squawkpipe.ai/v1/contacts/{contactId}" \
-H "Authorization: Bearer $SQUAWK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"firstName":"Sarah","lastName":"Chen","email":"sarah@example.com"}'

Response 200 OK: Returns the updated contact object.


Add Contact Note

POST /v1/contacts/{contactId}/notes

Notes are visible to supervisors only. They appear in the contact panel and are included in conversation context passed to AI agents.

Request body:

{
"body": "VIP customer — escalate all issues"
}

Request:

curl -X POST "https://api.squawkpipe.ai/v1/contacts/{contactId}/notes" \
-H "Authorization: Bearer $SQUAWK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"VIP customer — escalate all issues"}'

Response 201 Created:

{
"noteId": "note_001",
"body": "VIP customer — escalate all issues",
"createdAt": "2026-04-05T14:00:00Z"
}

Delete Contact Note

DELETE /v1/contacts/{contactId}/notes/{noteId}

The requesting user must be either the note creator or a tenant admin.

Request:

curl -X DELETE "https://api.squawkpipe.ai/v1/contacts/{contactId}/notes/{noteId}" \
-H "Authorization: Bearer $SQUAWK_API_KEY"

Response 204 No Content