APIKey .revoke
POST /{namespace}/api-keys/{apiKey}/revoke
Revoke stops an API Key at once: its next call fails with 401, and the record and its history stay.
- Noun
- API Key
- Mode
do- Event
APIKey.revoked
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
apiKey | API Key | required | The API Key to stop. |
reason | text | Why, shown to the Customer’s admins. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
apiKey | API Key | required | The API Key, with revokedAt set. |
Effects
- Emits
APIKey.revoked. - Two-way: it runs at once, in the
try,sendanddomodes. - Emails the Customer’s admins which key stopped, and why.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | APIKey.revoke |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |