---
title: "Withdraw credits and create exports"
method: POST
path: "/exchanges/{ExchangeCode}/account/{AccountIdentifier}/program/{ProgramCode}/action/withdraw-and-export"
tags: ["Exchange"]
---

# Withdraw credits and create exports

`POST /exchanges/{ExchangeCode}/account/{AccountIdentifier}/program/{ProgramCode}/action/withdraw-and-export`

## Request

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

Allows the combination of withdrawal of credits and creation of export in bulk

## Path parameters

- `ExchangeCode` string, required
- `AccountIdentifier` string, required
- `ProgramCode` string, required: Ref.Data.PROGRAM

## Request body

- object
  - `dryRun` boolean: If true it will only do the validation of the request but not withdraw nor export
  - `exports` object[], required
    - `ein` string, required
    - `quantity` integer, required
    - `externalIdentifier` string

## Response `200`

Successful withdraw and export

- object
  - `batchIdentifier` string, required: EMA export batch identifier
  - `exports` object[], required
    - `transferIdentifier` string, required
    - `externalIdentifier` string

## 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)
