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

# Approve a Device Code

> The account owner's approve-or-deny decision, made from a signed-in browser session.

The human's decision, submitted by the [dashboard](https://app.zinc.com/activate) approval page. It takes a signed-in browser session — an API key approving a device code would be a key minting a key.

<Warning>
  Agents cannot call this. A request carrying an API key instead of a session returns `401 unauthorized`. Show your operator `human_message` and poll [`POST /device/token`](/docs/v2/api-reference/device/redeem-device-code).
</Warning>

`granted: false` denies the code, and the waiting agent's next poll gets `403 access_denied`.

Approval issues the live key, and — when a `zn_test_` key was attached to the code — moves that sandbox's orders and key onto the account.


## OpenAPI

````yaml versions/latest.json POST /device/approve
openapi: 3.1.0
info:
  title: Zinc
  summary: >-
    Zinc lets you search, buy, and return items from top online retailers with a
    single API.
  description: >-
    Search, buy, and return items from top online retailers with a single API.
    Supports AI agent ordering via MPP (HTTP 402) — no account required.
    Supported retailers include 1-800-Flowers, Ace Hardware, Amazon, Amazon DE,
    Barnes & Noble, Best Buy, Chewy, Gap, IBS, Lowe's, Macys, Partstown, and 12
    more. Ships to the US and 2 other countries (DE, IT).
  version: '2026-08-21'
  x-logo:
    url: https://mintlify.s3.us-west-1.amazonaws.com/zinc/logo/light.png
  contact:
    name: Zinc API Support
    email: support@zinc.com
    url: https://zinc.com/docs
  x-guidance: >-
    Zinc lets AI agents buy products from online retailers via a single API. Use
    POST /agent/orders to place an order — no Zinc account needed, payment is
    handled via MPP (HTTP 402 flow). Provide a product URL from a supported
    retailer, a shipping address, and max_price in cents. The API charges
    max_price + $1 API fee upfront and refunds the difference on completion. To
    find products first, the /agent/* data endpoints (search, products/search,
    products/offers, products/details) are MPP-paid at $0.01 per call;
    /agent/search returns orderable URLs to feed straight into /agent/orders.
    GET /retailers lists supported retailers for free (no payment or account).
    Authenticated equivalents (orders, products, managed-accounts) require a
    Bearer token (API key prefixed zn_); those orders are paid from a prefunded
    wallet — GET /wallet/me returns the spendable balance and per-order fee, so
    check it before POST /orders to avoid a 402. Docs: https://zinc.com/docs
    Supported retailers include 1-800-Flowers, Ace Hardware, Amazon, Amazon DE,
    Barnes & Noble, Best Buy, Chewy, Gap, IBS, Lowe's, Macys, Partstown, and 12
    more, shipping to the US and 2 other countries (DE, IT).
  x-supported-retailers:
    - 1-800-Flowers
    - Ace Hardware
    - Amazon
    - Amazon DE
    - Barnes & Noble
    - Best Buy
    - Chewy
    - Gap
    - IBS
    - Lowe's
    - Macys
    - Partstown
    - Pokémon Center
    - Sephora
    - Target
    - The Home Depot
    - TikTok
    - Uniqlo
    - Walmart
    - Wayfair
    - Zinc
    - eBay
    - libraccio
    - zazzle
  x-supported-countries:
    - US
    - DE
    - IT
servers:
  - url: https://api.zinc.com
    description: Production
security:
  - BearerAuth: []
paths:
  /device/approve:
    post:
      tags:
        - device
      summary: Approve or deny a device code (signed-in browser only)
      description: |-
        The human's decision. A machine credential must never make it: an API
        key approving a device code would be a key minting a key.
      operationId: decide_device_code_device_approve_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceApproveRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceApproveResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DeviceApproveRequest:
      properties:
        user_code:
          type: string
          maxLength: 16
          minLength: 4
          title: User Code
        granted:
          type: boolean
          title: Granted
      type: object
      required:
        - user_code
        - granted
      title: DeviceApproveRequest
    DeviceApproveResponse:
      properties:
        status:
          type: string
          title: Status
        name:
          type: string
          title: Name
        message:
          type: string
          title: Message
      type: object
      required:
        - status
        - name
        - message
      title: DeviceApproveResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Zinc API key (Bearer zn_...)

````