> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# revokeCompanyApiKey

> Revokes a company API key: it stops working at once. The calling key can revoke only keys with no capability or workspace beyond its own, itself included. Revoking a key that already expired succeeds and writes no audit entry. Needs a company API key with `api_keys:write`.



**mutation** `revokeCompanyApiKey(input: RevokeCompanyApiKeyInput!): RevokeCompanyApiKeyPayload!`

## Arguments

**`input`**: `RevokeCompanyApiKeyInput!` (required)

The key to revoke.

## Returns

`RevokeCompanyApiKeyPayload!`

**`companyApiKey`**: `CompanyApiKey!`

The revoked key.

## Examples

```graphql Mutation
mutation RevokeCompanyApiKey($input: RevokeCompanyApiKeyInput!) {
  revokeCompanyApiKey(input: $input) {
    companyApiKey {
      id
      name
      capabilities
      workspaces {
        edges {
          __typename
        }
        pageInfo {
          __typename
        }
        totalCount
      }
      createdAt
      expiresAt
    }
  }
}
```

```json Variables
{
  "input": {
    "id": "id"
  }
}
```

```json Response
{
  "data": {
    "revokeCompanyApiKey": {
      "companyApiKey": {
        "id": "id",
        "name": "string",
        "capabilities": [
          "string"
        ],
        "workspaces": {
          "edges": [
            {
              "__typename": "WorkspaceEdge"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          },
          "totalCount": 1
        },
        "createdAt": "value",
        "expiresAt": "value"
      }
    }
  }
}
```


## Related topics

- [Administration API: API keys](https://docs.paradime.io/developers/graphql-api/admin-api/api-keys.md)
- [Administration API: Conventions](https://docs.paradime.io/developers/graphql-api/admin-api/conventions.md)
- [API Keys](https://docs.paradime.io/developers/api-keys.md)
- [Administration API](https://docs.paradime.io/developers/graphql-api/admin-api/index.md)
- [Company & Workspace token](https://docs.paradime.io/developers/company-and-workspace-token.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.