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

# Update Asset API

> Update Breezing asset mappings and spam status by ID to keep token accounting rules accurate across crypto accounting workflows.



## OpenAPI

````yaml PATCH /assets/{id}
openapi: 3.1.0
info:
  title: Breezing Public API
  version: 1.0.0
  description: >-
    Crypto accounting API for programmatic access and AI agents. Authenticate
    with an API key using the Authorization header: `Bearer brz_...`
servers:
  - url: https://api.breezing.io/v1
security:
  - BearerAuth: []
paths:
  /assets/{id}:
    patch:
      tags:
        - Assets
      summary: Update asset accounting mapping
      description: >-
        Update a token asset's GL account mapping (accountCode + accountName) or
        spam flag.


        GL mappings are the balance-sheet accounts for this token, only relevant
        when balanceSheetSetup is "token" (Token View: one GL account per token,
        balances aggregated across all wallets). For example, map ETH to account
        code "1201" / name "Crypto Assets - ETH". For custody-based tracking,
        use Wallet View or Combined View instead (set via Rules on
        transactions).


        Set isSpam=true to flag airdrop or scam tokens. Breezing auto-detects
        many spam tokens, but use this for any the auto-detection missed. Spam
        tokens are hidden from the transaction view and excluded from accounting
        software sync.
      parameters:
        - schema:
            type: string
            description: Asset ID
            example: '1'
          required: true
          description: Asset ID
          name: id
          in: path
        - schema:
            type: string
            description: >-
              Organization ID. Use GET /v1/companies to discover available
              org/company pairs.
            example: '1'
          required: true
          description: >-
            Organization ID. Use GET /v1/companies to discover available
            org/company pairs.
          name: orgId
          in: query
        - schema:
            type: string
            description: >-
              Company ID. Use GET /v1/companies to discover available companies
              and their access levels.
            example: '1'
          required: true
          description: >-
            Company ID. Use GET /v1/companies to discover available companies
            and their access levels.
          name: companyId
          in: query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchAssetBody'
      responses:
        '200':
          description: Asset updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      updated:
                        type: integer
                    required:
                      - updated
                required:
                  - success
                  - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: >-
            API key has no access to this company, has read-only access where
            write was required, or the company subscription is inactive
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Asset not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
      security:
        - BearerAuth: []
components:
  schemas:
    PatchAssetBody:
      type: object
      properties:
        accountCode:
          type: string
          nullable: true
          maxLength: 63
          description: >-
            GL account code from the chart of accounts. Used for Token View
            balance-sheet mapping (balanceSheetSetup="token"): one GL account
            per token across all wallets. Call company_get to find the right
            code.
          example: '1200'
        accountName:
          type: string
          nullable: true
          maxLength: 127
          description: >-
            GL account name matching the code (e.g. "Crypto Assets - ETH").
            Displayed in reports and synced to accounting software.
          example: Crypto Assets
        isSpam:
          type: boolean
          description: >-
            Spam flag. Set true to mark airdrop/scam tokens. Hides from
            transaction view and excludes from accounting software sync.

````