curl --request PATCH \
--url https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Updated API key description",
"name": "Updated API Key"
}
'import requests
url = "https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id}"
payload = {
"description": "Updated API key description",
"name": "Updated API Key"
}
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({description: 'Updated API key description', name: 'Updated API Key'})
};
fetch('https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_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://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_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([
'description' => 'Updated API key description',
'name' => 'Updated API Key'
]),
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://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id}"
payload := strings.NewReader("{\n \"description\": \"Updated API key description\",\n \"name\": \"Updated API Key\"\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://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated API key description\",\n \"name\": \"Updated API Key\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_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 \"description\": \"Updated API key description\",\n \"name\": \"Updated API Key\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified_by": "<string>",
"name": "API Key",
"organization_id": "550e8400-e29b-41d4-a716-446655440000",
"token_prefix": "saf_org_550e8400_abc123",
"updated_at": "2023-11-07T05:31:56Z",
"description": "API key for external integrations",
"scopes": [
"mcp"
],
"service_account_id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440000"
}Update an API key
Update an API key name and/or description.
Updates the name and/or description of an API key. Note: Cannot update the token itself - delete and create a new key for that.
Context:
- Can update name and description only
- Cannot update token (use delete + create for new token)
- User must have access to the API key
Related Endpoints:
- DELETE /service-accounts//api-keys/ - Delete API key
- GET /service-accounts//api-keys - List API keys for service account
curl --request PATCH \
--url https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "Updated API key description",
"name": "Updated API Key"
}
'import requests
url = "https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id}"
payload = {
"description": "Updated API key description",
"name": "Updated API Key"
}
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({description: 'Updated API key description', name: 'Updated API Key'})
};
fetch('https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_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://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_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([
'description' => 'Updated API key description',
'name' => 'Updated API Key'
]),
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://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id}"
payload := strings.NewReader("{\n \"description\": \"Updated API key description\",\n \"name\": \"Updated API Key\"\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://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated API key description\",\n \"name\": \"Updated API Key\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flows.super.ai/api/service-accounts/{service_account_id}/api-keys/{api_key_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 \"description\": \"Updated API key description\",\n \"name\": \"Updated API Key\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified_by": "<string>",
"name": "API Key",
"organization_id": "550e8400-e29b-41d4-a716-446655440000",
"token_prefix": "saf_org_550e8400_abc123",
"updated_at": "2023-11-07T05:31:56Z",
"description": "API key for external integrations",
"scopes": [
"mcp"
],
"service_account_id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440000"
}Authorizations
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Path Parameters
UUID of the service account
UUID of the API key to update
Body
Response
API key updated successfully
Response model for API key operations.
Human-readable name for this API key.
255"API Key"
UUID of the organization this API key belongs to.
"550e8400-e29b-41d4-a716-446655440000"
Prefix of the authentication token for display purposes. Full token is only shown once during creation.
40"saf_org_550e8400_abc123"
Optional description explaining the purpose and usage of this API key.
"API key for external integrations"
Surfaces this API key may call. 'mcp' allows the MCP server at /mcp/v2; 'api' allows the REST API. The legacy MCP server at /mcp exposes REST operations as tools, so it needs both. NULL (the default) allows every surface. A call outside the key's scopes gets 403 with error code 'api_key_scope': an MCP-only key (['mcp']) on any REST path or on /mcp.
A surface an API key may call.
mcp, api ["mcp"]
UUID of the service account this API key belongs to. NULL for user keys.
"550e8400-e29b-41d4-a716-446655440000"
UUID of the user this API key belongs to. NULL for service account keys.
"550e8400-e29b-41d4-a716-446655440000"