Api

Task

The tasks object in the MarkupGo API represents the result of an API activity triggered by generating documents or images.

Endpoints

GET /tasks

The tasks object in the MarkupGo API represents the result of an API activity triggered by generating documents or images. Tasks are created after calling the /pdf or /image endpoints. You can also see the list in activity tab in the dashboard.

Query Parameters

KeyDescriptionDefault
limitThe number of tasks to return.10
pageThe page number to return.1

Response

The response contains an array of tasks and a meta object with pagination information.

KeyDescription
idThe unique identifier of the task.
urlThe URL of the generated document or image.
formatThe format of the generated document or image.
sizeThe size of the generated document or image in bytes.
widthThe width of the generated document or image in pixels.
heightThe height of the generated document or image in pixels.
createdAtThe date and time the task was created.
updatedAtThe date and time the task was last updated.
GET /tasks
Request
curl -X GET "api/v1/tasks?limit=10&page=1"
Response
{
  "data": [
    {
      "id": "task_12345",
      "url": "https://files.markupgo.com/task_12345.pdf",
      "format": "pdf",
      "size": 1048576,
      "width": 210,
      "height": 297,
      "createdAt": "2023-06-21T10:00:00Z",
      "updatedAt": "2023-06-21T10:05:00Z"
    },
  ],
  "meta": {
    "total": 2,
    "skip": 0,
    "limit": 10
  }
}