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

# Prefetch data

`POST /utility/prefetch`

Signal that you may fetch data soon to improve latency. The type field selects what to prefetch ('brand' queues a brand data fetch, 'styleguide' queues a styleguide extraction) and identifier carries exactly one lookup key: a domain, or an email whose domain is extracted and validated (free email providers and disposable email addresses are not allowed).

## Request body

- object
  - `type` 'brand' | 'styleguide', required — What to prefetch: 'brand' warms the brand data cache, 'styleguide' warms the styleguide cache.
  - `identifier` union, required — Identifier of the target to prefetch. Provide exactly one of domain or email.
    - UtilityPrefetchDomainIdentifier — Prefetch by domain.
      - `domain` string, required — Domain name to prefetch data for
    - 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.
  - `timeoutMS` integer — Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
  - `tags` string[] — Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

## Response `200`

Successful response

- object
  - `status` string — Status of the response, e.g., 'ok'
  - `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 — Metadata about the API key used for the request. Included in every response whenever a valid API key is provided, even when the response status is not 200.
    - `credits_consumed` integer, required — The number of credits consumed by this request.
    - `credits_remaining` integer, required — The number of credits remaining for your organization after this request.

## Other responses

- `400` — Bad Request - validation error
- `401` — Unauthorized
- `403` — Forbidden - Paid subscription required
- `408` — Request Timeout
- `422` — Unprocessable Entity - Free email or disposable email detected
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/context/apis/context-dev.md) · [All operations](https://skmtc.net/context/apis/context-dev/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/context/context-dev/revisions/b037ec95b2e8/schema)
