Skip to content

Chat Endpoints

Chat endpoints require the chat scope. Conversations are between game owners and playtesters who have interacted through accepted playtests.

GET /api/v1/chat/contacts

Scope: chat

Returns your chat contacts. The response shape varies by role.

{
"data": {
"contacts": [
{
"id": "playtester-uuid",
"displayName": "TestGamer42",
"chatMode": "free",
"isUnlocked": true,
"unreadCount": 2,
"lastMessageAt": "2026-03-01T16:00:00.000Z",
"lastMessagePreview": "Thanks for the great playtest!",
"conversationId": "conv-uuid"
}
]
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2026-03-02T12:00:00.000Z"
}
}
{
"data": {
"contacts": [
{
"id": "game-owner-uuid",
"displayName": "Indie Dev Studio",
"companyName": "Indie Dev Studio",
"isUnlocked": true,
"unreadCount": 0,
"lastMessageAt": "2026-03-01T16:00:00.000Z",
"lastMessagePreview": "Thanks for the great playtest!",
"conversationId": "conv-uuid"
}
],
"chatDisabled": false
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2026-03-02T12:00:00.000Z"
}
}

Contacts are sorted by most recent message first. conversationId is null if no conversation exists yet. For playtesters, chatDisabled indicates whether their chat is disabled.


GET /api/v1/chat/conversations/:id

Scope: chat

Returns messages in a conversation. The :id parameter is the conversation UUID (not a user ID).

ParameterTypeDefaultDescription
limitinteger20Max 100
cursorstringPagination cursor
{
"data": {
"messages": [
{
"id": "msg-uuid",
"senderType": "game_owner",
"senderId": "go-uuid",
"content": "Thanks for the great playtest!",
"readAt": null,
"createdAt": "2026-03-01T16:00:00.000Z"
},
{
"id": "msg-uuid-2",
"senderType": "playtester",
"senderId": "pt-uuid",
"content": "Happy to help! Let me know if you need more testing.",
"readAt": "2026-03-01T16:10:00.000Z",
"createdAt": "2026-03-01T16:05:00.000Z"
}
],
"isBlocked": false
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2026-03-02T12:00:00.000Z",
"cursor": "eyJpZCI6ImFiYzEyMyJ9",
"hasMore": false
}
}

Messages are returned in chronological order (oldest first). isBlocked is true if you have blocked this contact.


POST /api/v1/chat/conversations/:id/messages

Scope: chat

The :id parameter is the conversation UUID.

FieldTypeRequiredDescription
contentstringYesMessage text (max 5000 chars)
Terminal window
curl -X POST https://app.weplaytestgames.com/api/v1/chat/conversations/conv-uuid/messages \
-H "Authorization: Bearer wpg_sk_..." \
-H "Content-Type: application/json" \
-d '{"content": "Thanks for the feedback!"}'
{
"data": {
"message": {
"id": "msg-uuid",
"conversationId": "conv-uuid",
"senderType": "game_owner",
"senderId": "go-uuid",
"content": "Thanks for the feedback!",
"readAt": null,
"createdAt": "2026-03-02T12:00:00.000Z"
}
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2026-03-02T12:00:00.000Z"
}
}

GET /api/v1/chat/unread-count

Scope: chat

{
"data": {
"unreadCount": 3
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2026-03-02T12:00:00.000Z"
}
}