---
title: "Approve an agent computer code – Superbot API"
canonical_url: "https://superbot.gg/developers/devices/approveAgentPair"
summary: "Link the agent computer behind a pending code at the link tier (terminal and relay, no synced data). First-party only; a web session with a recent phone is told to finish on the phone (409 approve_on_phone)."
---

> Markdown of https://superbot.gg/developers/devices/approveAgentPair. Site index: /llms.txt.

# Approve an agent computer code

`POST /v1/pair/{user_code}/approve`

Link the agent computer behind a pending code at the link tier (terminal and relay, no synced data). First-party only; a web session with a recent phone is told to finish on the phone (409 approve_on_phone).

- Operation id: `approveAgentPair`
- Group: [Devices](https://superbot.gg/developers/devices.md)
- Auth: Any live caller key (`Authorization: Bearer sbc_…` or `x-api-key: sbc_…`), or a signed-in session.
- Scopes: none

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `user_code` | string | required | The code the agent computer shows (e.g. `ABCD-EFGH`). |

## Request body

`application/json`.

- `label` (string): A new label, 1-32 characters.

## Response 200

Linked.

`application/json`: AgentPairApproveResponse.

- `device_id` (string, required)
- `kind` (string, required): One of `agent_computer`.
- `tier` (string, required): One of `link`.

## Errors

Every refusal carries `error`, `message`, `doc_url` and `request_id`; the gateway routes answer in the dialect you dialed.

| Status | Codes | When |
| --- | --- | --- |
| 400 | [`invalid_request`](https://superbot.gg/developers#errors-invalid_request) | The request is malformed or a parameter is invalid; `param` names the field. |
| 401 | [`unauthorized`](https://superbot.gg/developers#errors-unauthorized) | The bearer is missing, malformed or unknown. |
| 403 | [`insufficient_scope`](https://superbot.gg/developers#errors-insufficient_scope) | The key lacks a scope (insufficient_scope), is revoked, or may not call this route. |
| 404 | [`not_found`](https://superbot.gg/developers#errors-not_found) | No such resource on this account. |
| 409 | [`conflict`](https://superbot.gg/developers#errors-conflict) | The resource is not in a state that allows this change. |
| 429 | [`rate_limited`](https://superbot.gg/developers#errors-rate_limited) | Over the per-key request bucket; retry after x-ratelimit-reset. |

## Examples

```sh
curl -sS -X POST "https://superbot.gg/v1/pair/$USER_CODE/approve" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"label":"your-label"}'
```

```js
const userCode = 'USER_CODE';
const res = await fetch(`https://superbot.gg/v1/pair/${userCode}/approve`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"label":"your-label"}),
});
console.log(res.status, await res.json());
```

```python
import os
import requests

user_code = "USER_CODE"
res = requests.request(
    "POST",
    f"https://superbot.gg/v1/pair/{user_code}/approve",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"label":"your-label"},
)
print(res.status_code, res.json())
```
