---
title: "Prefetch brand data"
method: POST
path: "/utility/prefetch"
tags: ["Utility"]
---

# Prefetch brand data

`POST /utility/prefetch`

## Request

- Base URL: `https://api.context.dev/v1`
- URL: `https://api.context.dev/v1/utility/prefetch`
- Auth: HTTP bearer

Queue brand or styleguide data so a later lookup can return sooner.

## Request body

- object
  - `type` 'brand' | 'styleguide', required: Data to prefetch.
  - `identifier` union, required: Identifier of the target to prefetch. Provide exactly one of domain or email.
    - UtilityPrefetchDomainIdentifier: Prefetch by domain.
      - `domain` string, required: Domain, e.g. `stripe.com`.
    - UtilityPrefetchEmailIdentifier: Prefetch by email. The domain will be extracted and validated.
      - `email` string, email, required: Email address to prefetch data for. The domain will be extracted from the email. Free email providers (gmail.com, yahoo.com, etc.) and disposable email addresses are not allowed.
  - `timeoutOpts` Timeout: Request deadline and what to return when it passes.
    - `milliseconds` integer, required: Deadline in milliseconds.
    - `behavior` 'fail': Only "fail" is supported: return 408 at the deadline.
  - `tags` string[]: Labels for filtering usage in the dashboard.

## Response `200`

Successful response

- object
  - `status` string: Always `ok` on success.
  - `message` string: Success message
  - `type` 'brand' | 'styleguide': The type of prefetch that was queued, echoed from the request
  - `domain` string: The domain that was queued for prefetching
  - `key_metadata` KeyMetadata: Credits this request used and your remaining balance.
    - `credits_consumed` integer, required: Credits charged for this request.
    - `credits_remaining` integer, required: Credits remaining for your organization.
  - `request_id` string, uuid, required: Unique ID of this request, also in `X-Request-Id`. Include it when contacting support.

## Other responses

- `400`: Bad Request - validation error
- `401`: Missing or invalid API key.
- `402`: Insufficient credits (`USAGE_EXCEEDED`); authentication is valid. Retry once funded. Legacy deployments may return 401.
- `403`: Forbidden - Paid subscription required
- `408`: Request Timeout
- `422`: Free or disposable email domain.
- `429`: Rate limit exceeded. Organization concurrency rejections include structured error_data and subscription settings; follow Retry-After before retrying.
- `500`: Internal server error

## Changes

- **2026-10-21** `61627728926b`: 1 warning
  - added the new `NO_PUBLISHED_MARKDOWN` enum value to the `error_code` response property for the response status `402`
- **2026-10-19** `aeb64a2b7925`: 1 warning
  - added the new `USAGE_EXCEEDED` enum value to the `error_code` response property for the response status `401`
- **2026-10-19** `4ddcf49b9fe5`: 3 info
  - added the non-success response with the status `402`
  - added the optional property `error_data` to the response with the `429` status
  - removed the `USAGE_EXCEEDED` enum value from the `error_code` response property for the response status `401`
- **2026-10-16** `2125f3e94e52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context/apis/brand-api/changes/utility/prefetch/post.md)

---

[API](https://skmtc.dev/context/apis/brand-api.md) · [All operations](https://skmtc.dev/context/apis/brand-api/llms.txt) · [OpenAPI document](https://skmtc.dev/context/apis/brand-api/revisions/9e2ab7841fb1?raw)
