v1
latestOpenAPI 3.1.02026-07-24111290748.0 KBJobs
Create a job
Create a job and schedule its execution. Jobs are processed asynchronously, meaning that once a job is created, it will run in background on Gorgias's servers. According to the type and size of the task, a job can take a few minutes or several hours to be executed. You can use our API to check the status of the job.
post/api/jobs
Request body
Example request
{
"meta": {
"description": "This job closes all tickets created in 2018"
},
"params": {
"ticket_ids": [
1,
2,
3
],
"updates": {
"status": "open"
}
},
"scheduled_datetime": "2019-11-23T16:30:00.966927",
"type": "updateTicket"
}Response
The created job.
Example response
{
"id": 1234,
"cancel_requested_datetime": "2019-11-23T16:31:00.966927",
"cancelled_datetime": "2019-11-23T16:32:00.966927",
"created_datetime": "2019-11-23T16:00:00.966927",
"ended_datetime": "2019-11-23T16:32:00.966927",
"failed_datetime": "2019-11-23T15:59:41.966927",
"info": {
"progress_count": 123
},
"locked_datetime": "2019-11-23T16:30:01.966927",
"meta": {
"description": "This job closes all tickets created in 2018"
},
"params": {
"ticket_ids": [
1,
2,
3
],
"updates": {
"status": "open"
}
},
"scheduled_datetime": "2019-11-23T16:30:00.966927",
"started_datetime": "2019-11-23T16:30:01.966927",
"status": "canceled",
"type": "updateTicket",
"user_id": 42
}