> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-dx-2829-developer-api-docs-refresh.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

Using the Upstash Developer API, you can create and manage Upstash products and
resources programmatically. Everything you can do in the console can be
automated. The [Upstash CLI](/agent-resources/cli) and the
[Upstash MCP server](/agent-resources/mcp) use the same API key.

To use the Developer API, you need to create an API key in the console.

<Note>
  The Developer API is only available to native Upstash accounts. Accounts created via third-party platforms like Vercel or Fly.io are not supported.
</Note>

### Create an API key

1. Log in to the console, click your profile icon at the top right corner and
   select `Settings`.

<Frame>
  <img src="https://mintcdn.com/upstash-dx-2829-developer-api-docs-refresh/4wBN7apYoNDsAKJC/img/developerapi/profile-menu.png?fit=max&auto=format&n=4wBN7apYoNDsAKJC&q=85&s=a54924e8382ab9684d277ed7fedaeda2" width="720" height="300" data-path="img/developerapi/profile-menu.png" />
</Frame>

2. Switch to the [`Developer API`](https://console.upstash.com/account/api) tab
   and click the `Create API Key` button.

<Frame>
  <img src="https://mintcdn.com/upstash-dx-2829-developer-api-docs-refresh/4wBN7apYoNDsAKJC/img/developerapi/api-key-list.png?fit=max&auto=format&n=4wBN7apYoNDsAKJC&q=85&s=ba0a4a7240328c7d144d986361bf247e" width="1120" height="490" data-path="img/developerapi/api-key-list.png" />
</Frame>

3. Enter a name for your key, pick its permissions and expiration, then submit.
   You cannot use the same name for multiple keys.

<Frame>
  <img src="https://mintcdn.com/upstash-dx-2829-developer-api-docs-refresh/4wBN7apYoNDsAKJC/img/developerapi/api-key-create.png?fit=max&auto=format&n=4wBN7apYoNDsAKJC&q=85&s=cf4a265e2cd242897429a27feb53d241" width="520" height="402" data-path="img/developerapi/api-key-create.png" />
</Frame>

A `Read/Write` key can use every API endpoint. A `Read Only` key can list and
inspect your resources but cannot change them, which makes it a good fit for
monitoring scripts and AI agents. Read-only keys are marked with a `Read Only`
tag in the key list.

Keys can expire after 7, 30 or 90 days, on a custom date, or never. Choose an
expiring key when you can. The console warns you when a key expires within a
week, and an expired key stops working until you replace it with a new one.

<Frame>
  <img src="https://mintcdn.com/upstash-dx-2829-developer-api-docs-refresh/4wBN7apYoNDsAKJC/img/developerapi/api-key-secret.png?fit=max&auto=format&n=4wBN7apYoNDsAKJC&q=85&s=0ecb734c17f4bcb9f690fa70d3347285" width="520" height="483" data-path="img/developerapi/api-key-secret.png" />
</Frame>

You need to copy or download your API key. Upstash does not store or
show your API key again for security reasons. So if you lose your API key, it
becomes useless; you need to create a new one.

<br />

You can create multiple keys. It is recommended to use different keys in
different applications. By default one user can create up to 37 API keys. If you
need more than that, please send us an email at
[support@upstash.com](mailto:support@upstash.com)

### Team API keys

An API key belongs to the account it was created in. If you switch the console
to a team and create a key there, the key belongs to that team and operates on
the team's resources.

Authentication works the same way: pass your own account email as the
username, not the team id. Every member of the team can use the same team key,
each with their own email.

<Note>
  Members with the `Readonly` team role can only perform read operations through
  the API, even when using a `Read/Write` team key.
</Note>

### Using your API key

The API uses HTTP Basic authentication: pass your account email as the
username and the API key as the password. See
[Authentication](/devops/developer-api/authentication) for details.

```bash theme={"system"}
curl https://api.upstash.com/v2/redis/databases -u EMAIL:API_KEY
```

The same credentials work with the [Upstash CLI](/agent-resources/cli), which
manages your resources from the terminal or CI/CD pipelines, and with the
[Upstash MCP server](/agent-resources/mcp), which lets AI agents manage and
debug your resources. When the MCP server starts with a read-only key, it
disables every tool that would modify state.

### Deleting an API key

When an API key is exposed (e.g. accidentally shared in a public repository) or
not being used anymore, you should delete it. You can delete API keys on the
same [`Personal Settings > Developer API`](https://console.upstash.com/account/api)
page.
