---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "API keys"
description: "The `api_keys` collection of Sylphx Access: An ApiKey is a credential of one environment, or an org-wide key of an org (it acts on every project of the org), issued only by Access (the platform has one key system)."
type: reference
product: platform
summary: "An ApiKey is a credential of one environment, or an org-wide key of an org (it acts on every project of the org), issued only by Access (the…"
updated: 2026-09-28
order: 900
---

An ApiKey is a credential of one environment, or an org-wide key of an org (it acts on every project of the org), issued only by Access (the platform has one key system). The secret is returned once, by Create and Roll, and never again.

**Service** Sylphx Access · **Resource type** `access.sylphx.com/ApiKey` · **Name pattern** `orgs/{org}/projects/{project}/envs/{env}/api_keys/{api_key}` · **Shape** `spec_status`

## Fields

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | `orgs/{org}/projects/{project}/envs/{env}/api_keys/{api_key}`, or `orgs/{org}/api_keys/{api_key}` for an org-wide key. |
| `uid` | `string` | `key_<cell><ulid>`; equals the name segment. Output only. |
| `meta` | `ResourceMeta` | Resource metadata. |
| `spec` | `ApiKeySpec` | Desired state. Required. |
| `status` | `ApiKeyStatus` | Observed state. Output only. |

## Methods

Every method of the collection, in the registry's order, with the scope it
needs. The full request, response and examples are one link away.

| Method | Call | What it does |
| --- | --- | --- |
| `GET` | [`get`](/docs/api/api_keys#get) | Gets an API key. |
| `GET` | [`list`](/docs/api/api_keys#list) | Lists API keys in an environment, or the org-wide keys of an org. |
| `POST` | [`create`](/docs/api/api_keys#create) | Creates an API key. Access assigns the id. |
| `PATCH` | [`update`](/docs/api/api_keys#update) | Updates an API key. |
| `DELETE` | [`delete`](/docs/api/api_keys#delete) | Deletes an API key. |
| `POST` | [`revoke`](/docs/api/api_keys#revoke) | Revokes an API key immediately; revocation propagates on its own fast path, ahead of the bulk key data. |
| `POST` | [`roll`](/docs/api/api_keys#roll) | Rolls an API key: returns a new key with the same spec and revokes the old one after the grace period. |

## get

Gets an API key.

`GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/api_keys/api-key` · scope `access:read` · effect `read` · [Request, response and examples](/docs/api/api_keys/get)

## list

Lists API keys in an environment, or the org-wide keys of an org.

`GET https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/api_keys` · scope `access:read` · effect `read` · paginated · [Request, response and examples](/docs/api/api_keys/list)

## create

Creates an API key. Access assigns the id.

`POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/api_keys` · scope `access:keys:write` · effect `write` · [Request, response and examples](/docs/api/api_keys/create)

## update

Updates an API key.

`PATCH https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/api_keys/api-key` · scope `access:keys:write` · effect `write` · [Request, response and examples](/docs/api/api_keys/update)

## delete

Deletes an API key.

`DELETE https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/api_keys/api-key` · scope `access:keys:write` · effect `destructive` · [Request, response and examples](/docs/api/api_keys/delete)

## revoke

Revokes an API key immediately; revocation propagates on its own fast path, ahead of the bulk key data.

`POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/api_keys/api-key:revoke` · scope `access:keys:write` · effect `destructive` · [Request, response and examples](/docs/api/api_keys/revoke)

## roll

Rolls an API key: returns a new key with the same spec and revokes the old one after the grace period.

`POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/api_keys/api-key:roll` · scope `access:keys:write` · effect `write` · [Request, response and examples](/docs/api/api_keys/roll)
