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

# 更新账单地址

> Replaces the user's billing address. Requires `portal:write`.

PUT 返回更新后的地址。Clink 校验必填字段，并复用现有 wallet 账单地址规则（配置国家名单，以及这些国家的 city/line1 要求）。只有 `portal:read` 的 token PUT 返回 `403`。


## OpenAPI

````yaml PUT /agent/platform/billing-address
openapi: 3.1.0
info:
  title: Clink Agent Portal API
  description: >-
    Agent Portal APIs let an Agent platform read and manage one user's Clink
    account with a portal user token: payment methods, orders, refunds, purchase
    instructions, payment credentials, payment results, and settings.
  version: 1.0.0
servers:
  - url: https://uat-api.clinkbill.com
    description: Sandbox
security:
  - PortalToken: []
paths:
  /agent/platform/billing-address:
    put:
      summary: Update billing address
      description: Replaces the user's billing address. Requires `portal:write`.
      operationId: updateBillingAddress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BillingAddressInput'
            example:
              country: US
              region: CA
              city: San Francisco
              line1: 1 Market Street
              line2: Suite 100
              postal_code: '94105'
      responses:
        '200':
          description: The updated address.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    format: int32
                    description: '`200` on success.'
                    example: 200
                  msg:
                    type: string
                    description: Result message.
                    example: Success
                  data:
                    $ref: '#/components/schemas/BillingAddress'
              example:
                code: 200
                msg: Success
                data:
                  country: US
                  region: CA
                  city: San Francisco
                  line1: 1 Market Street
                  line2: Suite 100
                  postal_code: '94105'
        '400':
          description: Invalid billing address.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, expired, or invalid portal token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Wrong token audience, missing `portal:write` scope (a
            `portal:read`-only token), or a platform client token used instead
            of a portal token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BillingAddressInput:
      type: object
      required:
        - country
        - region
        - city
        - line1
        - postal_code
      properties:
        country:
          type: string
          description: Country code/name.
          example: US
        region:
          type: string
          description: State, province, or region.
          example: CA
        city:
          type: string
          description: City.
          example: San Francisco
        line1:
          type: string
          description: Street address.
          example: 1 Market Street
        line2:
          type: string
          description: Additional address line.
          example: Suite 100
        postal_code:
          type: string
          description: Postal code.
          example: '94105'
    BillingAddress:
      type: object
      properties:
        country:
          type: string
          description: Country code/name.
          example: US
        region:
          type: string
          description: State, province, or region.
          example: CA
        city:
          type: string
          description: City.
          example: San Francisco
        line1:
          type: string
          description: Street address.
          example: 1 Market Street
        line2:
          type: string
          description: Additional address line.
          example: Suite 100
        postal_code:
          type: string
          description: Postal code.
          example: '94105'
        status:
          type: string
          description: Address status.
    ErrorResponse:
      type: object
      description: Business errors use the standard envelope without `data`.
      properties:
        code:
          type: integer
          description: >-
            Numeric business error code. Judge an error by the HTTP status
            together with `code`, not by a string error code.
        msg:
          type: string
          description: Human-readable description.
  securitySchemes:
    PortalToken:
      type: http
      scheme: bearer
      description: >-
        Portal user token from `POST /agent/cwallet/platform/portal/tokens`.
        Reads require `portal:read`; writes require `portal:write`.

````

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