# revokeConnectorGrant

mutation · in the family [Your own session](/reference/your-own-session/)

## What it does

Disconnect one AI assistant — your own connection, or any connection of an organization you own.

Disconnect ONE connected AI assistant by its id — the caller's own connection, or any connection of an organization the caller owns (AUTHZ/FORBIDDEN otherwise): the connection and the person's connector session are revoked at once; the assistant's very next call is refused and it must connect again. Answers the connection as it was.

## What happens

The assistant’s access ends at once: its very next request is refused and it must be connected again to return.

## Careful

Only your own connections, unless you own the organization. Cannot be undone — the assistant simply connects again if wanted.

## Who may call it

Capability area: **Your own session** — What every signed-in person may do for themselves — their session, their profile and their own work.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows `api:revokeConnectorGrant`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | yes | The id of the record. |

## Returns

[ConnectorGrant](/types/ConnectorGrant/) `ConnectorGrant!` — One connected AI assistant (a PERSON-bound connection — the assistant acts as the person who approved it, within their own role's access): the client, the access the person chose, the person, the organization, the instants.

## Example request

```graphql
mutation ExampleRevokeConnectorGrant($id: ID!) {
  revokeConnectorGrant(id: $id) {
    id
    clientId
    clientName
    access
    scope
    userId
    orgId
    createdAt
    expiresAt
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000"
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

## Example response

```json
{
  "data": {
    "revokeConnectorGrant": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "clientId": "<client id>",
      "clientName": "Blue jeans",
      "access": "<access>",
      "scope": "<scope>",
      "userId": "01900000-0000-7000-8000-11f967df0000",
      "orgId": "01900000-0000-7000-8000-b0cf4f3c0000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "expiresAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
- `CONFLICT/*` — The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. ([CONFLICT](/errors/CONFLICT/))
- `VALIDATION/VERSION_REQUIRED` — The request did not say which app version it came from. ([VALIDATION](/errors/VALIDATION/))
