{ "opencollection": "1.0.0", "info": { "name": "Gladly Agents Export API", "version": "1.0" }, "request": { "auth": { "type": "basic", "username": "{{username}}", "password": "{{password}}" } }, "items": [ { "info": { "name": "Export", "type": "folder" }, "items": [ { "info": { "name": "List Schedules", "type": "http" }, "http": { "method": "GET", "url": "https://{organization}.gladly.com/api/v1/api/v1/export/schedules" }, "docs": "List all schedules. Currently, only one schedule can be configured per organization. The schedule will generate recurring data export jobs with an hourly or daily frequency. By default, each organization has a daily export job configured. To change the job frequency, please contact Gladly Support.\n\nHourly schedules generate new jobs on a roughly two hour lag after the `nextStartAt` time. For example, for an hourly schedule with a `nextStartAt` equal to `2019-01-21T08:00:00.00Z`, the next job wil" }, { "info": { "name": "List Jobs", "type": "http" }, "http": { "method": "GET", "url": "https://{organization}.gladly.com/api/v1/api/v1/export/jobs", "params": [ { "name": "status", "value": "", "type": "query", "description": "export job status to search on." }, { "name": "startAt", "value": "", "type": "query", "description": "Starting time to filter export jobs by. This is based on the `updatedAt` field which indicates when the job was last updated. Cannot be more than 14 days ago. Default is 14 days ago.\n\nThe date should be in ISO 8601 format.\n" }, { "name": "endAt", "value": "", "type": "query", "description": "Ending time to filter export jobs by. This is based on the `updatedAt` field which indicates when the job was last updated. Cannot be before 'startAt' or in the future. Default is now.\n\nThe date should be in ISO 8601 format.\n" } ] }, "docs": "List all jobs for the organization in any status for the last 14 days. \n```\n/api/v1/export/jobs\n```\n\nYou can further filter the results by including query parameters for `status`, `startAt`, and `endAt`.\n```\n/api/v1/export/jobs?status=COMPLETED&startAt=2024-09-15T00:00:00.000Z&endAt=2024-09-16T00:00:00.000Z\n```\n" }, { "info": { "name": "Get Job", "type": "http" }, "http": { "method": "GET", "url": "https://{organization}.gladly.com/api/v1/api/v1/export/jobs/:jobId", "params": [ { "name": "jobId", "value": "", "type": "path", "description": "id of the job" } ] }, "docs": "Get a job by unique id.\n" }, { "info": { "name": "Delete Job", "type": "http" }, "http": { "method": "DELETE", "url": "https://{organization}.gladly.com/api/v1/api/v1/export/jobs/:jobId", "params": [ { "name": "jobId", "value": "", "type": "path", "description": "id of the job" } ] }, "docs": "Delete a job and all associated files. *Note*: job status must be `COMPLETED` or `FAILED` to be deleted.\n" }, { "info": { "name": "Get File", "type": "http" }, "http": { "method": "GET", "url": "https://{organization}.gladly.com/api/v1/api/v1/export/jobs/:jobId/files/:filename", "params": [ { "name": "jobId", "value": "", "type": "path", "description": "id of the job" }, { "name": "filename", "value": "", "type": "path", "description": "name of the file" } ] }, "docs": "Download a file generated by a data export job.\nFilenames can be found from an export [job's](index.html#operation/getJob) `files` field.\n\nFiles are returned in `.jsonl` format where each line is a `json` object representing an element from the array of data. Please note that, in rare cases, conversation items with invalid attributes may be excluded from the data export. For example:\n- An email message that was undelivered due to an invalid recipient email address\n- EMAIL / SMS auto-replies sent" } ] } ], "bundled": true }