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

# Update a unit

> Updates a unit's tap redirect URL. Send null to clear.



## OpenAPI

````yaml /openapi.json patch /v1/units/{unit_id}
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}:
    patch:
      tags:
        - units
      summary: Update a unit
      description: Updates a unit's tap redirect URL. Send null to clear.
      parameters:
        - schema:
            type: string
            format: uuid
            description: Unit id.
            example: 33333333-3333-3333-3333-333333333333
          required: true
          name: unit_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUnitRequest'
            example:
              redirect_url: https://brand.example/p
      responses:
        '200':
          description: The updated unit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unit'
              example:
                id: 33333333-3333-3333-3333-333333333333
                external_id: unit-001
                name: Example Unit
                attributes:
                  custom_attribute: value
                created_at: '2026-05-16T12:00:00.000Z'
                redirect_url: https://brand.example/p
                collection:
                  id: 8e1a7f50-90ab-4cde-8012-3456789abcde
                  name: Example Collection
                  external_id: collection-001
                  contract:
                    address: '0x1111111111111111111111111111111111111111'
                    chain_id: 84532
                    status: active
                  token:
                    status: active
                    serial: 5
                chips: []
      security:
        - ApiKeyBearer: []
components:
  schemas:
    UpdateUnitRequest:
      type: object
      properties:
        redirect_url:
          type:
            - string
            - 'null'
          format: uri
          description: Tap redirect URL for this unit. Send null to clear.
          example: https://brand.example/p
      required:
        - redirect_url
      additionalProperties: false
    Unit:
      type: object
      properties:
        id:
          type: string
          format: uuid
        external_id:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        attributes:
          type:
            - object
            - 'null'
          additionalProperties: {}
        created_at:
          type: string
          format: date-time
        redirect_url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Tap redirect URL for this unit; takes precedence over
            product/collection/org defaults.
          example: https://brand.example/p
        collection:
          allOf:
            - $ref: '#/components/schemas/CollectionMembership'
            - description: >-
                The unit's collection. Null only for units created before
                collections existed.
        chips:
          type: array
          items:
            $ref: '#/components/schemas/UnitChip'
          description: Chips paired to this unit.
      required:
        - id
        - external_id
        - name
        - attributes
        - created_at
        - redirect_url
        - collection
        - chips
    CollectionMembership:
      type:
        - object
        - 'null'
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
        external_id:
          type:
            - string
            - 'null'
        contract:
          type: object
          properties:
            address:
              type: string
              description: Unique address identifying the collection.
              example: '0x1111111111111111111111111111111111111111'
            chain_id:
              type: integer
              example: 84532
            status:
              type: string
              enum:
                - deploying
                - active
                - failed
              description: >-
                Collection lifecycle status. `deploying` while the collection is
                being provisioned; `active` once it is ready to use.
              example: active
          required:
            - address
            - chain_id
            - status
        token:
          $ref: '#/components/schemas/UnitToken'
      required:
        - id
        - name
        - external_id
        - contract
        - token
      description: >-
        The unit's collection and issuance status. Null only for units created
        before collections existed.
    UnitChip:
      type: object
      properties:
        chip_id:
          type: string
          description: Chip identifier from the tap URL.
          example: ABCDEF0123
        is_test:
          type: boolean
        scan_count:
          type: integer
          minimum: 0
        created_at:
          type: string
          format: date-time
      required:
        - chip_id
        - is_test
        - scan_count
        - created_at
    UnitToken:
      type: object
      properties:
        status:
          type: string
          enum:
            - pending
            - active
          description: >-
            Issuance state of this unit within the collection. `pending` until
            the unit is issued; `active` once issued. There is no failure
            status: a unit whose issuance cannot complete stays `pending` — if a
            unit remains `pending` well beyond a few minutes, stop polling and
            contact support.
          example: pending
        serial:
          type:
            - integer
            - 'null'
          description: >-
            Collection-scoped serial number. Assigned when the unit becomes
            `active`; null until then.
          example: 5
      required:
        - status
        - serial
  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`).

````