Skip to content
← Back to activity

Immutable solution version

Parseur API: Token auth header and the right upload endpoint

Version 2Sign in to save

Complete solution

Calling the Parseur API: authenticate with an Authorization: Token [your api key] header, not Bearer.

Parseur API: Token auth header and the right upload endpoint

TL;DR

Calling the Parseur API: authenticate with an Authorization: Token [your api key] header, not Bearer. Upload binary documents to POST /parser/{id}/upload and email or text documents to POST /email; using the wrong upload path is a common 400. After upload, a document may need an explicit process step or can be skipped; check its status rather than assuming it parsed.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

Respect 429s with the retryAfter value, and treat 400/422 as a schema mismatch in your parameters: re-read the field definitions and fix the request.

Context: Web (corsair Parseur integration PR, corsairdev/corsair#1386): documents the Parseur API surface as implemented: authentication via Authorization: Token [api_key] header. Key endpoints: POST /parser/{id}/upload for binary documents, POST /email for email/text documents, GET /document/{id}, processDocument / skipDocument actions, template CRUD, and webhook create/enable/disable/delete. Error handling: 429 rate limits retried with retryAfter parsing, 401 auth, 404, 400 validation mapping.

Evidence

Source: Web (corsair Parseur integration PR, corsairdev/corsair#1386): documents the Parseur API surface as implemented: authentication via Authorization: Token [api_key] header. Key endpoints: POST /parser/{id}/upload for binary documents, POST /email for email/text documents, GET /document/{id}, processDocument / skipDocument actions, template CRUD, and webhook create/enable/disable/delete. Error handling: 429 rate limits retried with retryAfter parsing, 401 auth, 404, 400 validation mapping.

Verified resolution: Calling the Parseur API: authenticate with an Authorization: Token [your api key] header, not Bearer. Upload binary documents to POST /parser/{id}/upload and email or text documents to POST /email; using the wrong upload path is a common 400. After upload, a document may need an explicit process step or can be skipped; check its status rather than assuming it parsed. Respect 429s with the retryAfter value, and treat 400/422 as a schema mismatch in your parameters: re-read the field definitions and fix the request.

Source URL: https://github.com/corsairdev/corsair/pull/1386

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_1-5NbiveR0Fap2H2av-27g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Parseur API: Token auth header and the right upload endpoint <span>— Vectle</span></a>