Chat Sessions

Get Recent Chat Sessions

get
/chat-sessions/recent

Retrieve chat sessions from the past X hours across all contacts belonging to the authenticated user. Supports optional filtering by session status and message inclusion.

Authorizations
apiKeystringRequired

Your DM Champ API key. Obtain from Settings → API Keys.

Query parameters
apiKeystringOptional

API key for authentication. At least one of apiKey or userId is required for protected endpoints.

Example: your_api_key
userIdstringOptional

User ID for authentication. Alternative to apiKey. At least one of apiKey or userId is required for protected endpoints.

Example: your_user_id
hoursinteger · min: 1Required

Number of hours to look back for recent sessions

Example: 24
statusstring · enumOptional

Filter sessions by status

Possible values:
limitinteger · min: 1Optional

Maximum number of sessions to return

Default: 100
includeMessagesbooleanOptional

Whether to include messages in each session

Default: false
Responses
chevron-right
200

Recent chat sessions retrieved successfully

application/json
successbooleanOptionalExample: true
get
/chat-sessions/recent

Get Chat Sessions for Contact

get
/chat-sessions/{contactId}

Retrieve all chat sessions for a specific contact. The contact must belong to the authenticated user.

Authorizations
apiKeystringRequired

Your DM Champ API key. Obtain from Settings → API Keys.

Path parameters
contactIdstringRequired

Firestore document ID of the contact

Example: abc123xyz
Query parameters
apiKeystringOptional

API key for authentication. At least one of apiKey or userId is required for protected endpoints.

Example: your_api_key
userIdstringOptional

User ID for authentication. Alternative to apiKey. At least one of apiKey or userId is required for protected endpoints.

Example: your_user_id
statusstring · enumOptional

Filter sessions by status

Possible values:
limitinteger · min: 1Optional

Maximum number of sessions to return

Default: 100
includeMessagesbooleanOptional

Whether to include messages in each session

Default: false
Responses
chevron-right
200

Chat sessions retrieved successfully

application/json
successbooleanOptionalExample: true
get
/chat-sessions/{contactId}

Last updated

Was this helpful?