---
title: "Decline an agent computer code – Superbot API"
canonical_url: "https://superbot.gg/developers/devices/denyAgentPair"
summary: "Decline a pending code (\"Not me\"). The agent computer's next poll of its device code answers `access_denied` (RFC 8628 §3.5) and the code is dead. `reason` `not_me` says the user never asked for it: it is logged with the claimed vendor and the request network, and three distinct accounts reporting one network inside 24 hours count against that network's code limit. First-party only. 404 `not_found` for a code that is unknown, expired, approved or already declined."
---

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

# Decline an agent computer code

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

Decline a pending code ("Not me"). The agent computer's next poll of its device code answers `access_denied` (RFC 8628 §3.5) and the code is dead. `reason` `not_me` says the user never asked for it: it is logged with the claimed vendor and the request network, and three distinct accounts reporting one network inside 24 hours count against that network's code limit. First-party only. 404 `not_found` for a code that is unknown, expired, approved or already declined.

- Operation id: `denyAgentPair`
- 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`.

- `reason` (string): Why. Default `cancel`. One of `cancel`, `not_me`.

## Response 200

Declined.

`application/json`: AgentPairDenyResponse.

- `ok` (boolean, required): One of `true`.

## 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. |
| 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/deny" \
  -H "Authorization: Bearer $SUPERBOT_API_KEY" \
  -H "content-type: application/json" \
  -d '{"reason":"cancel"}'
```

```js
const userCode = 'USER_CODE';
const res = await fetch(`https://superbot.gg/v1/pair/${userCode}/deny`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({"reason":"cancel"}),
});
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}/deny",
    headers={
        "Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
        "content-type": "application/json",
    },
    json={"reason":"cancel"},
)
print(res.status_code, res.json())
```
