# NEAR Withdrawal Intent Creation

## Request Object

### network
- **Type:** string  
- **Enum Required:**  
  - `mainnet`  
  - `testnet`  
  - `localnet`

Request object to create a new withdrawal intent for NEAR.

### wallet_address
- **Type:** string  
- **Required:** Yes  
- **Pattern:** `^([a-km-zA-HJ-NP-Z1-9]{22,44})|((([a-z\d]+[-_])*[a-z\d]+\.)*([a-z\d]+[-_])*[a-z\d]+)$`  
  - Description: Base58 encoded public key or registered named account. [Accounts](https://docs.near.org/concepts/basics/accounts/account-id/).

### public_key
- **Type:** string  
- **Required:** Yes  
- **Pattern:** `^ed25519:[a-km-zA-HJ-NP-Z1-9]{22,44}$`  
  - Description: Base58 encoded public key prefixed by ed25519, associated with the private key that will be used to sign the transaction.

### to
- **Type:** string  
- **Pattern:** `^([a-km-zA-HJ-NP-Z1-9]{22,44})|((([a-z\d]+[-_])*[a-z\d]+\.)*([a-z\d]+[-_])*[a-z\d]+)$`  
  - Description: Specifies the validator the stake was delegated to.

### plan_id
- **Type:** string  
  - Description: This feature enables you to stake to validators from the specified plan(s). When no plan id is specified, validators across all plans that match the API route will be available for staking. If it is a shared plan, you can stake to validators on a shared node from the specified plan.

## HTTP Response Codes

- `200` Created  
- `400` Invalid request.  
- `401` Header 'X-API-Key' missing.  
- `500` Internal server error.

## Example cURL Request

```shell
curl --request POST \
     --url https://svc.blockdaemon.com/boss/v1/near/mainnet/withdrawal-intents \
     --header 'accept: application/json' \
     --header 'content-type: application/json'
```

## Response Codes

- `200`  
- `400`  
- `401`  
- `500`
