Help
GET /api/v1/chat/connections — list contacts
Retrieve all users available to chat with in the Heyzack Partner Portal. Response shape adapts to your role — partner, handyman, or admin.
Use this endpoint to get the list of users available to chat with. You do not need to pass any query parameters—the API reads your authenticated role from your Bearer token and returns the appropriate set of contacts. Partners receive their connected handymen plus the admin. Handymen receive their connected partners plus the admin. Admins receive all partners and handymen on the platform.
Endpoint
GET /api/v1/chat/connectionsAuthentication
Bearer token required. See Authentication.
Query parameters
None required. The endpoint derives your identity and role from your token.
Example
curl "https://<your-portal-domain>/api/v1/chat/connections" \
-H "Authorization: Bearer <your-token>"Response by role
The shape of the connections array varies slightly by role. Partner and admin contacts include availability_status and rating fields on handyman entries.
A handyman receives all partners they are connected to, plus the admin account.
connectionsobject[]List of contacts available to this handyman.
connection properties
idstringUnique ID of the contact (partner or admin).
namestringDisplay name of the contact.
emailstringEmail address of the contact.
imagestringProfile image URL, or null if not set.
phonestringPhone number, or null if not available.
rolestringAlways "handyman" for this role.
{
"data": {
"connections": [
{
"id": "partner_abc123",
"name": "John Doe",
"email": "john@example.com",
"image": "https://example.com/image.jpg",
"phone": "+1234567890"
},
{
"id": "partner_def456",
"name": "Jane Smith",
"email": "jane@example.com",
"image": null,
"phone": "+0987654321"
},
{
"id": "admin_xyz789",
"name": "Heyzack Admin",
"email": "admin@heyzack.ai",
"image": null,
"phone": null
}
],
"role": "handyman"
}
}Room ID format
When you open a conversation with a contact, the chat room ID is generated deterministically from the participant IDs. You will see this roomId returned in message and history responses.
| Conversation type | Room ID format | Example |
|---|---|---|
| Partner ↔ Handyman | room_{sorted_id1}_{sorted_id2} | room_partner_abc123_handyman_xyz456 |
| Admin ↔ Partner | room_admin_{partnerId} | room_admin_partner_abc123 |
| Admin ↔ Handyman | room_admin_{handymanId} | room_admin_handyman_xyz456 |
Note
For partner–handyman rooms, the two IDs are sorted alphabetically before being joined. This ensures both participants always refer to the same room regardless of which side initiates the conversation.