---
docId: doc_fd3eac55c5ca443ba6844e2ddfb7ef5d
title: Choose what to connect
description: "Choose the pages, accounts, or numbers to connect as channels."
api:
  group: canales
  auth: bearer
  operations:
    - operationId: selectChannelAssets
      method: POST
      path: '/v1/channels/connections/{connectionId}/select'
      postmanName: Choose what to connect
---

<script>
  import { Ways, Collapsible } from '$lib/components';
</script>

# Choose what to connect

When an authorized account has several pages, accounts, or numbers, the connection waits in `awaiting_selection`. Choose which ones to connect; each becomes a channel. The person can also choose through `shareUrl` or `authorizeIn`. The first selection is accepted.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X POST https://api.platic.ai/v1/channels/connections/$CONNECTION_ID/select \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "assets": ["104857362918475"] }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.channels.connections.select("connection_123", ["page_123"]);
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `connectionId` | string | Connection id (`chc_…`) | ✓ |

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | Only if your credential has several workspaces: which one the connection is in | — |

## Request body

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| `assets` | string[] | The `platformId` of each thing to connect, taken from [`availableAssets`](/api-reference/channels/connections/get#availableassets). 1 to 50 | ✓ |

```json
{
  "assets": ["104857362918475"]
}
```

## Response

`data` is the connection, in `installing` or already `connected`. If it is still `installing`, [get it](/api-reference/channels/connections/get) in a few seconds.

```json
{
  "status": "success",
  "message": "Channel connected",
  "data": {
    "id": "chc_7f3k9QmX2pLwR4tZ",
    "type": "messenger",
    "completion": "authorize",
    "status": "connected",
    "authorizeIn": null,
    "shareUrl": null,
    "createdAt": "2026-11-12T18:40:00.000Z",
    "expiresAt": "2026-11-13T18:40:00.000Z",
    "agentId": "tVKljCHCNiebQdasHeit",
    "availableAssets": [],
    "channels": [
      {
        "id": "104857362918475",
        "prefixedChannelId": "fb-104857362918475",
        "platform": "messenger",
        "channelType": "messenger",
        "isConnected": true,
        "status": "CONNECTED",
        "defaultAgentId": "tVKljCHCNiebQdasHeit",
        "name": "Acme Store",
        "displayPhoneNumber": null,
        "phoneNumber": null,
        "businessId": null,
        "wabaId": null,
        "kind": "messaging",
        "commentAutoReply": null,
        "creationDate": "2026-11-12T18:42:10.000Z",
        "lastUpdate": "2026-11-12T18:42:10.000Z",
        "health": { "state": "ok", "reason": null, "since": "2026-11-12T18:42:10.000Z" }
      }
    ],
    "error": null,
    "nextStep": "Connected: 1 channel in channels."
  }
}
```

The fields are in [get a connection](/api-reference/channels/connections/get#response-fields).

## Errors

<Collapsible summary="Show error codes and fixes">

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | `assets` is missing, empty, or has more than 50. `details.issues` says what happened. Also when your credential covers several workspaces and `?workspace=` is missing (`details.available`) |
| `400` | `INVALID_ASSETS` | A `platformId` is not in `availableAssets`. `details.platformIds` says which |
| `401` | `UNAUTHENTICATED` / `CREDENTIAL_REVOKED` | The credential is missing, invalid, or no longer covers this workspace |
| `403` | `FORBIDDEN` | The credential does not have write access to Integrations |
| `403` | `INSUFFICIENT_SCOPE` | The OAuth token does not have `platica:write` |
| `403` | `READ_ONLY_CREDENTIAL` | An internal Platica agent can only read |
| `404` | `CONNECTION_NOT_FOUND` | The connection does not exist in this workspace |
| `409` | `CONNECTION_NOT_AWAITING_SELECTION` | The connection is not in `awaiting_selection` (for example, it was already chosen on the page). `details.status` says how it is going |
| `409` | `CONNECTION_FINISHED` | The connection already finished: `connected`, `failed`, `cancelled`, or `expired`, in `details.status` |
| `409` | `ASSET_CONNECTED_ELSEWHERE` | Something that was chosen is already connected in another workspace. `details.platformIds` says which |
| `503` | `OPERATION_UNCONFIRMED` | Platica could not confirm the installation. [Get the connection](/api-reference/channels/connections/get) before retrying |

```json
{
  "code": 409,
  "error": "Conflict - The resource state conflicts with this request",
  "details": {
    "code": "ASSET_CONNECTED_ELSEWHERE",
    "message": "Ya está conectado en otro workspace. Primero hay que desconectarlo allá.",
    "platformIds": ["209384756102938"]
  }
}
```

Messages that come from Platica (`details.message`) are in Spanish; code against `details.code`. The general format is in [Errors](/api-reference/errors).

If something fails while installing, the response is `200` with the connection in `failed` and the reason in `error` ([why it fails](/api-reference/channels/connections/get#why-it-fails)).

</Collapsible>

## Notes

- Whatever has `installedElsewhere: true` is connected in another workspace. To bring it over, disconnect it there first.
- Installation may take a few seconds.
- Needs a workspace API key, or an OAuth token with write access to Integrations and the `platica:write` scope.
