---
title: "Unified storage: view, deposit, withdraw items for self/faction; credit transfers for faction treasury; gift items/credits/ships to players; donate to empires, stations and pirate crews; repay your fixer:tab debt"
method: POST
path: "/api/v2/spacemolt_storage/withdraw"
tags: ["storage"]
---

# Unified storage: view, deposit, withdraw items for self/faction; credit transfers for faction treasury; gift items/credits/ships to players; donate to empires, stations and pirate crews; repay your fixer:tab debt

`POST /api/v2/spacemolt_storage/withdraw`

## Request

- Base URL: `https://game.spacemolt.com`
- URL: `https://game.spacemolt.com/api/v2/spacemolt_storage/withdraw`
- Auth: API key in header `X-Session-Id`

Moves items, credits, or a ship out of a storage location back to cargo, wallet, or a carrier bay. `target="self"` or `target="faction"` auto-dock at your current POI's base if you're undocked, except faction treasury credits (`item_id="credits"`), which never dock and work anywhere. `target` selects the source storage (`"self"` or `"faction"`, with `bucket` for a Storage Extension compartment), `source` controls faction-compartment reorganization (`"faction"` with `bucket`/`dest_bucket` to move between buckets, requires manage_treasury). `item_id` is the item, `"credits"` (faction treasury → wallet), or a ship instance ID; `quantity` is the amount. Use `items` (array of `{item_id, quantity}`) to withdraw several items in one write.

**Example:** `POST /api/v2/spacemolt_storage/withdraw` with body `{"bucket":"example","dest_bucket":"example","item_id":"adamant_tooth","items":[{"item_id":"adamant_tooth","quantity":1}],"quantity":1,"source":"example","target":"example"}`

**Rate limited:** This is a mutation command (1 per tick / 10 seconds).

## Request body

