← DocConvert

Authentication

All conversion and billing endpoints require a valid, active API key in the request header.

API key header

Include your key on every authenticated request:

X-API-Key: dc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Obtaining a key

Register via POST /v1/auth/register with your email. The response includes:

Important: New keys are created with is_active: false. You cannot call /v1/convert until Stripe confirms your subscription via webhook. Attempting to use an inactive key returns 402 PAYMENT_REQUIRED.

Key lifecycle

  1. Register — key created, Stripe customer created, checkout session returned
  2. Checkout — user completes payment on Stripe
  3. Activatedcustomer.subscription.created webhook sets is_active: true
  4. Use API — conversions count against monthly quota

Error responses

StatusCodeMeaning
401INVALID_API_KEYMissing, unknown, or malformed key
402PAYMENT_REQUIREDValid key but not yet activated (checkout incomplete)
429QUOTA_EXCEEDEDMonthly plan limit reached
429RATE_LIMITEDToo many requests per minute

Full error reference: Errors