API v1
The Tracefix REST API lets your helpdesk, ticketing or accounting tool create interventions, read their reports and receive an event when something changes. Base URL: https://app.tracefixapp.com/api/v1/. Requests and responses are JSON (UTF-8, snake_case field names), over HTTPS only.
The API and webhooks are included in every paid plan and during the trial.
The API is meant to be called from a server: it sends no CORS headers, so a browser page cannot call it directly. Never put a key in front-end code.
Contents
- Authentication and scopes
- Conventions
- Errors
- Pagination and filters
- Idempotency
- Rate limits
- Versioning
- Endpoints
- Webhooks
- OpenAPI description
- Call log
Authentication and scopes
A company admin creates keys in Settings → Integrations & API. The full key is shown only once, when it is created: copy it into your tool's secret store. Tracefix keeps only a hash of it; the page shows the start of the key, its scopes and when it was last used. Keys start with trf_live_.
Send the key in the Authorization header of every request:
Authorization: Bearer trf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Each key has scopes. Give a key only what the connected tool needs. A request outside the key's scopes gets a 403.
| Scope | Allows |
|---|---|
interventions:read | List and read interventions. |
interventions:write | Create, cancel and comment on interventions. |
customers:read | List and read customers and their sites. |
customers:write | Create customers. |
equipment:read | List equipment. |
invoices:read | List and read your company's Tracefix subscription invoices and their credit notes. |
webhooks:read | Reserved for a future endpoint; it grants nothing today. |
When you create a key, every read scope and interventions:write are selected by default. A key can be revoked from the same page at any time; it is refused (401) from the next request. Keys created before the current format (tfx_…) keep working with every scope; replace them with a scoped key when you can.
Conventions
- Identifiers are opaque strings: a prefix naming the type, an underscore and 8 characters, such as
int_3k9x0p2a. Store them as strings and do not try to decode them. An id of the wrong type is treated as not found.Prefix Object int_intervention cus_customer sit_site eqp_equipment inv_invoice crn_credit note usr_user (technician) evt_webhook event whk_,key_webhook endpoint, API key (reserved) - Dates are ISO 8601 in UTC, for example
2026-11-01T10:00:00Z. In query parameters, a date without a time zone is read as UTC. - Amounts are integers in cents, always with the currency:
"amount_ttc": 1800, "currency": "EUR"means 18.00 EUR. - Empty values: text fields are
""when empty; dates and optional objects arenull.
Errors
Errors use standard HTTP status codes and a body in the RFC 9457 format, with the content type application/problem+json. type ends with a stable error code you can test in your code; detail explains the case; errors lists the fields at fault for validation errors.
HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json
{
"type": "https://tracefixapp.com/docs/api/#validation_error",
"title": "Validation error",
"status": 422,
"detail": "title is required.",
"errors": [{"field": "title", "message": "title is required."}]
}
| Status | Error codes | When |
|---|---|---|
| 400 | invalid_json, invalid_parameter | The body is not a JSON object, or a query parameter or header is invalid (limit, cursor, updated_since, Idempotency-Key). |
| 401 | unauthorized | Missing, invalid or revoked key. The response carries WWW-Authenticate: Bearer. |
| 402 | subscription_inactive, plan_without_api | The subscription is not active, or the plan does not include the API. |
| 403 | account_suspended, insufficient_scope | The account is suspended, or the key lacks the scope for this request. |
| 404 | not_found | Unknown or malformed id, or an id belonging to another company. |
| 405 | method_not_allowed | Method not supported on this path. The Allow header lists the allowed ones. |
| 409 | idempotency_in_progress | A request with the same Idempotency-Key is still running. Retry a moment later. |
| 422 | validation_error, idempotency_key_reused | A field is missing or invalid, or the Idempotency-Key was already used for another request. |
| 429 | rate_limited | Rate limit reached. Wait for the number of seconds in Retry-After. |
| 500 | internal_error | Unexpected error on our side. Retry later; if it persists, contact support. |
Pagination and filters
Lists are paginated by cursor, newest first. Parameters:
limit: page size, 50 by default, 200 at most (a larger value is brought down to 200);cursor: thenext_cursorvalue of the previous page.
A list response has the form {"data": [...], "next_cursor": "..."}. next_cursor is null on the last page. Treat the cursor as an opaque string.
curl https://app.tracefixapp.com/api/v1/interventions?limit=100 \
-H "Authorization: Bearer $TRACEFIX_KEY"
{"data": [ ... ], "next_cursor": "aW50XzNrOXgwcDJh"}
curl "https://app.tracefixapp.com/api/v1/interventions?limit=100&cursor=aW50XzNrOXgwcDJh" \
-H "Authorization: Bearer $TRACEFIX_KEY"
Filters are combined with the pagination parameters. updated_since (ISO 8601) returns the rows changed at or after that date-time and is available on every list; for invoices, which never change once issued, it applies to the issue date. The other filters are given with each endpoint below. To keep a copy in sync, store the time of your last run and send it as updated_since on the next one.
Idempotency
Every POST accepts an Idempotency-Key header (1 to 255 characters, for example a UUID you generate). If a network error leaves you unsure whether a request went through, send it again with the same key:
- same key and same request within 24 hours: the first response is returned again, with the header
Idempotent-Replayed: true, and nothing is created twice; - same key with a different request (another path or body):
422idempotency_key_reused; - the first request is still running:
409idempotency_in_progress; - the first request ended with a server error (5xx): the key is not kept and you can retry with it.
Keys are kept per company for 24 hours. Use a new key for each new operation.
Rate limits
Limits apply per key, over one-minute windows. Every authenticated response carries the headers RateLimit-Limit (requests allowed in the window), RateLimit-Remaining (requests left) and RateLimit-Reset (seconds until the window resets). When the limit is exceeded, the response is 429 with a Retry-After header in seconds.
Versioning
The version is in the path: /api/v1. Within v1, changes are only compatible additions: new endpoints, new optional parameters, new fields in responses, new events. Your code should ignore fields it does not know. A breaking change would come as a new version, announced at least 6 months in advance; the responses of the old version would then carry the Deprecation and Sunset headers.
Endpoints
| Method and path | Scope |
|---|---|
GET /interventions | interventions:read |
POST /interventions | interventions:write |
GET /interventions/{id} | interventions:read |
POST /interventions/{id}/cancel | interventions:write |
POST /interventions/{id}/comments | interventions:write |
GET /customers | customers:read |
POST /customers | customers:write |
GET /customers/{id} | customers:read |
GET /equipment | equipment:read |
GET /invoices | invoices:read |
GET /invoices/{id} | invoices:read |
GET /openapi.json | none (public) |
Paths are relative to https://app.tracefixapp.com/api/v1. The API has no update (PATCH) or delete operation.
List interventions
GET /interventions · scope interventions:read
Parameters: limit, cursor, updated_since, status (new, scheduled, in_progress, completed, cancelled), external_ref (your ticket reference).
curl "https://app.tracefixapp.com/api/v1/interventions?external_ref=4821" \
-H "Authorization: Bearer $TRACEFIX_KEY"
The response is a list of intervention objects:
{
"data": [
{
"id": "int_3k9x0p2a",
"number": "INT-2026-00142",
"title": "AC unit in fault, server room",
"status": "completed",
"kind": "corrective",
"priority": "high",
"external_ref": "4821",
"customer": {"id": "cus_7m2q8w1z", "name": "Northside Clinic"},
"site": {"id": "sit_4h6t0b9c", "name": "Building B"},
"equipment": [{"id": "eqp_9r1s5d3f", "name": "Rooftop unit 2", "serial_number": "SN-99812"}],
"technicians": [{"id": "usr_2n8v6k4j", "name": "Sam Taylor", "email": "sam@company.example"}],
"scheduled_start": "2026-11-03T08:00:00Z",
"scheduled_end": "2026-11-03T10:00:00Z",
"started_at": "2026-11-03T08:12:00Z",
"finished_at": "2026-11-03T09:40:00Z",
"work_done": "Replaced the condensate pump, alarm cleared.",
"follow_up": "",
"failed_checks": ["Leak check"],
"custom_fields": {"Purchase order": "PO-4471", "Out of hours": "yes"},
"signed": true,
"signer_name": "J. Lewis",
"report_url": "https://app.tracefixapp.com/p/r/xxxxxxxx/",
"app_url": "https://app.tracefixapp.com/app/interventions/xxxx/",
"created_at": "2026-11-02T14:05:00Z",
"updated_at": "2026-11-03T09:41:00Z"
}
],
"next_cursor": null
}
report_url is the link to the signed report, set only once the intervention is completed (otherwise null). kind is one of corrective, preventive, installation, inspection, other; priority one of low, normal, high, urgent.
Create an intervention
POST /interventions · scope interventions:write · accepts Idempotency-Key
| Field | Description |
|---|---|
title | Required, up to 255 characters. |
customer | Required. {"id": "cus_…"} for an existing customer (or the id alone as a string); otherwise {"email", "name", "phone"}: the customer is found by e-mail, then by name, and created if none matches (name is then required). |
description | Text of the request. |
external_ref, external_url | Your ticket reference (up to 120 characters) and its link. If an open intervention already has the same external_ref, it is returned with status 200 instead of creating a duplicate. |
site_id | A site of this customer (sit_…). |
equipment_ids, equipment_serial | A list of equipment ids (eqp_…), and/or a serial number (ignored if no equipment has it). Without site_id, the site of the first equipment is used. |
priority | low, normal (default), high, urgent. |
kind | corrective (default), preventive, installation, inspection, other. |
scheduled_start | ISO 8601 date-time. |
requester | {"name", "email", "phone"} of the person who made the request. |
custom_fields | Your own fields (Settings → Job sheet fields), keyed by label or id: text, number, date (YYYY-MM-DD), yes/no (true/false) or one of the choices of a list. Fields that do not apply to the intervention type are ignored; an unknown field returns 422. |
curl https://app.tracefixapp.com/api/v1/interventions \
-H "Authorization: Bearer $TRACEFIX_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 5f0c8e8e-2a41-4d7b-9a51-0e6f7c3b2d19" \
-d '{
"title": "AC unit in fault, server room",
"description": "Customer reports alarm E5 since this morning.",
"external_ref": "4821",
"external_url": "https://helpdesk.example.com/tickets/4821",
"customer": {"email": "facilities@clinic.example", "name": "Northside Clinic"},
"equipment_serial": "SN-99812",
"priority": "high",
"requester": {"name": "J. Lewis", "email": "j.lewis@clinic.example"},
"custom_fields": {"Purchase order": "PO-4471", "Out of hours": true}
}'
Response 201 Created with the new intervention object (same format as above, "status": "new"). An unknown customer.id, site_id or equipment id returns 404.
Read an intervention
GET /interventions/{id} · scope interventions:read
curl https://app.tracefixapp.com/api/v1/interventions/int_3k9x0p2a \
-H "Authorization: Bearer $TRACEFIX_KEY"
Response 200 with the intervention object.
Cancel an intervention
POST /interventions/{id}/cancel · scope interventions:write · accepts Idempotency-Key
Optional body: reason (up to 500 characters). An intervention already completed or cancelled is returned unchanged.
curl https://app.tracefixapp.com/api/v1/interventions/int_3k9x0p2a/cancel \
-H "Authorization: Bearer $TRACEFIX_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "Ticket closed by the customer."}'
Response 200 with the intervention object ("status": "cancelled").
Comment on an intervention
POST /interventions/{id}/comments · scope interventions:write · accepts Idempotency-Key
Body: message, required, up to 5,000 characters. The comment appears in the intervention's history.
curl https://app.tracefixapp.com/api/v1/interventions/int_3k9x0p2a/comments \
-H "Authorization: Bearer $TRACEFIX_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "Access code for the plant room: ask reception."}'
{"ok": true}
Response 201 Created.
List customers
GET /customers · scope customers:read
Parameters: limit, cursor, updated_since, email (exact address, case-insensitive), q (part of the name).
curl "https://app.tracefixapp.com/api/v1/customers?email=facilities@clinic.example" \
-H "Authorization: Bearer $TRACEFIX_KEY"
{
"data": [
{
"id": "cus_7m2q8w1z",
"name": "Northside Clinic",
"email": "facilities@clinic.example",
"phone": "+44 20 0000 0000",
"sites": [{"id": "sit_4h6t0b9c", "name": "Building B", "city": "London"}],
"created_at": "2026-09-14T08:30:00Z"
}
],
"next_cursor": null
}
Create a customer
POST /customers · scope customers:write · accepts Idempotency-Key
Body: name (required, up to 200 characters), email, phone, address.
curl https://app.tracefixapp.com/api/v1/customers \
-H "Authorization: Bearer $TRACEFIX_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Riverside Offices", "email": "maintenance@riverside.example", "phone": "+44 20 0000 0001"}'
Response 201 Created with the customer object ("sites": []).
Read a customer
GET /customers/{id} · scope customers:read
curl https://app.tracefixapp.com/api/v1/customers/cus_7m2q8w1z \
-H "Authorization: Bearer $TRACEFIX_KEY"
Response 200 with the customer object.
List equipment
GET /equipment · scope equipment:read
Parameters: limit, cursor, updated_since, serial (exact serial number), site_id (sit_…).
curl "https://app.tracefixapp.com/api/v1/equipment?serial=SN-99812" \
-H "Authorization: Bearer $TRACEFIX_KEY"
{
"data": [
{
"id": "eqp_9r1s5d3f",
"name": "Rooftop unit 2",
"serial_number": "SN-99812",
"category": "hvac",
"site": {"id": "sit_4h6t0b9c", "name": "Building B"},
"created_at": "2026-09-14T08:35:00Z",
"updated_at": "2026-10-20T15:02:00Z"
}
],
"next_cursor": null
}
List invoices
GET /invoices · scope invoices:read
These are the invoices of your company's Tracefix subscription, with their credit notes, for example to import them into your accounting software. They are not invoices to your own customers. The PDF stays available on the Billing page of the application.
Parameters: limit, cursor, updated_since (invoices issued at or after this date-time).
curl "https://app.tracefixapp.com/api/v1/invoices?updated_since=2026-10-01T00:00:00Z" \
-H "Authorization: Bearer $TRACEFIX_KEY"
{
"data": [
{
"id": "inv_5p0w7e2m",
"number": "2026-0042",
"issued_at": "2026-10-15T09:00:00Z",
"description": "Pro plan, monthly",
"period_start": "2026-10-15T09:00:00Z",
"period_end": "2026-11-15T09:00:00Z",
"amount_ht": 4900,
"vat_rate": "20.00",
"vat_amount": 980,
"amount_ttc": 5880,
"currency": "EUR",
"vat_mention": "",
"credit_notes": [
{"id": "crn_8c3x1y6q", "number": "AV-2026-0003", "issued_at": "2026-10-20T11:00:00Z", "amount_ttc": 1200}
]
}
],
"next_cursor": null
}
amount_ht is the amount excluding VAT, amount_ttc the amount including VAT, both in cents. vat_rate is a percentage written as a string. vat_mention holds the legal VAT note printed on the invoice, if any.
Read an invoice
GET /invoices/{id} · scope invoices:read
curl https://app.tracefixapp.com/api/v1/invoices/inv_5p0w7e2m \
-H "Authorization: Bearer $TRACEFIX_KEY"
Response 200 with the invoice object.
Webhooks
A webhook sends an HTTPS POST to your tool when an event happens, for example to update or close a ticket when the intervention is completed. A company admin adds endpoints in Settings → Integrations & API: an https:// URL reachable from the internet (private and local addresses are refused) and the events to receive (none selected means every event). Each endpoint has its own signing secret, shown on the same page. The Send a test button sends a ping event.
| Event | Sent when | data |
|---|---|---|
intervention.created | An intervention is created. | Intervention |
intervention.scheduled | It is scheduled. | Intervention |
intervention.started | The technician starts it. | Intervention |
intervention.completed | It is completed (the report is available at report_url). | Intervention |
intervention.cancelled | It is cancelled. | Intervention |
invoice.issued | A Tracefix subscription invoice is issued for your company. | Invoice |
credit_note.issued | A credit note is issued. | Credit note |
The body is an envelope whose data holds the object in the same format as the API:
POST /hooks/tracefix HTTP/1.1
Content-Type: application/json
User-Agent: Tracefix-Webhooks/1.0
X-Tracefix-Event: intervention.completed
X-Signature: t=1793700000,v1=3f1c9a…e9a2
{
"id": "evt_6d9f2a7h",
"type": "intervention.completed",
"created_at": "2026-11-03T09:41:00Z",
"data": {"id": "int_3k9x0p2a", "number": "INT-2026-00142", "status": "completed", ...}
}
A credit_note.issued event carries this data:
{
"id": "crn_8c3x1y6q",
"number": "AV-2026-0003",
"issued_at": "2026-10-20T11:00:00Z",
"description": "Refund, Pro plan",
"amount_ht": 1000, "vat_rate": "20.00", "vat_amount": 200, "amount_ttc": 1200,
"currency": "EUR", "vat_mention": "",
"invoice": {"id": "inv_5p0w7e2m", "number": "2026-0042"}
}
Use the event id to ignore a delivery you have already processed.
Verifying the signature
Each request carries X-Signature: t=<unix time>,v1=<hex> (the same value is also sent in X-Tracefix-Signature). The hex value is the HMAC-SHA256 of the string "<t>.<raw body>", computed with the endpoint's signing secret. Compute it on the raw body as received, before any JSON parsing, and refuse a t more than 5 minutes away from your clock.
import hashlib
import hmac
import time
def verify(secret: str, raw_body: bytes, header: str, tolerance: int = 300) -> bool:
try:
parts = dict(p.split("=", 1) for p in header.split(","))
t = int(parts["t"])
except (KeyError, ValueError):
return False
if abs(time.time() - t) > tolerance:
return False
expected = hmac.new(secret.encode(), str(t).encode() + b"." + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts.get("v1", ""))
Answer and retries
Answer with any 2xx status within a few seconds (the request times out after 8 seconds); redirects are not followed. Any other outcome counts as a failure, and the delivery is tried again after 1, 5, 15, 30, 60, 120, 240, 480 and then 720 minutes: 10 attempts in all over about 28 hours, after which it is abandoned. The Recent deliveries table in Settings → Integrations & API shows each delivery's event, result, number of attempts and next attempt.
OpenAPI description
A machine-readable OpenAPI 3.1 description of the API, including the webhooks, is available without a key at https://app.tracefixapp.com/api/v1/openapi.json. You can import it into an API client or a code generator.
Call log
Every API call is recorded for 30 days. The company's admins see the most recent calls in Settings → Integrations & API: date, key name, method and path, status, duration and IP address. Keys, secrets and request or response bodies are never recorded; in the query string, only the values of limit, status, updated_since and site_id are kept, the others are masked.