Reports & Analytics
Export leads.
Changed onExports lead information captured from conversations, including email addresses, names, and any custom fields collected. Use this to sync leads with your CRM or marketing tools.
get/api/v1/projects/{projectId}/reports/leads
Request
- Base URLhttps://app.customgpt.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
projectIdinteger required
Example:1
The ID of the project to get leads export for
Query parameters
start_datestring date-time
Start date for the export range (ISO 8601 format)
end_datestring date-time
End date for the export range (ISO 8601 format)
pageinteger
Page number to return.
limitinteger
Number of lead records to return per page. Maximum is 100.
session_idstring
Filter leads to a specific conversation by its session_id. When omitted, leads from all conversations in the project are returned. When the session_id does not match a conversation in this project the response is empty.
Response
Project leads export data
Example response
{
"status": "success",
"data": {
"current_page": 1,
"data": [
{
"session_id": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002"
}
],
"first_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"next_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"path": "https://app.customgpt.ai/api/v1/users?page=1",
"per_page": 10,
"prev_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
"to": 1,
"total": 1
}
}Changes
- info
endpoint added
- info