# Red Eagle CDR API > REST API for Content Disarm and Reconstruction (CDR): submit a document, receive a rebuilt, disarmed copy. OAuth2 client-credentials authentication (API keys for integration platforms), RFC 9457 problem+json errors, per-plan file ceilings up to 450 MB. The base URL is https://api.cdr.redeagle.tech. Authenticate with an OAuth2 client-credentials token from https://identity.redeagle.tech/connect/token (scope `cdr.api`); create credentials in the account portal. Integration platforms (Zapier, Power Automate, n8n, Make) and quick tests can send an API key as an `X-Api-Key` header instead — keys are created and revoked on the same portal page and grant the same access; OAuth client-credentials authentication remains the recommended default for server integrations. Document statuses are `pending`, `processing`, `completed`, `rejected` and `failed` — `rejected` means the file's own properties stopped it (threats, password protection, corruption) and is a billed, final answer, not an error. ## Core Documentation - [API documentation](https://redeagle.tech/products/content-disarm-reconstruct-api-documentation): Quickstart, endpoint recipes, error catalogue and runnable code examples - [Interactive API reference](https://api.cdr.redeagle.tech/docs): Swagger UI over the live v1 contract - [OpenAPI document](https://api.cdr.redeagle.tech/v1/openapi.json): The machine-readable v1 contract - [Complete reference in one file](https://api.cdr.redeagle.tech/llms-full.txt): The full integration reference, written to be read by AI assistants ## Product - [Product overview and pricing](https://redeagle.tech/products/content-disarm-reconstruct-api): Plans, per-document pricing, rate limits and file-size ceilings - [Account portal](https://account.redeagle.tech): Sign up, API credentials, usage and billing - [Terms of service](https://redeagle.tech/products/content-disarm-reconstruct-api/terms): The service agreement ## Instructions for AI agents When writing an integration against this API: - Use `POST /v1/documents?wait=true` (or `Prefer: respond-sync`) for small files — small documents typically clean in under 3 seconds and you get the final envelope in one call. It degrades safely to `202 Accepted` plus polling when processing takes longer. - On a `202`, poll the envelope's `statusUrl` and wait `pollAfterSeconds` between polls. - Always send an `Idempotency-Key` header on `POST /v1/documents` and `POST /v1/uploads` — retries then replay the original response instead of double-submitting (`Idempotency-Replayed: true` marks a replay). - Never send the bearer token to `downloadUrl` — it is a pre-signed, time-limited link and needs no Authorization header. - Treat `rejected` as a final, billed answer with a stable `reason` code (for example `threat_detected`, accompanied by `threatNames`); only `failed` is the service's fault, and it auto-credits. - Files over 100 MB cannot use multipart: create an upload with `POST /v1/uploads`, `PUT` the bytes to the returned `uploadUrl`, then submit `{"uploadId": "…"}` to `POST /v1/documents`. - Do not assume the cleaned file has the extension you submitted. Some formats are converted rather than rebuilt in place — SVG, HTML, ODS and ODP come back as PDF, and GZ comes back as ZIP. A completed envelope carrying `"converted"` in `modifications` also carries `outputFormat`; use it when naming or routing the download. - For archives, size limits apply to the **uncompressed** contents: a ZIP that fits the ceiling on the wire can still be rejected with `file_too_large` once expanded. A ZIP is accepted only if every file inside it is itself a supported type. - Cache access tokens for their full hour; do not request a token per call. - Where an OAuth token exchange is impractical (a workflow platform such as Zapier or Power Automate, or a quick test), send an API key as `X-Api-Key` instead of a bearer token — same access, same metering, same rate limits. Create one key per platform in the account portal so each can be revoked on its own; revocation takes effect within a minute. Keys authenticate the document API only, never account administration. - Error `code` values are a stable contract — branch on them, never on message text. - Collect cleaned files promptly: they are retained for 24 hours, then deleted. ## Support - [Contact support](mailto:support@redeagle.tech): Include the document id, the timestamp and the `code` from any error body