# Handle routes: connect

URL: /code/api/handle/verbs · Id: `page:code/api/handle/verbs`

> The Handle Verbs connect as api.sb routes, with inputs, result, refusals and an example.

Reference for [Handle](/business/nouns/handle), one group of [Handle routes](/code/api/handle).

### Handle.connect
Connect binds a Handle to the Integration credential it publishes through, once the platform confirms the account. [Verb page](/business/nouns/handle/connect?interface=api).

```text
POST /{namespace}/handles/{handle}/connect
```

Path: `handle`. Body, as JSON: the other inputs. Emits [`Handle.connected`](/business/events/Handle.connected).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | [Handle](/business/nouns/handle) | Yes | The Handle. |
| `integration` | [Integration](/business/nouns/integration) | Yes | The Integration credential. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `handle` | [Handle](/business/nouns/handle) | Yes | The connected Handle. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/handles/handle_FcnNwYQujc/connect \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"integration":"integration_alVwjQcmRy"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "handle": {
    "$id": "https://api.sb/leaseline.app/handles/handle_FcnNwYQujc",
    "$type": "Handle",
    "venue": "Example venue",
    "name": "Leaseline"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Handle.connect",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```