# Secondary Interaction support

## Pre-read

Review the [Authentication Guide](https://docs.alluvial.finance/guides/supplemental_guides/authentication) for the Alluvial API.

### Create an Account object

Platforms that enable secondary protocol interactions, such as trading, lending, or other services, can create an Account object. The Account object is generally associated with a Platform's customer.

**Request:**

{% tabs %}
{% tab title="cURL" %}

```shell
curl -X 'POST' \
  'https://api.staging.alluvial.finance/v0/platform/accounts' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer 'eyJhbGci…CVm5g'
  -d '{
 "key": "foobar-123"
}'
```

{% endtab %}
{% endtabs %}

**Response:**

```json
{
  "id": "4b1d05ed-b498-4847-99a0-c415c6b19f6b",
  "key": "foobar-123",
  "org_id": "org_WaYHN06ay6WoT...",
  "status": "ACTIVE",
  "created_at": "2024-02-09T22:40:28.954304245Z",
  "wallets": []
}
```

### Create a Wallet object

After an Account object is created, associate a Wallet object to an account. You can associate one or many Wallet objects to a given Account object.

**Request:**

{% tabs %}
{% tab title="cURL" %}

```shell
curl -X 'POST' \
  'https://api.staging.alluvial.finance/v0/platform/accounts/4b1d05ed-b498-4847-99a0-c415c6b19f6b/wallets/' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer 'eyJhbGci…CVm5g'
  -D '{
 "address": "0x469b998812B9675b7B2Fb37519f574fEA5ee92E8",
 "allowlisted": "false",
 "type": "ETH"
}'
```

{% endtab %}
{% endtabs %}

**Response:**

```json
{
  "id": "421a39a1-e9c3-4a33-81bc-98eff7bfd502",
  "type": "ETH",
  "address": "0x469b998812b9675b7b2fb37519f574fea5ee92e8",
  "status": "NOT_ALLOWLISTED",
  "on_platform": true,
  "created_at": "2024-02-09T22:43:02.249045841Z"
}
```

Your Platform is all set! Wallets added to the On-Platform list will be used to calculate the relevant Protocol Service Fee Rebates.
