# API Withdraw Parameters

## Parameters

- **delegator_address**  
  `string`  
  *required*  
  Address to withdraw from

- **validator_address**  
  `string`  
  *required*  
  Validator address to withdraw from

- **delegator_pubkey**  
  `string`  
  *required*  
  Delegator public key

- **amount**  
  `string`  
  *required*  
  Amount to withdraw in NEAR

- **network**  
  `string`  
  *enum*  
  *required*  
  Network withdraw is on.  
  Allowed: `testnet`, `mainnet`

# Response Codes

- **`201`**  
  Success  
  - **data**  
    - **network**  
      `string`  
      Network withdrawn from  
    - **unsigned_transaction_serialized**  
      `string`  
      Unsigned transaction serialized  
    - **signing_payload**  
      `string`  
      Signing payload

- **`400`**  
  Invalid parameters

- **`422`**  
  Unprocessable Entity

# Example cURL Request

```shell
curl --request POST \
     --url https://api.figment.io/near/withdraw \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: your-api-key-here' \
     --data '  
{  
  "network": "testnet"  
}  
'
```

# Example Response Structure

```json
{
  "data": {
    "network": "string",
    "unsigned_transaction_serialized": "string",
    "signing_payload": "string"
  }
}
```
