Secret Keys

Create a Secret Key

Create a new Secret Key

post/secret-keys

Request body

notestring

A user-provided note to help identify this secret key

permissionsstring[] required

Permissions granted to this secret key, controlling which API operations it can perform

Example request

{
  "note": "Production backend key",
  "permissions": [
    "payment:read",
    "payment:create"
  ]
}

Response

OK

createdAtstring date-time required

The date and time when the entity was created.

updatedAtstring date-time nullable required

The date and time when the entity was last updated.

metadataobject nullable

Metadata used by merchants to store additional information about the entity.

idstring required

Unique identifier of the secret key

activeboolean required

Whether the secret key is active and can be used for API authentication

maskedValuestring required

Masked representation of the secret key, showing only the last four characters

notestring nullable required

User-provided note for identifying this secret key

permissionsstring[] required

Permissions of the secret key

valuestring required

The full secret key value. Only returned once upon creation and cannot be retrieved again

Example response

{
  "createdAt": "2024-02-18T12:00:00Z",
  "updatedAt": "2024-02-21T12:15:00Z",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "id": "skey_2R6lBd1IxNUPqtsQLcJU2PFtyAD",
  "active": true,
  "maskedValue": "sk_****...a1b2",
  "note": "Production backend key",
  "permissions": [
    "payment:read",
    "payment:create"
  ],
  "value": "sk_live_a1b2c3d4e5f6g7h8i9j0"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.