> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prefetch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /logo/token/rotate

> Replace your logo CDN token. Logos embedded with the old token stop loading at once.

## Overview

Issues a new publishable token for your organisation and retires the old one immediately. Every logo already embedded with the old token stops loading, so rotate only when someone else is using your token against your quota — then update your pages with the new one.

```bash theme={"theme":"css-variables"}
curl -X POST "https://api.prefetch.io/logo/token/rotate" -H "X-API-Key: $PREFETCH_API_KEY"
```

Free. Not available through RapidAPI.


## OpenAPI

````yaml POST /logo/token/rotate
openapi: 3.1.0
info:
  title: Prefetch API
  description: >-
    Extract brand identity, company data, screenshots, IAB classifications, and
    clean page content from any URL.
  version: 1.0.0
  contact:
    email: support@prefetch.io
servers:
  - url: https://api.prefetch.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Endpoints
    description: Data extraction endpoints. All require authentication and consume credits.
  - name: Health
    description: Health and readiness probes. No authentication required.
paths:
  /logo/token/rotate:
    post:
      tags:
        - Endpoints
      summary: Rotate your logo CDN token
      description: >-
        Replaces your organisation's logo token. The old one stops working at
        once — and with it every logo already embedded with it — so rotate only
        a token someone else is using against your quota.
      operationId: rotateLogoToken
      responses:
        '200':
          description: The new token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/LogoTokenData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - success
                  - data
                  - meta
              example:
                success: true
                data:
                  token: pk_9a8b7c6d5e4f40312a1b2c3d4e5f6a7b
                  cdn_url: https://logo.prefetch.io
                  example: >-
                    https://logo.prefetch.io/stripe.com?token=pk_9a8b7c6d5e4f40312a1b2c3d4e5f6a7b
                  quota: 100000
                  used: 0
                  period: '2026-10-01'
                meta:
                  requestId: 6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b
                  durationMs: 1840
        '400':
          description: Invalid or missing parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Revoked key, expired key, blocked URL, or credit limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate or concurrency limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable — retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    LogoTokenData:
      type: object
      properties:
        token:
          type: string
          description: >-
            Your organisation's publishable logo token. Safe to put in a web
            page: it serves logo images only, within your plan's quota.
          example: pk_4f1c9e2b7a0d4c3e8b6a1f2d3c4b5a69
        cdn_url:
          type: string
          example: https://logo.prefetch.io
        example:
          type: string
          example: >-
            https://logo.prefetch.io/stripe.com?token=pk_4f1c9e2b7a0d4c3e8b6a1f2d3c4b5a69
        quota:
          type: number
          nullable: true
          description: Logo requests included this month; null is unlimited.
          example: 100000
        used:
          type: number
          description: >-
            Logo requests counted this month. Counts reach it within a minute or
            so.
          example: 1234
        period:
          type: string
          nullable: true
          description: The month the counts are for (its first day, UTC).
          example: '2026-10-01'
      required:
        - token
        - cdn_url
        - example
        - quota
        - used
        - period
    Meta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: Unique identifier for this request.
          example: a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d
        durationMs:
          type: integer
          nullable: true
          description: Time taken to process the request in milliseconds.
          example: 1842
      required:
        - requestId
        - durationMs
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Always false. Absent, like `meta`, on authentication and rate-limit
            errors, which are answered before a request is processed.
        error:
          type: string
          description: >-
            Human-readable error message. The wording can change: branch on
            `error_code`.
          example: Credit limit exceeded
        error_code:
          type: string
          enum:
            - INVALID_REQUEST
            - PAYLOAD_TOO_LARGE
            - NOT_FOUND
            - CONFLICT
            - UNAUTHORIZED
            - FORBIDDEN
            - CREDITS_EXHAUSTED
            - RATE_LIMITED
            - CONCURRENCY_LIMITED
            - URL_BLOCKED
            - URL_NOT_PERMITTED
            - DNS_RESOLUTION_FAILED
            - TARGET_BLOCKED
            - TARGET_CONNECTION_FAILED
            - TARGET_TIMEOUT
            - TARGET_SSL_ERROR
            - TARGET_SERVER_ERROR
            - TARGET_CLIENT_ERROR
            - TARGET_NOT_A_PAGE
            - TARGET_UNLOADABLE
            - RESEARCH_INCONCLUSIVE
            - TIMEOUT
            - SERVICE_BUSY
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
          description: >-
            What went wrong, for machines. Stable: a code keeps its meaning once
            published. See [Error handling](/concepts/errors).
          example: CREDITS_EXHAUSTED
        retryable:
          type: boolean
          description: >-
            Whether the same request can succeed if sent again after a short
            wait (honour `Retry-After` when present). False for problems with
            the request or the target.
          example: false
        retryAfterSeconds:
          type: integer
          description: 'On `RATE_LIMITED`: seconds until a request will be accepted.'
        limit:
          type: integer
          description: >-
            On `CONCURRENCY_LIMITED`: how many requests this key may have in
            flight.
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - error
        - error_code
        - retryable
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.