# custom_objects.record_jobs_list

Listar tarefas de registros de um objeto. As últimas 50 tarefas (exportações, importações e ações em massa) do objeto, da mais nova para a mais antiga. `kind` filtra.

- Endpoint: `POST https://app.atomiks.com.br/api/v1/custom_objects.record_jobs_list` (corpo JSON)
- Quem pode chamar: membro da conta
- Escopo da chave: `crm:read`
- Grava dados: não
- Pela chave de API: sim
- Ferramenta MCP: `custom_objects_record_jobs_list`
- Ficha em JSON: `https://app.atomiks.com.br/api/v1/openapi.json` (operationId `custom_objects.record_jobs_list`)

## Entrada

| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
| `objectId` | string (uuid) | sim |  |
| `kind` | "bulk_update" \| "bulk_delete" \| "export" \| "import" | não |  |

<details><summary>JSON Schema</summary>

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "objectId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "kind": {
      "type": "string",
      "enum": [
        "bulk_update",
        "bulk_delete",
        "export",
        "import"
      ]
    }
  },
  "required": [
    "objectId"
  ]
}
```

</details>

## Exemplo

```bash
curl -X POST https://app.atomiks.com.br/api/v1/custom_objects.record_jobs_list \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"objectId":"00000000-0000-0000-0000-000000000000"}'
```

CLI:

```bash
node cli/atomiks.mjs custom_objects.record_jobs_list --json '{"objectId":"00000000-0000-0000-0000-000000000000"}'
```

MCP: ferramenta `custom_objects_record_jobs_list` com a mesma entrada.

## Saída

Sucesso: `{"data": ...}` com o formato abaixo.

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "bulk_update",
              "bulk_delete",
              "export",
              "import"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "waiting",
              "active",
              "completed",
              "failed"
            ]
          },
          "progress": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "affected": {
            "type": [
              "number",
              "null"
            ]
          },
          "fileName": {
            "type": [
              "string",
              "null"
            ]
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "csv": {
            "type": [
              "string",
              "null"
            ]
          },
          "meta": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "failedReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "finishedAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "state",
          "progress",
          "total",
          "affected",
          "fileName",
          "downloadUrl",
          "csv",
          "meta",
          "failedReason",
          "createdAt",
          "finishedAt"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "items"
  ],
  "additionalProperties": false
}
```

## Erros

`{"error": {"code", "message", "requestId"}}`. Códigos: `invalid_input` (400), `unauthorized` (401), `forbidden` / `account_pending` / `scope_missing` (403), `not_found` (404), `limit_reached` (409), `internal` (500).
