Skip to content
Open
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
4 changes: 2 additions & 2 deletions .optimize-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -1401,9 +1401,9 @@
"images/docs/network/pops-map.png": "205ead599703cf47d0df316db8fcc4f48d5eed01508109fc740d17914275e9ab",
"images/docs/network/regions-map.png": "c65f1423ab19c3048bf8bf93117e8f2e1d13a2bc705c00307de7ee821e5668a1",
"images/docs/platform/add-platform.png": "5a05bb9d75a8d5270bfa5e67df7e6de20a9fad174476a112b5bdab72e7bdad30",
"images/docs/platform/create-api-key.png": "36a80b363e6ba8ebd271e830a3b2d0bc766b2ec3e7d46ff481516f1e50ea5b7d",
"images/docs/platform/create-api-key.png": "7661b3845e13704643f8ff4f763faa8e61efb90878c3ffa7466ece0910b8ecab",
"images/docs/platform/dark/add-platform.png": "1bb0e7dba22556e64064951882d625532285fa80bed43fd77774f31545a15b0f",
"images/docs/platform/dark/create-api-key.png": "dbc3ce919f849d09ef7789676d00e954bf364b9b23126b551767b86891c83fb2",
"images/docs/platform/dark/create-api-key.png": "f15696f0b28dfc46813d7185be11da8be89da72be66b1894cfcc7227036e4afa",
"images/docs/platform/dark/execution-details.png": "c0481ddc206447460f9d317ba8d421615066f67a50bc9ef41a8f71766ecffb14",
"images/docs/platform/execution-details.png": "ece1364b8b00254bbd982421b6eed6d7f519d34c4e80377fcaaa4cb5d5dd3f89",
"images/docs/quick-starts/add-platform.png": "3b13ba983ea1d2529a1f34a719acef903ec0b58879ed511012280a28ccbde17e",
Expand Down
4 changes: 2 additions & 2 deletions src/lib/generated/github-stars.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"stars": 55439,
"fetchedAt": "2026-03-31T17:11:12.839Z"
"stars": 55642,
"fetchedAt": "2026-04-09T19:45:59.241Z"
}
103 changes: 103 additions & 0 deletions src/routes/blog/post/announcing-api-keys-api/+page.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
layout: post
title: "Announcing the Keys API: Create and manage API keys with Server SDKs"
description: API keys can now be created, updated, and deleted programmatically using Appwrite Server SDKs. Automate key provisioning for CI/CD, multi-tenant setups, and team onboarding workflows.
date: 2026-04-14
cover: /images/blog/improve-devex-dev-keys/cover.png
timeToRead: 4
author: matej-baco
category: announcement
featured: false
callToAction: true
---

Managing API keys has always required navigating to the Appwrite Console, selecting scopes, and manually creating each key. For a single project, that works. For teams managing multiple environments, onboarding new services, or provisioning keys as part of automated pipelines, it becomes a bottleneck.

Today, we are announcing the **Keys API**, allowing you to create, update, and delete API keys programmatically through the Appwrite Server SDKs.

# Why this matters

API keys are the foundation of server-side authentication in Appwrite. Every Server SDK call, every CLI operation, and every backend integration depends on them. Being able to manage keys from code opens up workflows that were previously manual:

- **CI/CD pipelines** that provision scoped keys for each deployment environment
- **Multi-tenant platforms** that create isolated keys per customer with only the scopes they need
- **Team onboarding** where new services get their own keys automatically
- **Key rotation workflows** that create a new key, update credentials, and retire the old one without downtime

# How it works

The Keys API introduces two new [API key scopes](/docs/advanced/platform/api-keys#scopes):

- **`keys.read`** for listing and retrieving API keys
- **`keys.write`** for creating, updating, and deleting API keys

The methods live on the `Project` service, alongside existing project-level operations like environment variables.

## Create an API key

```server-nodejs
import { Client, Project, ID } from 'node-appwrite';

const client = new Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1')
.setProject('<PROJECT_ID>')
.setKey('<YOUR_API_KEY>');

const project = new Project(client);

const key = await project.createKey({
keyId: ID.unique(),
name: 'Deployment Key',
scopes: ['databases.read', 'databases.write', 'users.read'],
expire: '2026-12-31T23:59:59.000+00:00'
});
```

Each key is created with a specific set of scopes and an optional expiration date. When no expiration is set, the key remains valid indefinitely.

## Update an API key

```server-nodejs
const updated = await project.updateKey({
keyId: '<KEY_ID>',
name: 'Deployment Key (updated)',
scopes: ['databases.read', 'users.read'],
expire: '2027-06-30T23:59:59.000+00:00'
});
```

Use this to adjust scopes as requirements change, or to extend or shorten a key's expiration window.

## Delete an API key

```server-nodejs
await project.deleteKey({
keyId: '<KEY_ID>'
});
```

Once deleted, the key immediately stops authenticating API calls.

# Bootstrap requirement

To use the Keys API, you need an existing API key with the `keys.read` and `keys.write` scopes. This initial key must be created through the Appwrite Console. Once you have it, all subsequent key management can be done programmatically.

# Full SDK support

The Keys API is available across all Appwrite Server SDKs. Complete code examples for every supported language are available in the [API keys documentation](/docs/advanced/platform/api-keys#manage-api-keys-with-a-server-sdk).

# Get started

The Keys API is available on **Appwrite Cloud** today.

1. Navigate to **Overview** > **Integration** > **API keys** and create an API key with the `keys.read` and `keys.write` scopes.
2. Initialize a Server SDK with your API key.
3. Use the `Project` service to manage keys from code.

Full documentation is available on the [API keys documentation page](/docs/advanced/platform/api-keys).

# Resources

- [API keys documentation](/docs/advanced/platform/api-keys)
- [API key scopes reference](/docs/advanced/platform/api-keys#scopes)
- [How to leverage dynamic API keys for better security](/blog/post/how-to-leverage-dynamic-api-keys-for-better-security)
14 changes: 14 additions & 0 deletions src/routes/changelog/(entries)/2026-04-14.markdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: changelog
title: "Keys API: manage API keys with Server SDKs"
date: 2026-04-14
cover: /images/blog/improve-devex-dev-keys/cover.png
---

API keys can now be created, updated, and deleted programmatically using the Appwrite Server SDKs. Two new API key scopes, `keys.read` and `keys.write`, control access to the new endpoints.

This enables automated key provisioning for CI/CD pipelines, multi-tenant platforms, key rotation workflows, and any scenario where managing keys through the Console is not practical.

{% arrow_link href="/blog/post/announcing-api-keys-api" %}
Read the announcement
{% /arrow_link %}
Loading
Loading