Required HTTP Headers
This page documents the HTTP headers you must include when calling the Revolv3 API. Keep these headers consistent across environments (sandbox vs production) and never expose your static token in client-side code.Required headers
- Content-Type: application/json
- Indicates JSON request body for POST/PUT endpoints.
- x-revolv3-token:
<your-static-token>- Your Revolv3 static token used for authentication. Must be supplied on every API request. Store this securely on the server and rotate periodically.
- Accept: application/json (recommended)
- Explicitly request JSON responses.
Example: payments sale (curl)
Replace [your-token] and environment URL as appropriate.Common errors & troubleshooting
- 401 Unauthorized
- Cause: missing or invalid
x-revolv3-token. - Fix: confirm token value, ensure token matches environment (sandbox vs production), and send header exactly as
x-revolv3-token: <token>.
- Cause: missing or invalid
- 415 Unsupported Media Type
- Cause: missing or incorrect
Content-Type. - Fix: set
Content-Type: application/json.
- Cause: missing or incorrect
- 400 Bad Request (validation errors)
- Cause: malformed JSON or missing required fields in body.
- Fix: validate JSON payload and required fields.
- “Attempted to perform an unauthorized operation”
- Cause: token lacks permission for requested operation.
- Fix: check token scope/permissions via the portal (use the help icon to submit a ticket) or use appropriate merchant account credentials.
Best practices
- Never expose
x-revolv3-tokenin browser or public client code. Use server-side proxies or functions. - Keep separate tokens and credentials for sandbox and production.
- Rotate static tokens periodically and follow a staged rotation process (update server, test in sandbox, then rotate production).
- Use Idempotency-Key for retryable payment requests where applicable.

