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

# revokeApiKey

> Revoke an API key (soft delete)



**mutation** `revokeApiKey(input: RevokeApiKeyInput!): ApiKey!`

## Arguments

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

## Returns

`ApiKey!`

**`createdAt`**: `DateTime!`

The creation date of the API key

---

**`description`**: `String`

The description of the API key

---

**`displayName`**: `String!`

The display name of the API key

---

**`environmentId`**: `UUID!`

The unique identifier for the environment

---

**`expireAt`**: `DateTime`

The expiration date of the API key

---

**`id`**: `UUID!`

Unique identifier for the entity

---

**`keyType`**: `ApiKeyType!`

The type of API key

---

**`token`**: `String!`

The token of the API key

## Examples

```graphql Mutation
mutation RevokeApiKey($input: RevokeApiKeyInput!) {
  revokeApiKey(input: $input) {
    createdAt
    description
    displayName
    environmentId
    expireAt
    id
  }
}
```

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

```json Response
{
  "data": {
    "revokeApiKey": {
      "createdAt": "value",
      "description": "string",
      "displayName": "string",
      "environmentId": "value",
      "expireAt": "value",
      "id": "value"
    }
  }
}
```


## Related topics

- [RevokeApiKeyInput](https://docs.stigg.io/graphql-reference/types/RevokeApiKeyInput.md)
- [API Keys](https://docs.stigg.io/documentation/managing-your-account/environments/api-keys.md)
- [Go SDK](https://docs.stigg.io/api-and-sdks/changelog/backend-graphql/go.md)
- [ApiKey](https://docs.stigg.io/graphql-reference/types/ApiKey.md)
- [apiKeys](https://docs.stigg.io/graphql-reference/queries/apiKeys.md)


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