# Remap subscriptions

`POST https://api.cryptohopper.com/v1/subscription/remap`

Part of [Subscriptions](https://www.cryptohopper.com/api-documentation/api-reference/subscriptions.md) in the Cryptohopper API reference.

Reassigns all of the user's active bot subscriptions in one call. mapping is an object with the subscription ID as key (0 for the trial) and the bot ID as value.

OAuth scope: `read`, `manage`

Active subscriptions that are not in mapping are unassigned from their bot.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Example request

```bash
curl -X POST "https://api.cryptohopper.com/v1/subscription/remap" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mapping":{"0":987654,"466000":987655}}'
```

## Response

Example response (illustrative values):

```json
{
    "data": "Subscriptions have been reassigned."
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
