---
title: "Create retirements"
method: POST
path: "/retirements/account/{AccountIdentifier}/program/{RetirementProgramCode}/action/create"
tags: ["Retirements"]
---

# Create retirements

`POST /retirements/account/{AccountIdentifier}/program/{RetirementProgramCode}/action/create`

## Request

- Base URL: `https://sandbox.preprod.connect.xpansiv.com/app/api/v1`
- URL: `https://sandbox.preprod.connect.xpansiv.com/app/api/v1/retirements/account/{AccountIdentifier}/program/{RetirementProgramCode}/action/create`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/xpansiv/apis/xpansiv-connect-api/docs/retirements/account/:AccountIdentifier/program/:RetirementProgramCode/action/create/post.ts> (a function with typed inputs; its response is checked against the schema)

Allows creation retirements in bulk

## Path parameters

- `AccountIdentifier` string, required
- `RetirementProgramCode` string, required: Retirement program code. Ref.Data.RETIREMENT_PROGRAM

## Request body

- object
  - `dryRun` boolean: If true it will only do the validation of the request but not to create the retirements
  - `retirements` object[]
    - `ein` string, required
    - `quantity` integer, required
    - `taxLotSelectionStrategy` string: Ref.Data.TAX_LOT_SELECTION_STRATEGY
    - `quantityPerTaxLot` object[]
      - `taxLotId` integer, required
      - `quantity` integer, required
    - `externalIdentifier` string
  - `attributes` object

## Response `200`

Retirements

- object
  - `retirementIdentifiers` string[]
  - `batchIdentifier` string: EMA retirement batch identifier

## Other responses

- `400`: Bad request
- `401`: Not authorized error
- `500`: Internal server error

---

[API](https://skmtc.dev/xpansiv/apis/xpansiv-connect-api.md) - [All operations](https://skmtc.dev/xpansiv/apis/xpansiv-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/xpansiv/apis/xpansiv-connect-api/revisions/01c1f2c4ec1e?raw)
