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

# Replace a unit's chip

> Pairs a replacement chip to the unit and retires the currently paired one. The replacement chip must already exist and not be paired to any unit. Available until the unit is claimed; afterwards the chip is permanently locked. Poll GET /v1/units/{unit_id}/chip-replacements/{replacement_id} for status.



## OpenAPI

````yaml /openapi.json post /v1/units/{unit_id}/chip-replacements
openapi: 3.1.0
info:
  title: Endstate API
  version: v1
  description: Endstate developer API for chip verification and ownership workflows.
servers:
  - url: https://api2.endstate.io
    description: Production
security: []
paths:
  /v1/units/{unit_id}/chip-replacements:
    post:
      tags:
        - chips
      summary: Replace a unit's chip
      description: >-
        Pairs a replacement chip to the unit and retires the currently paired
        one. The replacement chip must already exist and not be paired to any
        unit. Available until the unit is claimed; afterwards the chip is
        permanently locked. Poll GET
        /v1/units/{unit_id}/chip-replacements/{replacement_id} for status.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: unit_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateChipReplacementRequest'
            example:
              new_chip_id: ABCDEF0123
      responses:
        '201':
          description: The created replacement.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChipReplacement'
              example:
                id: 00000000-0000-4000-8000-000000000000
                unit_id: 22222222-2222-4222-8222-222222222222
                old_chip_id: ABCDEF0122
                new_chip_id: ABCDEF0123
                status: prepared
                created_at: '2026-06-15T12:00:00.000Z'
      security:
        - ApiKeyBearer: []
components:
  schemas:
    CreateChipReplacementRequest:
      type: object
      properties:
        new_chip_id:
          type: string
          minLength: 1
          description: >-
            The chip that replaces the unit's current chip. Must already exist
            and not be paired to any unit.
          example: ABCDEF0123
      required:
        - new_chip_id
      example:
        new_chip_id: ABCDEF0123
    ChipReplacement:
      type: object
      properties:
        id:
          type: string
          format: uuid
        unit_id:
          type: string
          format: uuid
        old_chip_id:
          type: string
          description: The chip being retired from the unit.
        new_chip_id:
          type: string
          description: The chip replacing it.
        status:
          type: string
          enum:
            - prepared
            - submitted
            - confirmed
            - failed
          description: Replacement progress. Poll until `confirmed`; `failed` is terminal.
        created_at:
          type: string
      required:
        - id
        - unit_id
        - old_chip_id
        - new_chip_id
        - status
        - created_at
      example:
        id: 00000000-0000-4000-8000-000000000000
        unit_id: 22222222-2222-4222-8222-222222222222
        old_chip_id: ABCDEF0122
        new_chip_id: ABCDEF0123
        status: submitted
        created_at: '2026-06-15T12:00:00.000Z'
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: end_sk
      description: >-
        Use `Authorization: Bearer end_sk_*` for partner API keys (e.g.
        `end_sk_AbCd_example_api_key`).

````