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

# Categorize a transaction

> Assigns a chart-of-accounts entry to a transaction's draft postings.



## OpenAPI

````yaml /openapi.json patch /api/transactions/{id}/category
openapi: 3.1.0
info:
  title: Equated API
  version: 1.0.0
  description: >-
    Agent-facing accounting API. Authenticate with a bearer token issued from
    Settings → API Tokens, or via the in-app session cookie when called from the
    web client.
servers:
  - url: https://app.equated.co
    description: API server
security: []
paths:
  /api/transactions/{id}/category:
    patch:
      tags:
        - Transactions
      summary: Categorize a transaction
      description: Assigns a chart-of-accounts entry to a transaction's draft postings.
      parameters:
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                categoryId:
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                counterpartyOrgMerchantId:
                  type: integer
                  nullable: true
                  minimum: 0
                  exclusiveMinimum: true
              required:
                - categoryId
      responses:
        '200':
          description: Updated transaction
          content:
            application/json:
              schema:
                nullable: true
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token issued from the Equated app under Settings → API Tokens.

````