---
title: "Relay a Safe withdrawal"
method: POST
path: "/safe/withdraw"
tags: ["Processing"]
---

# Relay a Safe withdrawal

`POST /safe/withdraw`

## Request

- Base URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor`
- URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor/safe/withdraw`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/docs/safe/withdraw/post.ts> (a function with typed inputs; its response is checked against the schema)

Submits a signed Safe withdrawal with sponsored gas.

## Headers

- `x-api-key` string: API key for authentication
- `x-api-version` string: API version identifier (e.g. "2026-04.amazon"). Optional today, will become required in a future release.

## Request body

- WithdrawRequestBody
  - `chainId` string, required: CAIP-2 chain identifier (e.g. "eip155:8453")
  - `safeAddress` string, required: Ethereum address (0x followed by 40 hex characters)
  - `safeTransaction` SafeTransaction, required
    - `to` string, required: Ethereum address (0x followed by 40 hex characters)
    - `value` string, required: Numeric string representing a bigint value
    - `data` string, required: Hex-encoded calldata, byte-aligned. Empty (`0x`) for a plain native-value transfer.
    - `operation` union, required
      - 0
      - 1
    - `safeTxGas` string, required: Numeric string representing a bigint value
    - `baseGas` string, required: Numeric string representing a bigint value
    - `gasPrice` string, required: Numeric string representing a bigint value
    - `gasToken` string, required: Ethereum address (0x followed by 40 hex characters)
    - `refundReceiver` string, required: Ethereum address (0x followed by 40 hex characters)
    - `nonce` string, required: Numeric string representing a bigint value
  - `signature` string, required: Hex-encoded string (0x followed by hex characters)

## Response `200`

Withdrawal relayed successfully

- WithdrawResponse
  - `message` string, required
  - `txHash` string: Hex-encoded string (0x followed by hex characters)

## Other responses

- `400`: Invalid request or unauthorized
- `401`: Authentication required or the presented credential is invalid.
- `403`: API key lacks required deposits scope
- `500`: Relay failed
- `503`: Tenant billing verification is temporarily unavailable; retry after 5 seconds.

## Changes

- **2026-11-06** `aa1767d704fa`: 5 info
  - the endpoint scheme security `internalProjectBearer` was added to the API
  - the endpoint scheme security `tenantApiKey` was added to the API
  - the `header` request parameter `x-api-key` became optional
  - added the non-success response with the status `401`
  - …1 more
- **2026-09-17** `676300ac19ff`: 3 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `403` status
  - added the optional property `code` to the response with the `500` status
- **2026-09-04** `54262a43c6a8`: 2 breaking
  - request property `chainId` list-of-types was narrowed by removing types `integer` from media type `application/json`
  - added the pattern `^[a-z0-9]+:[a-zA-Z0-9]+$` to the request property `chainId`
- **2026-08-19** `c9aa3f252e4f`: 1 warning
  - changed the pattern of the request property `safeTransaction/data` from `^0x[a-fA-F0-9]+$` to `^0x([a-fA-F0-9]{2})*$`
- **2026-07-07** `7514db27036a`: 1 info
  - the `chainId/anyOf[subschema #1]/` request property's exclusiveMinimum was decreased from `true` to `0.00`

[Operation history](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/changes/safe/withdraw/post.md)

---

[API](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api.md) - [All operations](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/revisions/aa1767d704fa?raw)
