> ## Documentation Index
> Fetch the complete documentation index at: https://docs.p2p.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> The Unified API is designed to simplify and standardize interactions across all supported networks. For both staking and unstaking, the process follows a consistent and straightforward flow, ensuring seamless integration for all networks.

<Note>
  This article describes how the Unified API process works in general.

  To see the detailed staking guides for specific chains and networks, refer to the [Networks Supported](/docs/unified-api-networks) section.
</Note>

***

Each network integration supports three key operations:

* `stake`: Initiate a staking transaction to delegate the assets
* `unstake`: Initiate an unstaking transaction, beginning the process of withdrawing the assets
* `withdraw`: Complete the process by withdrawing the unstaked assets to the wallet

For each operation, the Unified API returns an unsigned transaction. Thus, the common flow consists of the following steps:

1. **Transaction Preparation**: The API generates a raw unsigned transaction for `stake`, `unstake`, or `withdraw` operation.
2. **Transaction Signing**: The user signs the transaction using the preferred method of signing. P2P.ORG also provides separate, detailed transaction signing instructions for various networks.
3. **Transaction Broadcasting**: The user uses the Unified API’s dedicated `broadcast` method to submit the signed transaction to the network.

## How it works

Below, a high-level diagram of the process is provided.

<img src="https://mintcdn.com/p2p0rg/lhVL1KmaAlMzkTnO/images/docs/unified-api-diagram.svg?fit=max&auto=format&n=lhVL1KmaAlMzkTnO&q=85&s=cd90bd8c4d652726005c256cb23aedeb" alt="" width="1284" height="1290" data-path="images/docs/unified-api-diagram.svg" />

1. The user initiates an operation (`stake`, `unstake`, or `withdraw`) by sending a request to the client system.
2. Client system issues a POST request to the Unified API, specifying one of four supported actions: stake, send transaction, unstake, or withdraw.
3. The Unified API adapter receives the request, validates the parameters and forwards it to the appropriate network-specific API in the required format.
4. The network-specific API processes the request and returns a raw response to the Unified API adapter.
5. The Unified API adapter processes the raw response, transforming it into a standardized unified format to ensure consistent structure across all supported networks.

## General flow

**Staking**:

1. Create a staking transaction by sending a POST request to [/api/v1/unified/staking/stake/](/reference/unified-create-stake-transaction).
2. Sign the transaction, using the [chain-specific signing logic](/docs/unified-api-signing-transaction) .
3. Broadcast the signed transaction to the network by sending a POST request to [/api/v1/unified/transaction/broadcast](/reference/unified-transaction-send).

**Unstaking**:

1. Create an unstaking transaction by sending a POST request to [/api/v1/unified/staking/unstake/](/reference/unified-create-unstake-transaction).
2. Sign and send the unsigned transaction the same way as for staking flow.
3. Create a withdrawal transaction by sending a POST request to [/api/v1/unified/staking/withdraw](/reference/unified-create-withdraw-transaction).
4. Sign and send the unsigned transaction to the network.

<Note>
  **Note that requests contain network-specific details**

  While the general process remains consistent, there is the distinction between networks lying in the specific POST request parameters required.

  The chain and network mapping table can be found in [Overview](/docs/unified-api-overview).
</Note>

To start using the Unified API, [get an authentication token](/docs/authentication) and see the integration guides in the [Networks](/docs/unified-api-networks) section.


## Related topics

- [Networks Supported](/docs/unified-api-networks.md)
- [Sign and Send Transaction](/docs/unified-api-signing-transaction.md)
- [Unified API Reference](/reference/unified-create-stake-transaction.md)
