> This page is for Taurus PROTECT, version v3.38.
> For other versions, use one of these documentation indexes:
> - v3.58 (default): https://taurushq.ferndocs.com/protect-capital/v3.58/llms.txt
> - v3.56: https://taurushq.ferndocs.com/protect-capital/v3.56/llms.txt
> - v3.54: https://taurushq.ferndocs.com/protect-capital/v3.54/llms.txt
> - v3.52: https://taurushq.ferndocs.com/protect-capital/v3.52/llms.txt
> - v3.50: https://taurushq.ferndocs.com/protect-capital/v3.50/llms.txt
> - v3.48: https://taurushq.ferndocs.com/protect-capital/v3.48/llms.txt
> - v3.46: https://taurushq.ferndocs.com/protect-capital/v3.46/llms.txt
> - v3.44: https://taurushq.ferndocs.com/protect-capital/v3.44/llms.txt
> - v3.42: https://taurushq.ferndocs.com/protect-capital/v3.42/llms.txt
> - v3.40: https://taurushq.ferndocs.com/protect-capital/v3.40/llms.txt
> - v3.38: https://taurushq.ferndocs.com/protect-capital/v3.38/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://taurushq.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://taurushq.ferndocs.com/_mcp/server.

# Creating An Atom Unstaking Request

## Basic Description

This endpoint is used to create an Unstaking Request in Taurus-PROTECT in the Cosmos Ecosystem.\
To understand what Staking is, please refer to the following [page](/user-guides/docs/staking) in the Taurus User Guides.

This endpoint would accept a POST Request with a JSON payload containing the Unstaking Request details.

The `amount` , `fromAddressId` , and `toValidatorAddressId`are the three required parameters that must be included within the JSON payload.

> **Warning**
>
> **Staking Amount for ATOM**
>
> It is important to note that in the Cosmos Ecosystem, **you are allowed to select the amount you want to stake**.

## Prerequisites

### Required Roles

Certain API endpoints require that the user has a specific role in order to access them. Roles are used to restrict access to certain functionality within the system and ensure that only authorized users are able to perform specific actions.

Here is the list of required Roles for this particular endpoint:

* RequestCreator
* TPUser

