curl --request POST \
--url https://app.useqx.com/api/v1/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pack_id": "pck_12",
"contact_id": "com_12"
}
'{
"id": "col_40",
"protocol": "DOC-2026-00123",
"state": "assembling",
"discarded": false,
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"recipient": null,
"packs": [
{
"id": "pck_12",
"name": "Importação marítima"
}
],
"numbers": [],
"created_at": "2026-09-25T10:31:12.000-03:00",
"ready_at": null,
"documents": [
{
"id": "doc_310",
"document_type": {
"id": "dtp_31",
"name": "Fatura Comercial (Commercial Invoice)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_311",
"document_type": {
"id": "dtp_32",
"name": "Bill of Lading (B/L)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_312",
"document_type": {
"id": "dtp_33",
"name": "Romaneio de Carga (Packing List)"
},
"status": "pending",
"has_content": false
}
]
}Create a collection
Creates a collection with a pack. With a contact, the API creates the collection with the slots of the pack requirements. Without a contact, the API creates the collection for a recipient and sends the invitation to the email of the recipient. QX creates the slots after the recipient identifies themselves on the portal. The creation counts toward the paid write limit of the key.
curl --request POST \
--url https://app.useqx.com/api/v1/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pack_id": "pck_12",
"contact_id": "com_12"
}
'{
"id": "col_40",
"protocol": "DOC-2026-00123",
"state": "assembling",
"discarded": false,
"contact": {
"id": "com_12",
"type": "company",
"name": "Importadora Exemplo Ltda"
},
"recipient": null,
"packs": [
{
"id": "pck_12",
"name": "Importação marítima"
}
],
"numbers": [],
"created_at": "2026-09-25T10:31:12.000-03:00",
"ready_at": null,
"documents": [
{
"id": "doc_310",
"document_type": {
"id": "dtp_31",
"name": "Fatura Comercial (Commercial Invoice)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_311",
"document_type": {
"id": "dtp_32",
"name": "Bill of Lading (B/L)"
},
"status": "pending",
"has_content": false
},
{
"id": "doc_312",
"document_type": {
"id": "dtp_33",
"name": "Romaneio de Carga (Packing List)"
},
"status": "pending",
"has_content": false
}
]
}Authorizations
The API key of the organization, in the Authorization: Bearer <key> header. The key starts with qx_.
Headers
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.
1 - 255Body
The id of the pack of the collection. The pack must be active.
"pck_12"
The id of the contact of the collection. Send the contact_id or the tax_id, only one of the two.
"com_12"
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.
"12.345.678/0001-95"
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.
Show child attributes
Show child attributes
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.
The id of the collection.
^col_[1-9][0-9]*$"col_40"
The protocol of the collection.
"DOC-2026-00123"
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.
assembling, reviewing, ready_to_dispatch, awaiting_partner, cancelled With true, the collection is archived.
The contact of the collection. The value is null on a collection without a contact, until the recipient identifies themselves.
Show child attributes
Show child attributes
The recipient of a collection created without a contact. On a collection created with a contact, the value is null.
Show child attributes
Show child attributes
The packs that the collection asks for.
Show child attributes
Show child attributes
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.
["INV-81244/2026"]
The date and the time of the creation, in the time zone of the organization.
"2026-09-25T10:30:00.000-03:00"
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.
The documents of the collection, from the oldest to the newest. The list does not include a discarded document.
Show child attributes
Show child attributes