---
title: "Set a category for a transaction"
method: PUT
path: "/programs/{programCode}/accounts/{accountIdentifier}/userCategory"
tags: ["CategorizeTransaction"]
---

# Set a category for a transaction

`PUT /programs/{programCode}/accounts/{accountIdentifier}/userCategory`

Sets a user-defined category for a specific transaction.

## Path parameters

- `programCode` string, required
- `accountIdentifier` string, required

## Headers

- `X-GD-RequestId` string, required

## Request body

- SetUserCategoryRequest — Represents a request to set user-defined categories for transactions. Contains the account identifier and a list of categorized transactions to update. Inherits standard request metadata from Gd.Bos.DataTransfer.Request.RequestBase.
  - `categoriedTransactions` CategoriedTransaction[], nullable — The list of transactions with user-defined categories to be set or updated. Each Gd.Bos.DataTransfer.CategoriedTransaction contains transaction details and the assigned category.
    - `transactionIdentifier` string, nullable — The unique identifier for the transaction to be categorized.
    - `userCategory` string, nullable — The user-defined category assigned to the transaction (e.g., "Groceries", "Utilities", "Travel").

## Response `200`

OK

- SetUserCategoryResponse — Represents the response returned after setting a user's category. Used to indicate the outcome of a user category update operation. Inherits standard response metadata from Gd.Bos.DataTransfer.Response.ResponseBase.
  - `responseDetails` ResponseDetail[], nullable — Required: A list of response details providing status codes, descriptions, and additional information about the result of the operation.
    - `code` integer — The primary status or error code for the response (e.g., 200 for success, 400 for validation error).
    - `subCode` integer, nullable — An optional subcode providing more granular detail about the response or error.
    - `description` string, nullable — A human-readable description of the response, error, or status.
    - `url` string, nullable — A URL linking to documentation or a web page with more information about the response code.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.dev/greendot/apis/baas-apis.md) · [All operations](https://skmtc.dev/greendot/apis/baas-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/greendot/baas-apis/revisions/666553766b78/schema)
