### API Parameters

- **network**: The Cosmos network to build a transaction for. Allowed values: `testnet`, `mainnet`.
- **delegator_address**: The address of the delegator.  
- **validator_address**: The address of the validator.  
- **amount**: Amount to undelegate.  
- **pubkey**: Public key of the delegator.  
- **pubkey_type**: Type of public key of the delegator. Allowed values: `secp256k1`, `multisig`.
- **gas_limit**: Gas limit for the transaction. Required if pubkey type is multisig.
- **gas_price**: Gas price for the transaction. Required if pubkey type is multisig.

### Response Codes

- **201**: Undelegate transaction created.
- **400**: Bad request.
- **422**: Unprocessable entity.

### Example CURL Request

```bash
curl --request POST \
     --url https://api.figment.io/cosmos/undelegate \
     --header 'content-type: application/json' \
     --header 'x-api-key: your-api-key-here' \
     --data '\n{\n  "network": "testnet"\n}\n'  
```
