Utility

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).

post/utility/prefetch

Request

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

Request body

type'brand' | 'styleguide' required

What to prefetch: 'brand' warms the brand data cache, 'styleguide' warms the styleguide cache.

timeoutMSinteger

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).

tagsstring[]

Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

Example request

{
  "tags": [
    "production",
    "team-alpha"
  ]
}

Response

Successful response

statusstring

Status of the response, e.g., 'ok'

messagestring

Success message

type'brand' | 'styleguide'

The type of prefetch that was queued, echoed from the request

domainstring

The domain that was queued for prefetching

Changes

    • warning

      added the new styleguide enum value to the response property for the response status

    • info

      added the new styleguide enum value to the request property

    • breaking

      the // request property's minLength was increased from 0 to 3

    • breaking

      the // request property's minLength was increased from 0 to 1

    • info

      added the new optional request property