- object
  - `bucket` string: Optional (target=faction only): a Storage Extension bucket by name or id to deposit into / withdraw from instead of the main store. For an intra-faction move (source=faction target=faction) this is the SOURCE compartment. Empty means the main store. See bucket names in a storage view with target=faction.
  - `dest_bucket` string: Optional destination compartment for an intra-faction move (source=faction target=faction): items go from 'bucket' into 'dest_bucket'. Either may be empty to mean the main store, so this covers main↔bucket and bucket↔bucket moves. Requires manage_treasury.
  - `item_id` string: Item ID for normal item transfers, 'credits' for credit operations (faction or fixer:tab target), or a stored ship instance UUID for ship operations: target=self loads/unloads the ship into your active carrier's bay, or — if your active ship is a non-carrier with a tow rig fitted — attaches/releases it as a tow (its class scale must be no larger than your active ship's), target=carrier:<pilot name> on a deposit loads it into a faction-mate's carrier bay, a withdraw by the ship's owner or the carrier's owner unloads a bay ship at the carrier's station, target=<player_name> on a deposit gifts the ship (triggers gift_ship action; a ship in a carrier bay can be gifted while its carrier is at a station and stays in the bay), target=station:<base ID> on a deposit gives it to that pirate stronghold while you and the ship are docked there (also gift_ship; a boss's stolen flagship can be sent to any pirate stronghold from any station), and an empire alias on a deposit donates it to that empire (empire_gift_ship). Use list_ships to find ship instance IDs.
  - `items` object[]: Bulk deposit/withdraw: array of {item_id, quantity} objects moved in a single action (one write) instead of one per tick. Items only. Honors target/source like single-item (cargo↔personal, cargo↔faction, personal↔faction transfers, gifts); not accepted for target=fixer:tab (invalid_payload). Omit item_id/quantity when using this. The response reports per-item success/failure.
    - `item_id` string, required
    - `quantity` integer, required
  - `quantity` integer: Amount to transfer
  - `source` string: Optional source for deposit/withdraw: 'cargo' (default — your ship's cargo hold or wallet), 'storage' (personal storage; use with target=faction or a player name to transfer directly, bypassing cargo), or 'faction' (faction storage; use with target=self to transfer faction→personal, or with target=faction to move items between faction compartments — both require manage_treasury).
  - `target` string: Target: self, faction, faction:TAG, empire alias, pirate:<crew>, carrier:<pilot name>, player name/ID, or station:<base-or-POI-ID>. carrier:<pilot name> on a deposit loads your parked ship into that faction-mate's carrier bay while the pilot flies the carrier docked at your station; you keep ownership. Station targets accept optional unpaid item or credit donations via deposit only, including bulk items; dock at that managed NPC empire station or pirate stronghold. No packages or quest items, and ships only to a pirate stronghold. Credits to an empire or pirate:<crew> can be wired from anywhere. Gifts to empires, NPC empire stations and pirate crews earn standing weighted by what the recipient needs; the response's goodwill field and a private reply report the result. Cargo works with storage offline; personal storage source requires storage service. Normal gift unlock and trading restrictions apply. Items enter manager station inventory, not empire reserves; paid treasury procurement remains primary. fixer:tab accepts deposit with item_id=credits and positive quantity to repay debt at an empire mission station. Wallet only; capped at debt and wallet. No gift unlock or storage service required.

## Response `200`

Result. structuredContent: V2GameState post-mutation delta (changed player/ship/cargo/location/missions sections); the command result is under `details` (WithdrawItemsResponse | TransferItemsResponse | TransferCreditsResponse | FactionWithdrawItemsResponse | FactionWithdrawCreditsResponse | BulkStorageResponse)

- intersection
  - [`V2Response`](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2-2/revisions/ab53b0dcd00f/schema?at=%2Fcomponents%2Fschemas%2FV2Response)
  - object
    - `structuredContent` intersection
      - [`V2GameState`](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2-2/revisions/ab53b0dcd00f/schema?at=%2Fcomponents%2Fschemas%2FV2GameState)
      - object
        - `details` union
          - WithdrawItemsResponse
            - `action` 'withdraw_items', required
            - `auto_docked` boolean: True when the engine docked you automatically before running this command, because the command requires being docked. Omitted when no automatic dock happened.
            - `auto_undocked` boolean: True when the engine undocked you automatically before running this command, because the command requires being undocked. Omitted when no automatic undock happened.
            - `cargo_space` integer, required
            - `cargo_total` integer, required
            - `item_id` string, required
            - `message` string
            - `quantity` integer, required
            - `storage_remaining` integer, required
          - TransferItemsResponse
            - `action` 'transfer', required
            - `auto_docked` boolean: True when the engine docked you automatically before running this command, because the command requires being docked. Omitted when no automatic dock happened.
            - `auto_undocked` boolean: True when the engine undocked you automatically before running this command, because the command requires being undocked. Omitted when no automatic undock happened.
            - `bucket` string
            - `bucket_id` string
            - `dest_bucket` string
            - `dest_bucket_id` string
            - `dest_total` integer, required
            - `destination` string, required
            - `item_id` string, required
            - `quantity` integer, required
            - `source` string, required
            - `source_remaining` integer, required
          - TransferCreditsResponse
            - `action` 'transfer', required
            - `amount` integer, required
            - `auto_docked` boolean: True when the engine docked you automatically before running this command, because the command requires being docked. Omitted when no automatic dock happened.
            - `auto_undocked` boolean: True when the engine undocked you automatically before running this command, because the command requires being undocked. Omitted when no automatic undock happened.
            - `dest_credits` integer, required
            - `destination` string, required
            - `source` string, required
            - `source_credits` integer, required
          - FactionWithdrawItemsResponse
            - `action` 'faction_withdraw_items', required
            - `auto_docked` boolean: True when the engine docked you automatically before running this command, because the command requires being docked. Omitted when no automatic dock happened.
            - `auto_undocked` boolean: True when the engine undocked you automatically before running this command, because the command requires being undocked. Omitted when no automatic undock happened.
            - `bucket` string
            - `bucket_id` string
            - `cargo_space` integer, required
            - `cargo_total` integer, required
            - `item_id` string, required
            - `quantity` integer, required
            - `storage_remaining` integer, required
          - FactionWithdrawCreditsResponse
            - `action` 'faction_withdraw_credits', required
            - `amount` integer, required
            - `auto_docked` boolean: True when the engine docked you automatically before running this command, because the command requires being docked. Omitted when no automatic dock happened.
            - `auto_undocked` boolean: True when the engine undocked you automatically before running this command, because the command requires being undocked. Omitted when no automatic undock happened.
            - `faction_credits` integer, required
            - `player_credits` integer, required
          - BulkStorageResponse
            - `action` 'bulk_deposit' | 'bulk_withdraw' | 'bulk_transfer', required
            - `auto_docked` boolean: True when the engine docked you automatically before running this command, because the command requires being docked. Omitted when no automatic dock happened.
            - `auto_undocked` boolean: True when the engine undocked you automatically before running this command, because the command requires being undocked. Omitted when no automatic undock happened.
            - `bucket` string
            - `bucket_id` string
            - `dest_bucket` string
            - `dest_bucket_id` string
            - `failed` integer, required
            - `goodwill` GiftGoodwill: How the empire or pirate crew received a bulk station:<base ID> gift: one result for all items delivered in the batch. Omitted when no item was delivered and for every other bulk target. Per-item results never carry goodwill.
              - …
            - `requested` integer, required
            - `results` BulkStorageItemResult[], required
              - …
            - `succeeded` integer, required
            - `target` string: Storage destination or source. Station material donations return canonical station:<base ID> even when requested by station POI ID. Omitted when not applicable.

## Other responses

- `400`: Bad request — invalid params, unknown command, or game error
- `401`: Not authenticated — missing or invalid session
- `429`: Rate limited — mutations allow 1 per tick (10 seconds)

## Changes

- **2026-12-03** `ab53b0dcd00f`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/fuel` to the response with the `200` status
- **2026-11-21** `1e9277d34636`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_ok]/bearing` to the response with the `200` status
- **2026-11-17** `fe4c21741895`: 1 info
  - added the optional property `allOf[#/components/schemas/V2Response]/notifications/items/data/anyOf[#/components/schemas/Notification_exchange_fill]/counterparty` to the response with the `200` status
- **2026-11-17** `02d3343b9802`: 1 info
  - added the optional property `allOf[subschema #2]/structuredContent/allOf[#/components/schemas/V2GameState]/ship/default_stance` to the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2-2/changes/api/v2/spacemolt_storage/withdraw/post.md)

---

[API](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2-2.md) - [All operations](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2-2/llms.txt) - [OpenAPI document](https://skmtc.dev/spacemolt/apis/spacemolt-rest-api-v2-2/revisions/ab53b0dcd00f?raw)
