Create Asynchronous Export Job

POST /api/v1/exports

Initiates an asynchronous job to export chat data (chats, messages, or all) in JSON or CSV format for the user's organization.

application/json

Body Required

Export parameters (format, type)

  • format string Required

    Values are json or csv.

  • type string Required

    Values are chats, messages, or all.

Responses

  • 202 application/json

    export_id: uint64, status: domain.ExportStatus, message: string

    Additional properties are allowed.

  • 400 application/json

    Invalid request data (format/type)

    Hide response attribute Show response attribute object
    • * string Additional properties
  • 401 application/json

    Unauthorized (JWT invalid/missing, Org or User ID not found)

    Hide response attribute Show response attribute object
    • * string Additional properties
  • 500 application/json

    Failed to create export job

    Hide response attribute Show response attribute object
    • * string Additional properties
POST /api/v1/exports
curl \
 --request POST 'http://api.example.com/api/v1/exports' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"format":"json","type":"chats"}'
Request examples
{
  "format": "json",
  "type": "chats"
}
Response examples (202)
{}
Response examples (400)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
Response examples (401)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}
Response examples (500)
{
  "additionalProperty1": "string",
  "additionalProperty2": "string"
}