To find out more about roles, please refer to the following [page](/user-guides/docs/users-1#creating-a-new-user) in the Taurus User Guides.

### Required Input Parameters

Certain API endpoints require specific input parameters. Here is the list of Required Input Parameters for this particular endpoint:

* **fromAddressId** : the originating Address
* **amount** : the amount you would like to unstake
* **toValidatorAddressId** : the destination Validator Address used for Staking

> **Note**
>
> **Preconditions**
>
> It is important to note that the selected Addresses needs to pre-exist and be active in the system. In addition, the originating Address should have already been used for Staking, otherwise the Unstaking Request will fail.

## Call Example

You can find a basic example in cURL below.\
Please note that you will need to update the `BASEURL` and the `APITOKEN` for the command to function.\
In this example, Taurus-PROTECT has created a new Unstaking Request from Address 422470 to Validator Address 1792 with 1 ATOM as the specified amount to unstake and has assigned it a unique ID of 4268654.

**`cURL`**

```curl cURL
export BASEURL=https://taurus-protect-instance.com
export APIToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZXh0ZXJuYWxVc2VySUQiOiJ0ZWFtMUV4dGVybmFsVXNlcklEIiwidGVuYW50SUQiOjEsImNhcGl0YWxUZW5hbnRJRCI6MSwiZmlyc3RuYW1lIjoiSm9obiIsImxhc3RuYW1lIjoiRG9lIiwicm9sZXMiOlsidHB1c2VyIl0sImVtYWlsIjoidGVhbTFAYmFuay5jb20iLCJ1c2VybmFtZSI6InRlYW0xIiwiand0X3JlbmV3YWJsZV9hbW91bnQiOjAsImlzX3RvdHBfZW5hYmxlZCI6ZmFsc2UsImF1dGhfc3RhdHVzIjoiU1VDQ0VTUyIsImxhc3RfbG9naW4iOiIyMDIzLTAxLTAxVDAwOjAwOjAwLjE0OTc0NDIzMloiLCJsb2dnZWRfaW5fd2l0aF9zc28iOmZhbHNlLCJrZXkiOiIiLCJleHAiOjE2ODEyMTkyNzYsImlhdCI6MTY4MTIxNzQ3Nn0.K_85arIrigpkN1yHttCydpeT6oVg2c6PyQnuji907Og
curl --location "$BASEURL/api/rest/v1/requests/outgoing/cosmos/undelegate" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $APIToken" \
--data '{
  "fromAddressId": "422470",
  "amount": "1000000",
  "toValidatorAddressId": "1792"
}'
```

This piece of code sends a POST request to  [https://your-protect-instance.example.com/api/rest/v1/requests/outgoing/ftm/undelegate](https://your-protect-instance.example.com/api/rest/v1/requests/outgoing/ftm/undelegate) with the JSON string in the request body.

> **Tip**
>
> **Call Result**
>
> A successful response for the POST call to create an Unstaking Request for ATOM  might look like this:

```json
{
    "result": {
        "approvers": {
            "parallel": [
                {
                    "sequential": [
                        {
                            "externalGroupID": "team1",
                            "minimumSignatures": 1
                        }
                    ]
                },
                {
                    "sequential": [
                        {
                            "externalGroupID": "team2",
                            "minimumSignatures": 1
                        }
                    ]
                }
            ]
        },
        "currency": "ATOM",
        "currencyInfo": {
            "blockchain": "Cosmos",
            "decimals": "6",
            "displayName": "Cosmos - ATOM",
            "enabled": true,
            "hasStaking": true,
            "id": "4fb517ca989362d75b090610744a685d3791ef0d11637a97fddfe77095207a87",
            "isAccountBased": true,
            "isToken": true,
            "name": "Atom",
            "network": "cosmoshub",
            "symbol": "ATOM",
            "type": "token"
        },
        "envelope": "Cgc0MjY4NjcyEMuIocXdjc2uFxgSKqAKCDQShwIKZAoLY29zbW9zaHViLTQSGQoTbS80NCcvMTE4Jy8zJy8wJy8wJxj7r1QY/4cUIgV1YXRvbSoCIBpKKzQyMjQ3MDphN2IyOWVmMy03MTI0LTRiNDctOTczOC1jMmNmMjQxMGYyZWUSngEKJS9jb3Ntb3Muc3Rha2luZy52MWJldGExLk1zZ1VuZGVsZWdhdGUSdQotY29zbW9zMXF6ZTJ2d3NramZhbnk1NXU4MGF6bWZrejAyMjkzNzZlZGdsbmVjEjRjb3Ntb3N2YWxvcGVyMTk2YXg0dmMwbHdweG5kdTlkeWh2Y2E3amh4cDcwcm1jdnJqOTBjGg4KBXVhdG9tEgUxMDAwMCIXCgpyZXF1ZXN0X2lkEAEaBzQyNjg2NzIihgEKCXJ1bGVzX2tleRABGndDb3Ntb3MvVGF1cnVzL2Nvc21vcy5zdGFraW5nLnYxYmV0YTEuTXNnVW5kZWxlZ2F0ZShkZWxl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QKCWZlZV9kZW5vbRABGgV1YXRvbSIRCglmZWVfbGltaXQQAhoCYE4iHAoRaXNfY2FuY2VsX3JlcXVlc3QQARoFZmFsc2UiQgoPdHJhbnNhY3Rpb25faWRzEAYaLQorNDIyNDcwOmE3YjI5ZWYzLTcxMjQtNGI0Ny05NzM4LWMyY2YyNDEwZjJlZToJY29zbW9zaHVi",
        "id": "4268672",
        "rule": "rule = [source: any, validator: any, amount: any], approvals = ['team1': 1 sig|'team2': 1 sig]",
        "status": "CREATED",
        "tenantId": "1",
        "trails": [
            {
                "action": "created",
                "externalUserId": "team1@bank.com",
                "requestStatus": "CREATED",
                "userId": "11"
            },
            {
                "action": "approvers_assigned",
                "comment": "rule = [source: any, validator: any, amount: any], approvals = ['team1': 1 sig|'team2': 1 sig]",
                "externalUserId": "validator-core@taurusgroup.ch",
                "requestStatus": "CREATED",
                "userId": "1"
            }
        ],
        "type": "cosmos_undelegate"
    }
}
```

Taurus-PROTECT responds with a JSON object containing the Unstaking Request details, including the Request `status` and the newly assigned Request`id`.

## Requirements for Future Use

For this particular endpoint, we need to store the Request`id` as it will be required in the next step where we will sign the Unstaking Request.

You can find the Swagger-generated page for this endpoint in the following [link](/protect-capital/v3.38/reference/requests-cosmos/create-outgoing-undelegate-request).