Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion agent-resources/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ npx skills add upstash/skills

# Authentication

The CLI needs your account email and a developer API key. Grab one from the [Upstash Console under Account → API Keys](https://console.upstash.com/account/api), then set credentials using whichever method fits your workflow.
The CLI needs your account email and a Developer API key. If you don't have a key yet, [create an API Key](/devops/developer-api/introduction) first. Then set credentials using whichever method fits your workflow.

<Note>
Read-only API keys work too. Read commands like `list`, `get` and `stats` succeed, while commands that change resources are rejected by the API. Use a read-only key when the CLI is driven by an agent or pipeline that only needs to read.
</Note>

## 1. Saved login (recommended)

Expand Down
2 changes: 1 addition & 1 deletion agent-resources/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Find the GitHub repository [here](https://github.com/upstash/mcp-server).
Before installing, grab your credentials:

* **Email**: your Upstash account email
* **API Key**: create one at [Upstash Console → Account → API Keys](https://console.upstash.com/account/api)
* **API Key**: a Developer API key. If you don't have one, [create an API key](/devops/developer-api/introduction) first.

<Note>
Readonly API keys are supported. When the server starts with one, it automatically disables every tool that would modify state, such as creating databases, deleting backups, or retrying workflows. Your agent can still read and query your account, but it cannot make changes.
Expand Down
4 changes: 4 additions & 0 deletions devops/developer-api/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ curl https://api.upstash.com/v2/redis/databases -u EMAIL:API_KEY
```

Replace `EMAIL` and `API_KEY` with your email and API key.

`EMAIL` is always your own account email, even when you use a
[team API key](/devops/developer-api/introduction#team-api-keys). Any member of
the team can authenticate with the team's key by passing their own email.
82 changes: 63 additions & 19 deletions devops/developer-api/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
title: Getting Started
---

Using Upstash API, you can develop applications that can create and manage
Upstash products and resources. You can automate everything that
you can do in the console. To use developer API, you need to create an API key
in the console.
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>

Expand All @@ -15,28 +17,43 @@ The Developer API is only available to native Upstash accounts. Accounts created

### Create an API key

1. Log in to the console then in the left menu click the
`Account > Management API` link.
1. Log in to the console, click your profile icon at the top right corner and
select `Settings`.

2. Click the `Create API Key` button.
<Frame>
<img src="/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="/img/developerapi/api-key-list.png" />
</Frame>

3. Enter a name for your key. You can not use the same name for multiple keys.
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="/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="/img/developerapi/api-key-secret.png" />
</Frame>

You need to download or copy/save your API key. Upstash does not remember or
keep your API for security reasons. So if you forget your API key, it becomes
useless; you need to create a new one.
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 />

Expand All @@ -45,15 +62,42 @@ 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)

### Deleting an API key
### Team API keys

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 the API keys in
`Account > API Keys` screen.
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.

### Roadmap
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>

**Role based access:** You will be able to create API keys with specific
privileges. For example you will be able to create a key with read-only access.
Members with the `Readonly` team role can only perform read operations through
the API, even when using a `Read/Write` team key.

**Stats:** We will provide reports based on usage of your API keys.
</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
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.
Binary file modified img/developerapi/api-key-create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/developerapi/api-key-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/developerapi/api-key-secret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/developerapi/profile-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 71 additions & 21 deletions llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ npx skills add upstash/skills

# Authentication

The CLI needs your account email and a developer API key. Grab one from the [Upstash Console under Account → API Keys](https://console.upstash.com/account/api), then set credentials using whichever method fits your workflow.
The CLI needs your account email and a Developer API key. If you don't have a key yet, [create an API Key](/docs/devops/developer-api/introduction) first. Then set credentials using whichever method fits your workflow.

<Note>
Read-only API keys work too. Read commands like `list`, `get` and `stats` succeed, while commands that change resources are rejected by the API. Use a read-only key when the CLI is driven by an agent or pipeline that only needs to read.
</Note>

## 1. Saved login (recommended)

Expand Down Expand Up @@ -309,7 +313,7 @@ Find the GitHub repository [here](https://github.com/upstash/mcp-server).
Before installing, grab your credentials:

* **Email**: your Upstash account email
* **API Key**: create one at [Upstash Console → Account → API Keys](https://console.upstash.com/account/api)
* **API Key**: a Developer API key. If you don't have one, [create an API key](/docs/devops/developer-api/introduction) first.

<Note>
Readonly API keys are supported. When the server starts with one, it automatically disables every tool that would modify state, such as creating databases, deleting backups, or retrying workflows. Your agent can still read and query your account, but it cannot make changes.
Expand Down Expand Up @@ -7502,6 +7506,10 @@ curl https://api.upstash.com/v2/redis/databases -u EMAIL:API_KEY

Replace `EMAIL` and `API_KEY` with your email and API key.

`EMAIL` is always your own account email, even when you use a
[team API key](/docs/devops/developer-api/introduction#team-api-keys). Any member of
the team can authenticate with the team's key by passing their own email.

# HTTP Status Codes
Source: https://upstash.com/docs/devops/developer-api/http_status_codes

Expand All @@ -7521,10 +7529,12 @@ Source: https://upstash.com/docs/devops/developer-api/http_status_codes
# Getting Started
Source: https://upstash.com/docs/devops/developer-api/introduction

Using Upstash API, you can develop applications that can create and manage
Upstash products and resources. You can automate everything that
you can do in the console. To use developer API, you need to create an API key
in the console.
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](/docs/agent-resources/cli) and the
[Upstash MCP server](/docs/agent-resources/mcp) use the same API key.

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

<Note>

Expand All @@ -7534,22 +7544,35 @@ The Developer API is only available to native Upstash accounts. Accounts created

### Create an API key

1. Log in to the console then in the left menu click the
`Account > Management API` link.
1. Log in to the console, click your profile icon at the top right corner and
select `Settings`.

<img />

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

<img />

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

<img />

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.

<img />

You need to download or copy/save your API key. Upstash does not remember or
keep your API for security reasons. So if you forget your API key, it becomes
useless; you need to create a new one.
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 />

Expand All @@ -7558,18 +7581,45 @@ 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)

### Deleting an API key
### Team API keys

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 the API keys in
`Account > API Keys` screen.
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.

### Roadmap
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.

**Role based access:** You will be able to create API keys with specific
privileges. For example you will be able to create a key with read-only access.
<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](/docs/devops/developer-api/authentication) for details.

```bash
curl https://api.upstash.com/v2/redis/databases -u EMAIL:API_KEY
```

The same credentials work with the [Upstash CLI](/docs/agent-resources/cli), which
manages your resources from the terminal or CI/CD pipelines, and with the
[Upstash MCP server](/docs/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.

**Stats:** We will provide reports based on usage of your API keys.
### 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.

# Create Backup
Source: https://upstash.com/docs/devops/developer-api/redis/backup/create_backup
Expand Down