Developers
Integrate with one call.
POST https://api.nexotrace.com.br/api/live/callback/{trackingId} X-Player-Key: pk_mesa_comercial_3f9a1c0b7d2e X-Block-Key: bk_live_9f8e7d6c5b4a3928 { "status": "completed", "data": { "contract": "CCB-004812" } }
Before you start
Whoever designed the flow hands the teams their participant and block credentials. And each operation has its Tracking ID.
- Block ID
- BLK-A1B2C3
- Public. Identifies the block in reports.
- X-Player-Key
- pk_mesa_comercial_3f9a1c0b7d2e4a6f8b1c5d90
- Secret. The participant credential. It goes in the X-Player-Key header.
- X-Block-Key
- bk_live_9f8e7d6c5b4a3928
- Secret. The block credential. It goes in the X-Block-Key header.
- Callback URL
- /api/live/callback/{trackingId}
- Where your system sends the POST, with the Tracking ID in the address.
- Tracking ID
- NT-2026-A3K7QX
- Identifies the operation; generated when it starts. It goes in the callback address.
The track, step by step
- 01
Get your credentials
Your participant’s X-Player-Key and, for each block, the X-Block-Key and the callback URL. Every call carries both keys.
- 02
Keep the key secret
In a vault or a server environment variable.
- 03
Carry the Tracking ID along
Generated when the operation opens. It must reach your system with the work; without it, the callback is refused.
- 04
Send the callback when the step moves
started and progress are optional; at the end, completed or failed. In a decision, send the outcome.
- 05
Check the response and the board
The response brings the new status. Every company’s board updates right away.
Callback
One call per step event, with the Tracking ID in the address. JSON body and response.
POSThttps://api.nexotrace.com.br/api/live/callback/{trackingId}
| Header | Value |
|---|---|
| Content-Type | application/json |
| X-Player-Key | The participant key. Required. |
| X-Block-Key | The block key. Required. |
Body
| Field | Required | What it is |
|---|---|---|
| status | no | started, progress, completed or failed. Default: completed. |
| outcome | in decisions | The label of one of the block’s exits. |
| data | no | JSON object with what the step received or delivered. Goes into the trail and the spreadsheet. |
| message | no | Text of the trail line. Without it, Nexo Trace writes one. |
| source | no | Where the event came from: api (default) or ui. Shown in the trail. |
Status
- started
Block running; data becomes input.
- progress
Partial update; may repeat.
- completed
Block done; data becomes output and the flow moves on to the next block.
- failed
Block fails and the operation ends.
Response
200 with the state after the callback. Every response carries X-Tracking-Id and X-Request-Id, the call number in the log.
{
"trackingId": "NT-2026-A3K7QX",
"blockRef": "BLK-A1B2C3",
"stepStatus": "done",
"operationStatus": "running",
"eventSequence": 7
}Decision blocks
completed requires an outcome equal to the label of one of the exits. Without it, or with one that does not exist: 400 with the options.
{
"status": "completed",
"outcome": "Approved"
}The two keys
X-Block-Key
Says which step moves. Valid only for that block, and it does not change when the flow is edited.
X-Player-Key
Says who is calling. It must be the participant of the block’s lane; a block without a participant takes no calls. It is on the Participants screen, where it can be rotated.
Opening an operation
With the keys of the start block and of its participant. The start block generates the Tracking ID, which comes back in the response.
POSThttps://api.nexotrace.com.br/api/live/operations
| Header | Value |
|---|---|
| Content-Type | application/json |
| X-Player-Key | The key of the start block’s participant. |
| X-Block-Key | The start block’s key. |
Body
| Field | Required | What it is |
|---|---|---|
| description | no | Up to 280 characters. Identifies the operation in lists and reports. |
| input | if the block asks | The data the start block asks for, by each field’s name. A field it does not ask for makes the call fail with 400. |
curl -X POST https://api.nexotrace.com.br/api/live/operations \
-H "Content-Type: application/json" \
-H "X-Player-Key: $NEXOTRACE_PLAYER_KEY" \
-H "X-Block-Key: $NEXOTRACE_START_KEY" \
-d '{"description":"Proposta 4821","input":{"contract":"CCB-004812"}}'Response
201 with the Tracking ID, also in the X-Tracking-Id header.
{
"trackingId": "NT-2026-A3K7QX",
"flowId": "5f0c2a9e-7b1d-4c58-9a36-2f4e8d1b6c70",
"flowName": "Crédito consignado",
"description": "Proposta 4821",
"input": { "contract": "CCB-004812" },
"status": "running",
"startedAt": "2026-09-28T14:01:40.000Z"
}- The keys and the URL are on the start block, under credentials.
- The flow must be published; otherwise, 409 (flow_not_published or flow_archived).
- Each accepted call opens an operation and counts toward the plan limit. Retry only without a response.
- The trail is written in the Accept-Language language; without it, in Portuguese.
- Invalid data: 400 with fields. Plan limit: 402 plan_limit_reached, with nextAvailableAt.
Notice when the step goes into progress
With the outbound webhook on, Nexo Trace notifies your system when one of your participant’s steps goes into progress: a POST with the Tracking ID, the step and the data it receives. URL and secret are under Participants → Integrations.
| Header | Value |
|---|---|
| X-NexoTrace-Event | step.activated, or webhook.test in the test. |
| X-NexoTrace-Delivery | Unique id of the notice; repeated on retries. Use it to avoid processing twice. |
| X-NexoTrace-Signature | t=<Unix seconds>,v1=<HMAC-SHA256, in hex, of "t.body" with the secret>. |
| X-Tracking-Id | The operation’s Tracking ID. |
The notice
{
"id": "0b8f3c52-2d7e-4f7a-9d3a-6c1f5e2a9b10",
"event": "step.activated",
"occurredAt": "2026-09-28T14:05:12.000Z",
"trackingId": "NT-2026-A3K7QX",
"operation": {
"flowName": "Crédito consignado",
"description": "Proposta 4821",
"startedAt": "2026-09-28T14:01:40.000Z"
},
"step": {
"blockRef": "BLK-A1B2C3",
"label": "Análise de crédito",
"kind": "task",
"activatedAt": "2026-09-28T14:05:12.000Z",
"dueAt": "2026-09-28T16:05:12.000Z"
},
"input": { "cliente": "Ana Lima" },
"callback": { "url": "https://api.nexotrace.com.br/api/live/callback/NT-2026-A3K7QX", "blockRef": "BLK-A1B2C3" }
}Checking the signature
HMAC-SHA256 of "t.body" with the secret, compared with v1 in constant time. Reject t older than 5 minutes.
import crypto from 'node:crypto'
// corpo: o texto do corpo exatamente como chegou; assinatura: o header X-NexoTrace-Signature.
function avisoValido(corpo, assinatura, segredo) {
const partes = Object.fromEntries(assinatura.split(',').map((p) => p.split('=')))
const esperado = crypto.createHmac('sha256', segredo).update(`${partes.t}.${corpo}`).digest('hex')
const recente = Math.abs(Date.now() / 1000 - Number(partes.t)) < 300
return recente && esperado.length === partes.v1?.length &&
crypto.timingSafeEqual(Buffer.from(esperado), Buffer.from(partes.v1))
}- Answer 2xx within 10 seconds. Otherwise, retries at 1, 5, 25 and 125 minutes.
- No redirects; only public https addresses.
- Notices come from IP 157.254.207.182: allow it if your system restricts addresses.
- A step that already moved through another channel generates no notice.
- The notice does not carry the keys. To answer, use callback.url, which already carries the Tracking ID.
Inbound webhook, in your system’s format
If your system already fires webhooks in its own format, create an inbound webhook (Participants → Integrations) mapping where each thing is in the JSON. The URL carries a token and is shown once.
| Field | What it is |
|---|---|
| trackingId | Path to the Tracking ID. Required. E.g.: $.order.trackingId |
| nodeKey / nodeKeyPath | The block: fixed or a path in the JSON (accepts the BLK-… ID). |
| status + statusMap | Path to the status and its translation to started, progress, completed or failed. Without it, the notice completes the step. |
| outcome | Path to the result, in a decision block. |
| data | Path to the object with the step data ($ is the whole body). |
| message | Path to the text of the trail line. |
Mapping and notice
{
"trackingId": "$.pedido.ref",
"nodeKey": "analise",
"status": "$.situacao",
"statusMap": { "APROVADO": "completed", "EM_ANALISE": "progress", "RECUSADO": "failed" },
"data": "$.pedido"
}POST https://api.nexotrace.com.br/api/hooks/wh_…
Content-Type: application/json
{ "situacao": "APROVADO", "pedido": { "ref": "NT-2026-A3K7QX", "contrato": "CCB-004812" } }Same response as the callback. A notice that does not fit the mapping: 400 with the missing field. The URL only reaches its participant’s blocks; deleted or deactivated, 401.
MCP server for AI
AI assistants that speak MCP (Claude Code, Cursor, VS Code) use Nexo Trace through this server, with the API’s rules. HTTP transport; credential in Authorization: Bearer. What the AI reaches depends on the credential:
https://mcp.nexotrace.com.br/mcp
pk_…
Participant key: the steps waiting for it and the progress of its blocks.
bk_live_…
Block key: only that block.
nt_pat_…
Personal token, created in AI access: the coordinator’s AI, with the person’s access. Expires within 365 days and can be revoked.
| Tool | Credential | What it is |
|---|---|---|
| list_pending_steps | key or token | Waiting steps, with Tracking ID, block and deadline. |
| get_step | key or token | One step: what the block expects, the input fields with values, the output fields and, in a decision, the results. |
| report_step | key | Reports progress, like the callback. |
| list_flows | token | Published flows, with the data the start block asks for. |
| get_flow | token | One flow: lanes, blocks and connections. |
| list_operations | token | Operations, newest first, with filters and search. |
| get_operation | token | One operation: steps and the latest trail lines. |
| list_participants | token | The account’s participants, with roles and how many flows they appear in. |
| open_operation | token | Opens an operation in a published flow. Requires edit access and respects the plan limit. |
Connect
In Claude Code, one command; in other clients, a JSON. Keep the credential secret.
claude mcp add --transport http nexotrace https://mcp.nexotrace.com.br/mcp \ --header "Authorization: Bearer $NEXOTRACE_TOKEN"
{
"mcpServers": {
"nexotrace": {
"type": "http",
"url": "https://mcp.nexotrace.com.br/mcp",
"headers": { "Authorization": "Bearer pk_…" }
}
}
}- report_step only moves a waiting step. The trail records source: mcp.
- The participant’s AI only sees what is theirs and what reaches them.
- The personal token does not report steps or open the rest of the API.
- create_flow, update_flow, create_participant and update_participant belong only to the assistant inside Nexo Trace.
- Anything the credential does not reach answers as not found.
- Tool descriptions in English; messages in the Accept-Language language.
Errors
Every error answers { "error": "…", "trackingId": "…" }, with a sentence in the Accept-Language language (pt-BR, en or es).
| Status | When |
|---|---|
| 400 | Invalid status; decision without a valid outcome; operation closed. When opening: invalid data or a long description. |
| 401 | A key is missing; invalid key; participant deactivated. |
| 402 | When opening: the plan’s operation limit. |
| 403 | The keys do not match (keys_mismatch) or the block has no participant (block_without_participant). When opening: the X-Block-Key is not the start block’s. |
| 404 | The operation does not exist or is not in the block’s flow. |
| 409 | When opening: flow in draft or archived. |
| 429 | More than 600 calls per minute with the same key (120 on MCP) or 1,200 from the same IP. Wait for Retry-After. |
Examples
The same callback in four languages.
curl -X POST https://api.nexotrace.com.br/api/live/callback/NT-2026-A3K7QX \
-H "Content-Type: application/json" \
-H "X-Player-Key: $NEXOTRACE_PLAYER_KEY" \
-H "X-Block-Key: $NEXOTRACE_BLOCK_KEY" \
-d '{"status":"completed","data":{"contract":"CCB-004812"}}'Good practices
- Retry only without a response (network or 5xx): a retry records another event.
- Keep the X-Request-Id: with it, any call can be found in the log.
- Send in data only what the operation needs to prove: it goes into the trail and the reports.
- Wait for the response before the next event of the same block: the trail follows arrival order.