---
title: "Error: invalid_key"
status: current
phase: 3
---

# `invalid_key`

**HTTP 401** · The key does not exist or was revoked.

## Why it happens

It happens when the key has a typo, was revoked, or belongs to another environment.

## How to fix it

Check that you copied all of it (it starts with `pluma_`). If it was revoked, create a new one in **Settings → Keys**.

## Example

```json
{
  "error": {
    "code": "invalid_key",
    "message": "The key does not exist or was revoked.",
    "fix": "Check that you copied all of it (it starts with pluma_). If it was revoked, create a new one in Keys.",
    "doc_url": "https://pluma.so/docs/errors/invalid_key"
  }
}
```
