Skip to main content
Every JSON response from the API ships in the same envelope. Your client should unwrap it once and let the rest of your code work with the inner data.

Shape

The OpenAPI spec describes the inner data shape only — the envelope is always there.

requestId

Always present, on success and error. UUIDv7 format. Log it on every request so support requests can be traced end-to-end.

Branching on errors

Always branch on error.key, never on error.message. The message is human-readable and may change; the key is stable.

A reusable client

Define SkinsharkError once and unwrap there. The rest of your code never touches the envelope.

HTTP status vs envelope

Both are set on every response:
  • 2xxsuccess: true
  • 4xx / 5xxsuccess: false
If you read the body, the envelope is authoritative. If you only have the status code (e.g. logs), 4xx ≠ retry, 5xx = transient. See Error handling for retry strategy.