Skip to main content
POST

Authorizations

Authorization
string
header
required

The API key of the organization, in the Authorization: Bearer <key> header. The key starts with qx_.

Headers

Idempotency-Key
string

A unique value that your system creates for each write, such as a UUID. A repeated call with the same value and the same content gets the first response, and the API writes nothing new. The API keeps the response for 24 hours.

Required string length: 1 - 255

Body

application/json
pack_id
string
required

The id of the pack of the collection. The pack must be active.

Example:

"pck_12"

contact_id
string

The id of the contact of the collection. Send the contact_id or the tax_id, only one of the two.

Example:

"com_12"

tax_id
string

The CPF or the CNPJ of the collection's contact, with or without punctuation. Send the contact_id or the tax_id, only one of the two.

Example:

"12.345.678/0001-95"

recipient
object

The recipient of a collection without a contact. The recipient gets the invitation and identifies themselves on the portal with the CPF or the CNPJ. Send the recipient only when the call has no contact_id and no tax_id.

send_invitation
boolean
default:false

With true, QX creates the invitation and sends the contact an email with the portal link. The value applies only to a collection with a contact. On a collection without a contact, QX always sends the invitation to the recipient.

Response

The new collection, with the documents.

A collection, with the list of documents.

id
string
required

The id of the collection.

Pattern: ^col_[1-9][0-9]*$
Example:

"col_40"

protocol
string
required

The protocol of the collection.

Example:

"DOC-2026-00123"

state
enum<string>
required

The state of the collection. assembling: the collection is in assembly and waits for the documents. reviewing: the operator reviews the documents. ready_to_dispatch: every required document arrived, and no validation blocks the collection. awaiting_partner: the operator sent the collection to the partner. cancelled: the operator canceled the collection.

Available options:
assembling,
reviewing,
ready_to_dispatch,
awaiting_partner,
cancelled
discarded
boolean
required

With true, the collection is archived.

contact
object | null
required

The contact of the collection. The value is null on a collection without a contact, until the recipient identifies themselves.

recipient
object | null
required

The recipient of a collection created without a contact. On a collection created with a contact, the value is null.

packs
object[]
required

The packs that the collection asks for.

numbers
string[]
required

The operation numbers, as the collection screen shows them. The list includes the numbers printed on the documents of the identifier requirements of the pack. Without these numbers, the list includes the numbers printed on the other documents of the collection. On a collection without an operation pack, the list is empty.

Example:
created_at
string<date-time>
required

The date and the time of the creation, in the time zone of the organization.

Example:

"2026-09-25T10:30:00.000-03:00"

ready_at
string<date-time> | null
required

The date and the time when the collection last became ready, in the time zone of the organization. The value is null when the collection never became ready.

documents
object[]
required

The documents of the collection, from the oldest to the newest. The list does not include a discarded document.