List of API keys
These endpoints retrieve the API keys of a merchant in your partner account, or every API key in your partner account.
Not yet available
GET /v1/merchants/{mid}/api-keysandGET /v1/api-keysreturn404in 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
Endpoints
Two endpoints list API keys:
- Keys of a merchant returns the active
keyandsecretpairs of one merchant. - Keys in your partner account returns every key in your partner account, with the
idyou need to update or delete a key.
| Environment | HTTP Method | Endpoint |
|---|---|---|
| Sandbox testing | GET | https://api-sandbox.flexfactor.io/v1/merchants/{mid}/api-keys |
| Production environment | GET | https://api.flexfactor.io/v1/merchants/{mid}/api-keys |
| Sandbox testing | GET | https://api-sandbox.flexfactor.io/v1/api-keys |
| Production environment | GET | https://api.flexfactor.io/v1/api-keys |
Required Keys
| Parameter | Description |
|---|---|
bearer token | The authentication token returned by /oauth2/token for your partner credentials. The token needs the api-client.read, api-client.write, or api-client.manage scope. |
{mid} | Path parameter, keys of a merchant only. The unique identifier (GUID) of the merchant. The merchant must belong to your partner account. |
Query parameters
These apply to Keys in your partner account only. All are optional.
| Parameter | Type | Description |
|---|---|---|
pageSize | Integer | Number of keys per page, from 1 to 100. Defaults to 10. |
pageNumber | Integer | Page to return, starting at 1. Defaults to 1. |
type | String | Returns only the keys with this exact type. |
revoked | Boolean | true returns only revoked keys. false returns only keys that are not revoked. |
Request Body
These endpoints don't require body parameters.
Response
Both endpoints return 200 OK. Each response also carries the standard envelope fields success, result, status, statusCode, errors, and customProperties.
Field Definitions
Keys of a merchant
| Field Name | Type | Description |
|---|---|---|
keys | Array of Objects | The merchant's API keys that are not revoked. |
keys[].key | String | The merchant's appKey. |
keys[].secret | String | The merchant's appSecret. |
This response contains secretsThe
secretis returned in full. Store it securely and share it only with the merchant it belongs to.
Keys in your partner account
Keys are sorted by creation date, most recent first.
| Field Name | Type | Description |
|---|---|---|
apiKeys.items | Array of Objects | The keys on this page. |
apiKeys.items[].id | String | Unique identifier (GUID) of the key. Use it as {id} to update or delete the key. |
apiKeys.items[].description | String | The key's description. For a key made with Create an API key, this is the name sent at creation. |
apiKeys.items[].key | String | The appKey. |
apiKeys.items[].value | String | Always null. The secret is not returned by this endpoint. |
apiKeys.items[].expiration | String | Expiration as a duration (d.hh:mm:ss), counted from createdOn. 00:00:00 means no expiration. |
apiKeys.items[].revokedAt | String (DateTime) | When the key was revoked, or null. |
apiKeys.items[].isRevoked | Boolean | true when the key is revoked. |
apiKeys.items[].type | String | The key's type label. |
apiKeys.items[].clientId | String | Unique identifier (GUID) of the API client the key belongs to. |
apiKeys.items[].lastUsed | String (DateTime) | Set when the key is created. |
apiKeys.items[].note | String | The key's note. For a key made with Create an API key, this is the description sent at creation. |
apiKeys.items[].scopes | Array of Strings | The scope IDs (GUID) assigned to the key's API client. |
apiKeys.items[].createdOn | String (DateTime) | When the key was created. |
apiKeys.items[].modifiedOn | String (DateTime) | When the key was last changed. |
apiKeys.items[].isExpired | Boolean | true when the expiration has passed. |
apiKeys.items[].status | String | Active, Revoked, or Expired. |
apiKeys.totalCount | Integer | Number of keys that match the request. |
apiKeys.pageNumber | Integer | The page returned. |
apiKeys.pageSize | Integer | The page size used. |
apiKeys.totalPages | Integer | Number of pages. |
apiKeys.hasNextPage | Boolean | true when a later page exists. |
apiKeys.hasPreviousPage | Boolean | true when an earlier page exists. |
HTTP status codes
| Situation | HTTP | Body |
|---|---|---|
| Keys returned | 200 | The response object |
pageSize is not between 1 and 100 | 400 | The message Page size must be between 1 and 100 |
pageNumber is less than 1 | 400 | The message Page number must be greater than 0 |
| 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 merchant does not belong to your partner account | 401 | The message Access denied: Merchant does not belong to your partner account |
The token does not carry the api-client.read, api-client.write, or api-client.manage scope | 403 | — |
{mid} is not a GUID | 404 | — |
| The merchant has no API key that is not revoked | 500 | The message No keys found |
| The merchant lookup failed, or an unexpected error occurred | 500 | An error message |
Payload Examples
Request
cURL Request Example
Keys of a merchant:
curl --request GET \
--url 'https://api-sandbox.flexfactor.io/v1/merchants/{mid}/api-keys' \
--header 'Authorization: Bearer {the token returned by /oauth2}' \
--header 'accept: application/json'Keys in your partner account:
curl --request GET \
--url 'https://api-sandbox.flexfactor.io/v1/api-keys?pageSize=10&pageNumber=1&revoked=false' \
--header 'Authorization: Bearer {the token returned by /oauth2}' \
--header 'accept: application/json'Response
JSON Example for a Successful Retrieval
Keys of a merchant:
{
"keys": [
{
"key": "{appKey}",
"secret": "{appSecret}"
}
],
"success": true,
"result": null,
"status": null,
"statusCode": null,
"errors": [],
"customProperties": {}
}Keys in your partner account:
{
"apiKeys": {
"items": [
{
"id": "{{$guid}}",
"description": "My API Key",
"key": "{appKey}",
"value": null,
"expiration": "00:00:00",
"revokedAt": null,
"isRevoked": false,
"type": "",
"clientId": "{{$guid}}",
"lastUsed": "2026-11-10T12:00:00Z",
"note": "Key for the merchant integration",
"scopes": [],
"createdOn": "2026-11-10T12:00:00Z",
"modifiedOn": "2026-11-10T12:00:00Z",
"isExpired": false,
"status": "Active"
}
],
"totalCount": 1,
"pageNumber": 1,
"pageSize": 10,
"totalPages": 1,
"hasNextPage": false,
"hasPreviousPage": false
},
"success": true,
"result": null,
"status": null,
"statusCode": null,
"errors": [],
"customProperties": {}
}JSON Example for No API Keys Found
Keys in your partner account returns an empty page:
{
"apiKeys": {
"items": [],
"totalCount": 0,
"pageNumber": 1,
"pageSize": 10,
"totalPages": 0,
"hasNextPage": false,
"hasPreviousPage": false
},
"success": true,
"result": null,
"status": null,
"statusCode": null,
"errors": [],
"customProperties": {}
}Keys of a merchant returns 500 with the message No keys found.
Example for Handling Errors
Invalid Credentials: If the bearer token is missing, invalid, or expired, the API returns a 401 error with an empty body.
Merchant not in your account: If the merchant does not belong to your partner account, the API returns a 401 error with a message.
HTTP/1.1 401 Unauthorized
Access denied: Merchant does not belong to your partner accountUpdated 2 days ago

