POST
/api/ApiKeys
const url = 'https://example.com/api/ApiKeys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"merchantId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","expiresAt":"2026-04-15T12:00:00Z","createdByUserId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/ApiKeys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "expiresAt": "2026-04-15T12:00:00Z", "createdByUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Mints a new API key. The plaintext token is included in the response exactly once —
store it securely before navigating away. The server only persists a SHA-256 hash and a
short prefix that’s safe to display in lists.
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”object
merchantId
required
string format: uuid
name
required
string
expiresAt
string format: date-time
createdByUserId
string format: uuid
Example generated
{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "expiresAt": "2026-04-15T12:00:00Z", "createdByUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}object
merchantId
required
string format: uuid
name
required
string
expiresAt
string format: date-time
createdByUserId
string format: uuid
Example generated
{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "expiresAt": "2026-04-15T12:00:00Z", "createdByUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}object
merchantId
required
string format: uuid
name
required
string
expiresAt
string format: date-time
createdByUserId
string format: uuid
Example generated
{ "merchantId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "expiresAt": "2026-04-15T12:00:00Z", "createdByUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”Key created.
Media type application/json
object
outcome
string
id
string format: uuid
token
string
signingSecret
string
apiKey
object
id
string format: uuid
name
string
keyPrefix
string
signingSecretPrefix
string
webhookUrl
string
webhookEvents
Array<string>
webhookEnabled
boolean
expiresAt
string format: date-time
lastUsedAt
string format: date-time
revokedAt
string format: date-time
createdAt
string format: date-time
Example
{ "outcome": "Ok"}Merchant not found.
Media type application/json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}