Update API Key
curl --request PATCH \
--url https://api.signa.so/v1/organization/api-keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"<string>"
],
"expires_at": "<string>",
"metadata": {}
}
'import requests
url = "https://api.signa.so/v1/organization/api-keys/{id}"
payload = {
"name": "<string>",
"scopes": ["<string>"],
"expires_at": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['<string>'], expires_at: '<string>', metadata: {}})
};
fetch('https://api.signa.so/v1/organization/api-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.signa.so/v1/organization/api-keys/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'scopes' => [
'<string>'
],
'expires_at' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.signa.so/v1/organization/api-keys/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"expires_at\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.signa.so/v1/organization/api-keys/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"expires_at\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.signa.so/v1/organization/api-keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"expires_at\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "key_Mc2eF6gH",
"object": "api_key",
"name": "Aurora Digital production (renamed)",
"prefix": "sig_7kMn2pQr",
"scopes": ["trademarks:read"],
"rate_limit_tier": "standard",
"status": "active",
"expires_at": null,
"last_used_at": "2026-06-11T14:30:00.000Z",
"metadata": { "owner": "platform-team" },
"revoked_at": null,
"created_by": "key_Lb1dE5fG",
"created_at": "2026-01-05T12:00:00.000Z",
"updated_at": "2026-06-12T10:00:00.000Z",
"request_id": "req_yR4iJ0kL"
}
API Keys
Update API Key
Update an API key’s name, scopes, expiry, or metadata
PATCH
/
v1
/
organization
/
api-keys
/
{id}
Update API Key
curl --request PATCH \
--url https://api.signa.so/v1/organization/api-keys/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"scopes": [
"<string>"
],
"expires_at": "<string>",
"metadata": {}
}
'import requests
url = "https://api.signa.so/v1/organization/api-keys/{id}"
payload = {
"name": "<string>",
"scopes": ["<string>"],
"expires_at": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', scopes: ['<string>'], expires_at: '<string>', metadata: {}})
};
fetch('https://api.signa.so/v1/organization/api-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.signa.so/v1/organization/api-keys/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'scopes' => [
'<string>'
],
'expires_at' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.signa.so/v1/organization/api-keys/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"expires_at\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.signa.so/v1/organization/api-keys/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"expires_at\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.signa.so/v1/organization/api-keys/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ],\n \"expires_at\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "key_Mc2eF6gH",
"object": "api_key",
"name": "Aurora Digital production (renamed)",
"prefix": "sig_7kMn2pQr",
"scopes": ["trademarks:read"],
"rate_limit_tier": "standard",
"status": "active",
"expires_at": null,
"last_used_at": "2026-06-11T14:30:00.000Z",
"metadata": { "owner": "platform-team" },
"revoked_at": null,
"created_by": "key_Lb1dE5fG",
"created_at": "2026-01-05T12:00:00.000Z",
"updated_at": "2026-06-12T10:00:00.000Z",
"request_id": "req_yR4iJ0kL"
}
Overview
Updates an API key. The raw key value is never affected; use Rotate API Key to issue new credentials. Metadata uses merge semantics (null values remove keys). Scope changes are subject to escalation prevention: you cannot grant scopes that the calling key does not already hold. System keys cannot be modified, and revoked or expired keys return 404.
Requires the api-keys:manage scope and an Idempotency-Key header; see Idempotency.
Path Parameters
API key ID (
key_...).Request Body
New name (1-255 characters).
Replacement scope list (at least one). Subject to escalation prevention.
New expiry as an ISO 8601 timestamp, or
null to clear. Must be in the future.Metadata patch. Values may be strings or
null.Response
Returns the updated API key, with the same fields as Get API Key.{
"id": "key_Mc2eF6gH",
"object": "api_key",
"name": "Aurora Digital production (renamed)",
"prefix": "sig_7kMn2pQr",
"scopes": ["trademarks:read"],
"rate_limit_tier": "standard",
"status": "active",
"expires_at": null,
"last_used_at": "2026-06-11T14:30:00.000Z",
"metadata": { "owner": "platform-team" },
"revoked_at": null,
"created_by": "key_Lb1dE5fG",
"created_at": "2026-01-05T12:00:00.000Z",
"updated_at": "2026-06-12T10:00:00.000Z",
"request_id": "req_yR4iJ0kL"
}
Code Examples
curl -X PATCH "https://api.signa.so/v1/organization/api-keys/key_Mc2eF6gH" \
-H "Authorization: Bearer sig_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: rename-key-Mc2eF6gH-2026-06-12" \
-d '{
"name": "Aurora Digital production (renamed)",
"scopes": ["trademarks:read"],
"metadata": { "owner": "platform-team" }
}'
import { Signa } from "@signa-so/sdk";
const signa = new Signa({ api_key: process.env.SIGNA_API_KEY });
const updated = await signa.organization.apiKeys.update("key_Mc2eF6gH", {
name: "Aurora Digital production (renamed)",
scopes: ["trademarks:read"],
metadata: { owner: "platform-team" },
});
Errors
| Status | Type | Description |
|---|---|---|
| 400 | validation_error | Empty name, unknown scope, expires_at not in the future, or missing Idempotency-Key header |
| 401 | unauthorized | Missing or invalid API key |
| 403 | forbidden | API key lacks api-keys:manage, target key is a system key, or scope escalation attempted |
| 404 | not_found | API key does not exist, belongs to another org, or is revoked or expired |
Related Endpoints
⌘I