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-keys and GET /v1/api-keys return 404 in 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 key and secret pairs of one merchant.
  • Keys in your partner account returns every key in your partner account, with the id you need to update or delete a key.
EnvironmentHTTP MethodEndpoint
Sandbox testingGEThttps://api-sandbox.flexfactor.io/v1/merchants/{mid}/api-keys
Production environmentGEThttps://api.flexfactor.io/v1/merchants/{mid}/api-keys
Sandbox testingGEThttps://api-sandbox.flexfactor.io/v1/api-keys
Production environmentGEThttps://api.flexfactor.io/v1/api-keys

Required Keys

ParameterDescription
bearer tokenThe 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.

ParameterTypeDescription
pageSizeIntegerNumber of keys per page, from 1 to 100. Defaults to 10.
pageNumberIntegerPage to return, starting at 1. Defaults to 1.
typeStringReturns only the keys with this exact type.
revokedBooleantrue 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 NameTypeDescription
keysArray of ObjectsThe merchant's API keys that are not revoked.
keys[].keyStringThe merchant's appKey.
keys[].secretStringThe merchant's appSecret.
❗️

This response contains secrets

The secret is 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 NameTypeDescription
apiKeys.itemsArray of ObjectsThe keys on this page.
apiKeys.items[].idStringUnique identifier (GUID) of the key. Use it as {id} to update or delete the key.
apiKeys.items[].descriptionStringThe key's description. For a key made with Create an API key, this is the name sent at creation.
apiKeys.items[].keyStringThe appKey.
apiKeys.items[].valueStringAlways null. The secret is not returned by this endpoint.
apiKeys.items[].expirationStringExpiration as a duration (d.hh:mm:ss), counted from createdOn. 00:00:00 means no expiration.
apiKeys.items[].revokedAtString (DateTime)When the key was revoked, or null.
apiKeys.items[].isRevokedBooleantrue when the key is revoked.
apiKeys.items[].typeStringThe key's type label.
apiKeys.items[].clientIdStringUnique identifier (GUID) of the API client the key belongs to.
apiKeys.items[].lastUsedString (DateTime)Set when the key is created.
apiKeys.items[].noteStringThe key's note. For a key made with Create an API key, this is the description sent at creation.
apiKeys.items[].scopesArray of StringsThe scope IDs (GUID) assigned to the key's API client.
apiKeys.items[].createdOnString (DateTime)When the key was created.
apiKeys.items[].modifiedOnString (DateTime)When the key was last changed.
apiKeys.items[].isExpiredBooleantrue when the expiration has passed.
apiKeys.items[].statusStringActive, Revoked, or Expired.
apiKeys.totalCountIntegerNumber of keys that match the request.
apiKeys.pageNumberIntegerThe page returned.
apiKeys.pageSizeIntegerThe page size used.
apiKeys.totalPagesIntegerNumber of pages.
apiKeys.hasNextPageBooleantrue when a later page exists.
apiKeys.hasPreviousPageBooleantrue when an earlier page exists.

HTTP status codes

SituationHTTPBody
Keys returned200The response object
pageSize is not between 1 and 100400The message Page size must be between 1 and 100
pageNumber is less than 1400The message Page number must be greater than 0
The bearer token is not a partner token400The message Partner ID not found in token claims
Missing, invalid, or expired bearer token401—
The merchant does not belong to your partner account401The 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 scope403—
{mid} is not a GUID404—
The merchant has no API key that is not revoked500The message No keys found
The merchant lookup failed, or an unexpected error occurred500An 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 account

Did this page help you?