API conventions
All Scribee API endpoints share the same conventions: a single response envelope, pagination, sorting, inclusion of related resources, and errors in a constant format. One endpoint needs no token: GET /api/v1/health, which responds {"status": "ok"} with no data envelope (Your first call). Learn them once on this page; they apply identically to every resource. All the requests below are reads (GET): you can run them as they are on your production account, they create no data and send nothing externally.
Each convention is illustrated on the invoice list, GET /api/v1/workspaces/{workspace_id}/invoices, with the token obtained in Authentication and the workspace_id identified in Your first call.
The response envelope
Every list response contains a data array. It also carries a meta object describing pagination, except on four sub-collections that are not paginated and return data alone: an invoice's supporting documents (/api/v1/invoices/{id}/supporting_documents), an invoice's payments (/api/v1/invoices/{id}/payments), a party's supporting documents (/api/v1/parties/{id}/supporting_documents), and a party's update invitations (/api/v1/workspaces/{workspace_id}/parties/{party_id}/update_invitations). Those return the whole collection; page and per_page have no effect there.
curl https://app.scribee.tech/api/v1/workspaces/YOUR_WORKSPACE_ID/invoices \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response abridged to the fields that matter here - each invoice is returned in its complete serialization:
{
"data": [
{
"id": 12345,
"invoice_number": "INV-2024-00156",
"issue_date": "2024-12-15",
"direction": "sales",
"lifecycle_state": "deposited",
"lifecycle_status_code": "200",
"tax_inclusive_amount": 1770.0
}
],
"meta": {
"current_page": 1,
"per_page": 20,
"total_pages": 8,
"total_count": 156
}
}
Single-resource endpoints (for example GET /api/v1/invoices/{id}) return the same object under the data key, without meta.
Pagination
page (default: 1) and per_page (default: 20, maximum: 100) control the returned window.
curl "https://app.scribee.tech/api/v1/workspaces/YOUR_WORKSPACE_ID/invoices?page=2&per_page=50" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"data": ["..."],
"meta": {
"current_page": 2,
"per_page": 50,
"total_pages": 4,
"total_count": 156
}
}
Three behaviors to know:
- A numeric
per_pagevalue outside the 1-100 range is clamped to the nearest bound:per_page=500returns 100 items, without error. An unreadableper_pagevalue - empty, non-numeric, or sent in array form (per_page[]=10) - falls back to the default, 20. - Always send an integer
pagegreater than or equal to 1.page=0, a negative, empty, or non-numeric value, or one sent in array form (page[]=1), returns400in the usual error envelope:
{
"error": "bad_request",
"message": "Le numéro de page doit être un entier supérieur ou égal à 1"
}
- Requesting a page beyond the last one also returns
400, with a distinct message, as soon as the collection is not empty:
{
"error": "bad_request",
"message": "Le numéro de page dépasse le nombre de pages disponibles"
}
To page through an entire collection, advance page up to and including meta.total_pages.
Sorting
sort_by selects the field, sort_order the direction (asc or desc, default: desc).
curl "https://app.scribee.tech/api/v1/workspaces/YOUR_WORKSPACE_ID/invoices?sort_by=due_date&sort_order=asc" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"data": [
{ "id": 12290, "invoice_number": "INV-2024-00098", "due_date": "2025-01-05" },
{ "id": 12345, "invoice_number": "INV-2024-00156", "due_date": "2025-01-15" }
],
"meta": { "current_page": 1, "per_page": 20, "total_pages": 8, "total_count": 156 }
}
Accepted fields on the invoice list: issue_date (default), due_date, invoice_number, tax_inclusive_amount, lifecycle_state, created_at. An unknown sort_by or sort_order value does not cause an error: sorting falls back to the default, issue_date descending.
Including related resources
Lists return each invoice in the same complete serialization as the single-resource endpoint - parties, totals, references, and lifecycle information included. Only the associated collections are loaded on request, via the include parameter (comma-separated values).
curl "https://app.scribee.tech/api/v1/workspaces/YOUR_WORKSPACE_ID/invoices?include=lines" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"data": [
{
"id": 12345,
"invoice_number": "INV-2024-00156",
"lines": [
{
"id": 501,
"line_id": "1",
"quantity": 2.0,
"line_extension_amount": 1475.0,
"item": { "name": "Prestation de conseil" }
}
]
}
],
"meta": { "current_page": 1, "per_page": 20, "total_pages": 8, "total_count": 156 }
}
Accepted values on invoices: lines, payment_means, tax_subtotals, lifecycle_events, allowance_charges, item_notes, invoice_references, payments, early_payment_discounts. An unknown value is ignored without error. Each endpoint lists its allowed values on its reference page, for example List invoices.
early_payment_discounts depends on an option enabled workspace by workspace. When it is not enabled, the include is still accepted but always returns an empty array, and the invoice's early_payment_discounts_extracted_at field is null: an empty array alone therefore does not mean no early-payment discount exists. Ask your Scribee contact whether the option is active on your workspace.
Errors
Every error carries an HTTP status and a JSON body with a stable error key, intended for your processing logic, and a readable message, intended for your logs. Base your logic on the HTTP status and on error, never on the text of message. The messages are returned in French.
| Status | error | Cause | What you do |
|---|---|---|---|
400 | bad_request | missing or incomplete request body, invalid page value, page beyond the last one | fix the request before replaying it |
400 | Bad Request | invalid JSON body | fix the JSON before replaying the request |
401 | empty body | token missing, invalid, or expired | request a new token at /oauth/token and replay the request |
403 | forbidden | insufficient scope, insufficient rights on the resource, workspace not authorized for your application or non-existent, or IP address outside the allowlist | check the token scopes; for workspace or IP access, contact your Scribee contact |
404 | not_found | the resource does not exist, or belongs to a workspace your application does not have access to | check the identifier and the workspace queried |
422 | unprocessable_entity | a write payload failed validation | fix the fields listed in details and violations |
413 | empty body | JSON body over 4 MiB, except an invoice creation (POST /api/v1/workspaces/{workspace_id}/invoices) with a valid token in the Authorization header that carries the write scope, admitted up to 80 MiB; JSON body of more than 500,000 nodes or more than 100,000 objects and arrays, that nests them more than 16 levels deep, or that holds a key path longer than 128 bytes or a number longer than 128 bytes; application/x-www-form-urlencoded, multipart/related or POST without Content-Type body over 4 MiB, token or not | reduce the body or spread it over several requests; for an invoice creation under 80 MiB, check the token, how it is sent in the header, then its write scope |
429 | too_many_requests | your OAuth application went over 300 requests per minute, or over an operation's own limit | wait Retry-After seconds before replaying the request |
400: a malformed request
{
"error": "bad_request",
"message": "Le corps de la requête est manquant ou mal formé"
}
Three causes share this status and this error key, and the message tells them apart. The message above signals a request body that is absent, or that does not carry the wrapping key the endpoint expects - {"customer": {...}} on customer creation, for example. The other two causes concern pagination and are detailed above: an invalid page value, and a page requested beyond the last one. In all three cases, fix the request before replaying it.
An invalid JSON body also gets a 400, in another format: that of the default error page, which follows the Accept header. With Accept: application/json, the body is the following, with no message; without an Accept header asking for JSON, it is an HTML page.
{"status":400,"error":"Bad Request"}
An invalid JSON body first goes through authentication and the scope check, like any request: without a valid token, it gets 401, with an insufficient scope 403, and this 400 comes only with a valid token. It is then counted in the 300 requests per minute limit like any authenticated request (429: the partner API limit); an invoice creation over 4 MiB, admitted up to 80 MiB, is counted once, before its structure is measured (413: the request body size). If that measurement finds its JSON invalid, it gets the empty 413, already counted, not this 400; invalid JSON the measurement does not find still gets this 400.
401: no body
The 401 response has no JSON body; the detail is carried by the WWW-Authenticate header. Request a new token as described in Authentication.
403: five causes, one format
{
"error": "forbidden",
"message": "L'application n'a pas accès à cet espace de travail"
}
Two message values cover three of these causes. The first (above) answers both for a workspace outside your application's scope and for a workspace_id matching no workspace: the response is the same word for word in both cases, so it never tells you whether the workspace exists. The second reports an IP address denied by the workspace's allowlist (Cette adresse IP n'est pas autorisée pour cet espace de travail). The two remaining causes - insufficient scope and insufficient rights on the target resource - share the same generic message, Vous n'êtes pas autorisé à effectuer cette action, and so cannot be told apart by the text. No 403 exposes an internal class name or technical wording: the messages stay in French, as everywhere else on the API. Base your logic on the 403 status and the error key. Scopes are fixed by requesting a new token; workspace and IP access are configured by Scribee, on request to your contact.
A workspace refusal does not surface the same way everywhere, and it is the shape of the endpoint that decides, never the reason for the refusal. On an endpoint that carries the workspace in its path, every workspace refusal is a 403: whether the workspace is outside your application's scope, does not exist, or has an IP allowlist that does not cover your source address. On an endpoint that addresses a resource directly by its identifier, there is no workspace_id to refuse: workspaces outside your scope, like those whose IP allowlist excludes you, are filtered out before the lookup and you receive a 404. So an unexpected 404 from a new server is first of all an IP question.
404: existence is not revealed
{
"error": "not_found",
"message": "La ressource demandée est introuvable"
}
A resource located in a workspace your application does not have access to returns 404, not 403: the API does not reveal the existence of resources outside your scope. An unexpected 404 on a known identifier therefore signals either a typo or missing workspace access.
422: the machine code and the field-level detail
{
"error": "unprocessable_entity",
"code": "validation_failed",
"message": "La validation a échoué",
"details": {
"direction": ["doit être 'sales' ou 'purchases'"]
},
"violations": [
{
"source": "request",
"field": "direction",
"rule": null,
"type": null,
"severity": "error",
"message": "doit être 'sales' ou 'purchases'",
"message_fr": null,
"message_en": null,
"xpath": null
}
]
}
code is a stable snake_case machine identifier, never translated and never reworded. It names the failure class, where message is French text meant for your logs and details a map of the faulty fields: code is therefore what you branch on when the 422 status alone is not enough. error, message, and details keep the meaning and the format they had; violations, described below, is added beside them without replacing anything.
code | What it signals |
|---|---|
validation_failed | a validation refused the write; details names the fields |
operation_failed | the operation was refused with no more specific cause |
duplicate_record | a record with this identifier already exists |
value_too_long | a value exceeds the maximum length of its field |
invalid_argument | a submitted value is not among the accepted values |
dependent_records | records linked to the resource block the operation |
The refusals of an invoice at creation (POST /api/v1/workspaces/{workspace_id}/invoices), at modification (PATCH /api/v1/invoices/{id}) or at file import (POST /api/v1/workspaces/{workspace_id}/invoices/upload) name their cause in a code of their own:
code | What it signals |
|---|---|
duplicate_invoice_number | creation or import: the company already has a sales invoice with this number; renumber the invoice |
duplicate_external_reference | creation: a concurrent request recorded the same external_source / external_id pair at the same moment; the number is not at fault, change the reference |
external_reference_incomplete | creation or modification: external_source and external_id were not sent together |
external_source_reserved | creation or modification: external_source carries a value reserved for one of Scribee's integrations |
external_reference_locked | modification: the invoice carries a reserved external_source value, its external reference cannot be modified |
file_required | import: the request carries no file |
file_read_error | import: the platform could not read the file; this is not a verdict on the file, replay the call |
unknown_file_format | import: the file is neither XML, nor a PDF, nor an image |
malformed_pdf | import: no reader can open the PDF |
xml_content_required | import: the XML file is empty |
invalid_xml_content | import: the XML is not well-formed |
unknown_xml_format | import: well-formed XML that is neither UBL nor CII |
The catalogue may gain new values without notice; treat a code you do not recognize as a generic failure rather than rejecting the response.
details maps each faulty field to the list of its errors when the failure is attributable to a field. When it is not - a rule bearing on the whole request, a conflict with a linked resource - the messages are grouped under the base key. Some failures return a specific message without details: treat details as optional, and do not expect one key per submitted field.
422: violations, the structured detail
Every 422 response carries a violations array, beside details or errors. The key is always present; the array is empty when the refusal names no value. It is added to the existing keys without removing or renaming any of them: an integration that ignores keys it does not know has nothing to change. To stay readable, some examples in this guide do not show violations.
A response lists at most 100 refusals of regulated amounts, quantities or prices. Past that, details and violations hold the first 100, and an integer violations_total, beside them, counts every refusal. That property, declared optional in the reference's validation_error schema, appears only in that case: a response that lists every refusal keeps the shape described here. A body holding more than 250,000 JSON numbers written with a fraction or an exponent, regulated or not, is not read exactly: every regulated amount, quantity or price it sends as a decimal number is then refused with 422, like an unreadable value. Sent as a decimal string or as an integer, those fields are still read normally, except on an operation that honours the Idempotency-Key header: there, a JSON body that carries that header and crosses this threshold is refused whole, before the key is stored or compared, even when the operation reads none of those numbers. The response is a 422 validation_failed that carries, under details.base, the single message is not a decimal number (digits, an optional sign and a dot as decimal separator); no stored response is replayed, and the key keeps its prior state: a fresh key is not reserved, and a key that has already served keeps the reservation or the stored response of its first request, so a corrected body sent under that key gets 409 idempotency_key_reuse if it differs from the body of that first request.
Each element designates one refused value and always carries the same nine keys, null when the information does not exist for that source:
| Key | Content |
|---|---|
source | what refused the value: model (a validation of the record), schematron (a Schematron rule, at deposit) or request (a check on the request itself) |
field | the path of the refused field; null when the refusal bears on the whole resource (the messages details files under base) |
rule | the Schematron rule identifier, as the engine reports it (BR-27); null for model and request |
type | the validation error key (blank, too_long...); only for model |
severity | fatal for a Schematron rule that refuses the deposit, error for model and request |
message | the message, in the response language |
message_fr, message_en | the same message rendered in French and in English, for a model error only; null when the translation does not exist, and always null for schematron and request, whose message is never translated |
xpath | the location, in the XML document Scribee checked, of the node on which the Schematron rule failed; only for schematron |
The API does not take the Accept-Language header into account. To display a validation error in the other language, read message_fr or message_en.
The field paths depend on the source. A request error uses the key details uses (lines[1][quantity] for a line value). A model error on an invoice line carries the position of the line in the lines array you sent, starting from 0: lines[1][article_name] designates the second line. On one of a line's additional object identifiers, it also carries the position of that identifier (lines[1][additional_object_identifiers][0][identifier]). A model error on any other record - the invoice itself, a line's item attributes, allowances and charges, or the invoice's parties, tax subtotals, payment means, allowances and charges - carries the bare attribute name, as details does. A schematron violation uses the unindexed path carried by the keys of details or errors (document.lines[].price.unit_price); the line at fault is then read from xpath. An assertion that no single field carries, filed under document._schematron in details or errors, arrives with field set to null.
A line refused by its validation, when creating an invoice (POST /api/v1/workspaces/{workspace_id}/invoices) or updating it (PATCH /api/v1/invoices/{id}), here an empty item name on the second line:
{
"source": "model",
"field": "lines[1][article_name]",
"rule": null,
"type": "blank",
"severity": "error",
"message": "doit être rempli(e)",
"message_fr": "doit être rempli(e)",
"message_en": "can't be blank",
"xpath": null
}
A Schematron rule that refuses the deposit, here BR-27 on the second line:
{
"source": "schematron",
"field": "document.lines[].price.unit_price",
"rule": "BR-27",
"type": null,
"severity": "fatal",
"message": "[BR-27]-The Item net price (BT-146) shall NOT be negative.",
"message_fr": null,
"message_en": null,
"xpath": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:InvoiceLine[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][2]"
}
One Schematron assertion listed under several fields gives one element per field, with the same rule, the same message and the same xpath. To count assertions, deduplicate on the triple rule, xpath and message: for the AIFE PPF rules F1-* and F10-*, rule is the AIFE pattern identifier, shared by several assertions, several of which may target the same node.
xpath designates the document Scribee checked: for the deposit of an invoice created in JSON, it is the UBL document or the flux 1 extract Scribee generated, not a file you sent. The SCRIBEE-* identifiers are business rules of Scribee's own.
422: a deletion blocked by linked records
Deleting a company, an establishment, a customer, or a supplier that is still referenced elsewhere is refused with a 422 carrying the code dependent_records. When the API can identify the blocking dependency, it names it in the message and sends no details:
{
"error": "unprocessable_entity",
"code": "dependent_records",
"message": "Impossible de supprimer une entreprise qui a des filiales",
"violations": []
}
When it cannot, the refusal comes from the database and takes the generic shape, with the detail under details.base:
{
"error": "unprocessable_entity",
"code": "dependent_records",
"message": "La validation a échoué",
"details": {
"base": ["Cette opération est en conflit avec d'autres enregistrements liés à cette ressource"]
},
"violations": [
{
"source": "request",
"field": null,
"rule": null,
"type": null,
"severity": "error",
"message": "Cette opération est en conflit avec d'autres enregistrements liés à cette ressource",
"message_fr": null,
"message_en": null,
"xpath": null
}
]
}
The dependent_records code is identical in both cases: branch on it rather than on the text. Detach or delete the linked records, then replay the deletion. Some dependencies can only be handled from the Scribee interface; each resource's page states which.
413: the request body size
A body that is too large is refused before any processing, whatever the HTTP method: nothing is done, the request is not counted in the 300 requests per minute limit, and the response is an empty-bodied 413. The cap depends on the content type and, for a JSON body, on the operation, the token and its scope:
| Request | Body cap |
|---|---|
JSON body (application/json) of an invoice creation (POST /api/v1/workspaces/{workspace_id}/invoices), with a valid access token in the Authorization header (Authorization: Bearer <token>) that carries the write scope | 80 MiB (83,886,080 bytes) |
JSON body of an invoice creation without a valid token in the header - token missing, unknown, revoked, or expired, or sent anywhere other than the header -, or with a token that does not carry the write scope | 4 MiB (4,194,304 bytes) |
| JSON body to any other operation, or to a path or an HTTP method no operation of the API serves, with or without a token | 4 MiB (4,194,304 bytes) |
application/x-www-form-urlencoded or multipart/related body, or POST without Content-Type, with or without a token | 4 MiB (4,194,304 bytes) |
A POST whose X-HTTP-Method-Override header names another method Rack recognizes (GET, HEAD, PUT, DELETE, OPTIONS, PATCH, LINK or UNLINK, case-insensitive) is judged on that method: it is no longer an invoice creation, and its JSON body stays capped at 4 MiB. A header naming POST, or a value Rack does not recognize (FETCH, for example), leaves the request a POST: an invoice creation then keeps its 80 MiB. In the API reference, the 413 response of POST /api/v1/workspaces/{workspace_id}/invoices states both caps; that of the other operations taking a JSON body states 4 MiB only.
Over 4 MiB, a body therefore gets this 413, not the 401 authentication would have produced, nor the 403 an insufficient scope would have produced; only an invoice creation with a valid token in the header, that carries the write scope, goes up to 80 MiB. That margin belongs to the base64 document alone, the pdf_base64 value at the root of the body or in its invoice object: the rest of the body stays capped at 4 MiB, and over 4 MiB the document may hold only base64 (rules detailed below), otherwise the creation gets this 413. Such a creation, over 4 MiB without going over 80 MiB, is counted once in its application's 300 requests per minute limit, as soon as it is admitted: once its size is checked, before its nodes are counted and its JSON is decoded. The size is read from the Content-Length header when it is present without Transfer-Encoding, without reading anything of the body; otherwise, the body is read up to one byte past the cap to be measured. Its nodes, for their part, are then counted by reading the body (next paragraph): refused with 413 for its structure, for its document or for invalid JSON found during that reading, or with 400 for invalid JSON that reading does not find, it has already cost one request. If the 300 requests limit is already reached, this creation gets the 429 rate_limited with its Retry-After header, like any request over the limit (next section), not this 413: once its size is checked, it is refused before its nodes are counted, and nothing is done. A JSON body over 80 MiB gets the 413 even when the limit is reached: its size is checked before the count. If an invoice creation under 80 MiB is refused with 413, check first the token and how you send it, then its write scope, then that the rest of the body fits in 4 MiB and that pdf_base64 holds only base64. The cap also applies to a body sent without Content-Length (Transfer-Encoding: chunked).
A JSON body is also capped in its structure. Whatever its size, a JSON body gets the same empty-bodied 413, before it is decoded, when it:
- holds more than 500,000 nodes, that is structural characters (
{,[,,and:) outside strings; - holds more than 100,000 objects and arrays (
{and[outside strings); - nests objects and arrays more than 16 levels deep, the top-level object or array counting as one;
- holds a key path longer than 128 bytes: a key and the keys of the objects around it, summed, quotes excluded; an array between two objects adds nothing;
- holds a number longer than 128 bytes (digits, sign, decimal point and exponent).
Keys and numbers are measured in bytes as written: an escape sequence counts all its bytes. In every one of these cases, nothing is done. A body of 4 MiB at most is not counted in the 300 requests per minute limit; an invoice creation over 4 MiB, admitted up to 80 MiB, was counted before its structure is measured, so this 413 costs it one request. If its application has already reached its limit, it gets the 429 of the previous paragraph, without its structure being measured. The content of strings does not count, only keys count, through their path: a 50 MiB pdf_base64 weighs no more than a short field. A short invoice line holds about ten nodes and one object, a line with every property filled about 70 nodes and 5 objects and arrays: a 4 MiB body made of lines stays under both caps. A body over them is spread over several requests. The bodies the API reference describes stay far from the three other caps: their longest key path is 60 bytes, their deepest nesting 6 levels.
JSON admits no comment, and Scribee does not refuse one for that: past the first comment, strings are no longer told apart from the rest. The key path of a : is then counted as the path open at the comment plus every byte read since, and the depth as the one open at the comment plus every { and [ met since, nothing closing. A body holding a comment can therefore get this 413 well within the caps; do not send one.
The 80 MiB are sized on the largest field of the API: pdf_base64, on invoice creation, accepts a PDF under 50 MiB (52,428,800 bytes) once decoded (Provide your own PDF). The cap, though, counts the bytes of the JSON body as sent: the margin left depends on the Base64 encoding, the line breaks and the rest of the body. Base64-encoded on a single line, a PDF just under 50 MiB takes about 66.7 MiB (69,905,068 characters). Each line break in the string, escaped in JSON, adds 2 bytes (\n) or 4 bytes (\r\n): 76-character lines ending in \r\n bring that same PDF to about 70.2 MiB, 16-character lines to about 83.3 MiB, over the cap. To keep the widest margin, send the Base64 string without line breaks.
Over 4 MiB, the document is written the way decoding reads it. An invoice creation over 4 MiB gets the empty-bodied 413, after being counted in the 300 requests per minute limit, when its document does not follow these rules:
- the document is the
pdf_base64the API reads: the one in theinvoiceobject, or the one at the root of the body only when the request carries noinvoiceparameter, neither in the body nor in the query string. Anywhere else, the string counts in the 4 MiB of the rest of the body: with the usual body{ "invoice": { ... }, "pdf_base64": "..." }, the rootpdf_base64is not read, and a 5 MiB encoded PDF placed there gets this413; - the
invoiceandpdf_base64keys are written as is, once each: a key of 60 bytes or less written with an escape sequence, at the root of the body or in theinvoiceobject, a secondinvoicekey at the root, a secondpdf_base64in the document's object or a JSON comment make the document count in the 4 MiB of the rest of the body; - the string holds only the base64 alphabet (
AtoZ,atoz,0to9,+and/), the=padding, spaces and the\n,\r,\t,\fand\/escapes;\\,\",\band\uare refused; - a
data:prefix (data:application/pdf;base64,, for example) fits in the first 256 bytes of the string; - whitespace and the backslashes of escapes,
\/aside, stay at most one byte in 16: lines of 60 to 76 characters stay below, 16-character lines ending in\r\ngo over.
That proportion is measured on the string as written in JSON, where an escaped line break counts its backslashes: lines of at least 28 characters ending in \r\n, or at least 14 ending in \n, respect it; 27-character lines ending in \r\n exceed it. Send pdf_base64 without line breaks: in that form, the document cannot get this 413 for its density.
An invoice parameter in the query string, or a query string the API cannot parse, removes the margin from the whole request: over 4 MiB, it gets the empty-bodied 413, without being counted in the 300 requests per minute limit.
File uploads in multipart/form-data are not affected by this cap: each upload operation applies its own per-file limits, described on its page.
429: the partner API limit
Each OAuth application has 300 requests per minute, across every authenticated operation. The counter belongs to the application, not to the token: every access token issued for one application shares it, and requesting a new token at /oauth/token does not reset it. Beyond that, the request is refused before any processing, nothing is done, and the response is a 429 with a Retry-After header:
{
"error": "too_many_requests",
"code": "rate_limited",
"message": "Trop de requêtes. Veuillez réessayer plus tard."
}
Wait the number of seconds given by Retry-After - 60 for this limit - before replaying the request. As for a 422, branch your logic on code, never on the text of message.
Three cases are not counted. A request refused by authentication - token missing, invalid, or expired (401), or insufficient scope (403) - is rejected before the counter, except an invoice creation whose JSON body exceeds 4 MiB, counted as soon as it is admitted (previous section): if its token is revoked between its admission and its processing, the 401 it receives has already been counted. Likewise, a body refused with 413 before it is decoded is not counted, except that same invoice creation over 4 MiB, counted before its structure is measured. GET /api/v1/health requires no token and keeps its own per-IP-address limit (Your first call). PUT /api/v1/p/parties/{token} requires no access token: the signed token in its path is enough, and the request is never counted.
Some operations also have their own, lower limit, which applies at the same time as this one and answers with the same 429 rate_limited: opening a consent session on a payment batch (Payment batches) and triggering a mandate's signature (Mandates). A request refused by one of these limits has already been counted in the application's 300 requests.