Update an API key
This endpoint updates the description, note, type, or scopes of an existing API key in your partner account.
Not yet available
PUT /v1/api-keys/{id}returns404in Sandbox and Production until the endpoint is enabled on the FlexFactor API. This page describes the request and response the endpoint uses once it is enabled. This page is hidden until then.
Request
Endpoint
| Environment | HTTP Method | Endpoint |
|---|---|---|
| Sandbox testing | PUT | https://api-sandbox.flexfactor.io/v1/api-keys/{id} |
| Production environment | PUT | https://api.flexfactor.io/v1/api-keys/{id} |
Required Key
| Field | Description |
|---|---|
{id} | Path parameter. The id (GUID) of the API key, as returned by List of API keys. |
bearer token | The authentication token returned by /oauth2/token for your partner credentials. The token needs the api-client.manage scope. |
Request Body
Send only the fields you want to change. A field you leave out keeps its current value.
| Field Name | Field Type | Required | Description |
|---|---|---|---|
description | String | optional | The key's description. 1 to 255 characters. |
note | String | optional | The key's note. Up to 500 characters. |
type | String | optional | The key's type label. Up to 50 characters. |
scopes | Array of Strings | optional | Scope IDs (GUID). The list replaces every scope on the key's API client. |
Rotation is not supportedThis endpoint does not generate a new key value. To replace a merchant's credentials, call Create an API key with
overwriteExistingKeyset totrue.
Response
A successful request returns 200 OK with the standard envelope. The response does not echo the updated key; read it with List of API keys.
Field Definitions
| Field Name | Field Type | Field Explanation |
|---|---|---|
success | Boolean | true when the update was applied. |
result | String | null on this endpoint. |
status | String | null on this endpoint. |
statusCode | String | null on this endpoint. It is not the HTTP status code. |
errors | Array | Empty on success. |
customProperties | Object | Empty on this endpoint. |
HTTP status codes
| Situation | HTTP | Body |
|---|---|---|
| Key updated, or nothing to change | 200 | The envelope with success: true |
| A field fails validation | 400 | Validation problem details — see Error Handling |
No key matches {id} in your partner account | 400 | Validation problem details with the message API key not found or access denied |
| The bearer token is not a partner token | 400 | The message Partner ID not found in token claims |
| Missing, invalid, or expired bearer token | 401 | — |
The token does not carry the api-client.manage scope | 403 | — |
{id} is not a GUID | 404 | — |
Example Payloads
Request
cURL Request Example (Update Only)
curl --request PUT \
--url https://api-sandbox.flexfactor.io/v1/api-keys/{id} \
--header 'Authorization: Bearer {the token returned by /oauth2}' \
--header 'Content-Type: application/json' \
--data '{
"description": "Updated API Key Name",
"note": "Owned by the platform team"
}'Response
Example for a Successful Update
{
"success": true,
"result": null,
"status": null,
"statusCode": null,
"errors": [],
"customProperties": {}
}Example for Handling Errors
Key Not Found
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
{
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"": [
"API key not found or access denied"
]
}
}Invalid Credentials
If the bearer token is missing, invalid, or expired, the API returns a 401 error with an empty body.
Updated 2 days ago

