# approveConnectorAuthorization

mutation · in the family [System and integration setup](/reference/system-and-integration-setup/)

## What it does

Approve or deny an AI-connector sign-in — approving mints a read-only integration key for ONE organization and sends the connector its sign-in code.

Decide ONE connector authorize request: the FULL params re-validate from scratch (the review is never trusted). APPROVE (orgId REQUIRED — an eligible org: ACTIVE + owned by you) mints a REAL ApiKey through the existing mintApiKey lane (the read-only integration descriptors AT APPROVE TIME; the 12-month ceiling; the caption carries the client) + the OAuth grant + the single-use PKCE-bound code, answering {redirectTo} with code+state+iss; DENY answers {redirectTo} with error=access_denied+state+iss (RFC 9207 — iss rides every response). Revoke later = the existing key doom. OWNER-gated engine-side (the mintApiKey posture VERBATIM). Template class (hand-derived v82).

## What happens

The connector gets read access equal to the read-only key template (no writes, no AI spend); the key appears in your key list and dooming it disconnects the connector.

## Careful

OWNER-gated. Approve names exactly ONE active organization you own; the redirect goes only to the client’s registered address.

## Who may call it

Capability area: **System and integration setup** — Registers, connections and the settings your systems run on.

- Owner
- System Administrator
- An API key whose scope allows `api:approveConnectorAuthorization`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `decision` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `orgId` | [ID](/types/#scalars) | no | No further notes. |
| `responseType` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `clientId` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `redirectUri` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `codeChallenge` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `codeChallengeMethod` | [String](/types/#scalars) `String!` | yes | No further notes. |
| `state` | [String](/types/#scalars) | no | No further notes. |
| `scope` | [String](/types/#scalars) | no | No further notes. |
| `resource` | [String](/types/#scalars) | no | No further notes. |

## Returns

[ConnectorAuthorizationVerdict](/types/ConnectorAuthorizationVerdict/) `ConnectorAuthorizationVerdict!` — The consent verdict's redirect instruction: send the browser HERE — code+state+iss on approve, error=access_denied+state+iss on deny (RFC 9207: iss rides EVERY authorization response).

## Example request

```graphql
mutation ExampleApproveConnectorAuthorization($decision: String!, $orgId: ID, $responseType: String!, $clientId: String!, $redirectUri: String!, $codeChallenge: String!, $codeChallengeMethod: String!) {
  approveConnectorAuthorization(decision: $decision, orgId: $orgId, responseType: $responseType, clientId: $clientId, redirectUri: $redirectUri, codeChallenge: $codeChallenge, codeChallengeMethod: $codeChallengeMethod) {
    redirectTo
  }
}
```

Variables:

```json
{
  "decision": "<decision>",
  "orgId": "01900000-0000-7000-8000-b0cf4f3c0000",
  "responseType": "<response type>",
  "clientId": "<client id>",
  "redirectUri": "<redirect uri>",
  "codeChallenge": "<code challenge>",
  "codeChallengeMethod": "<code challenge method>"
}
```

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

## Example response

```json
{
  "data": {
    "approveConnectorAuthorization": {
      "redirectTo": "<redirect to>"
    }
  },
  "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/))

## Used in

- [Connect your AI assistant](/use-cases/connect-ai-assistant/)
