DRAFTThe sandbox is not live yet. Every example here was returned by the platform's code in a test run on 2026-10-28, priced with example fees: no fee amount in them is an SMP price. Paths and fields can change before launch. Live keys are issued only after our bank program is approved.Sandbox not live yet · examples from a test run on 2026-10-28 · example fees

Reference · 4 operations

API keys

Keys for the merchant or for one of its sites: create, rotate with an overlap, and revoke. A key is shown once, when it is made.

Sandboxhttps://sandbox.socialmatterspay.com
Livehttps://api.socialmatterspay.com
GET /v1/api-keys

Every key of this merchant and its status (never the key itself)

Secret key

Host https://api.socialmatterspay.com · https://sandbox.socialmatterspay.com

Responses

StatusMeaning
200The keys, oldest first
401Error — error shape and codes
403Error — error shape and codes

Fields of each item of data (200)

FieldNotes
idstringpattern ^ak_[0-9a-f]{24}$
objectstring = "api_key"—
labelstring—
prefixstringThe first 15 characters of the key
site_idstring | null—
statusenumexpiring = rotated, working until expires_at. one of active, expiring, expired, revoked
expires_atstring | null (date-time)—
revoked_atstring | null (date-time)—
last_used_atstring | null (date-time)To the quarter hour
created_atstring (date-time)—
currentbooleanThe key this request came with
Example

List keys

GET /v1/api-keys
curl https://sandbox.socialmatterspay.com/v1/api-keys \
  -H 'Authorization: Bearer sk_sandbox_…'
Response · 200
HTTP 200
Cache-Control: no-store

{
  "data": [
    {
      "id": "ak_cdd8ac3a73ae2e907e98a139",
      "object": "api_key",
      "label": "Primary",
      "prefix": "sk_sandbox_b8ed",
      "site_id": null,
      "status": "active",
      "expires_at": null,
      "revoked_at": null,
      "last_used_at": "2026-10-28T00:22:34.406Z",
      "created_at": "2026-10-28T00:22:34.395Z",
      "current": true
    },
    {
      "id": "ak_712aae48d8a5ea7d8c5336bd",
      "object": "api_key",
      "label": "Wholesale store",
      "prefix": "sk_sandbox_7ab3",
      "site_id": "site_3d810c4cb0b887ef83ca99c8",
      "status": "active",
      "expires_at": null,
      "revoked_at": null,
      "last_used_at": null,
      "created_at": "2026-10-28T00:22:39.867Z",
      "current": false
    }
  ]
}
POST /v1/api-keys

Another key, for the merchant or one of its sites; the key is in this response only

Secret key

Host https://api.socialmatterspay.com · https://sandbox.socialmatterspay.com

Request body

FieldNotes
label requiredstring1–100 characters
site_idstringThe key acts for this site only

Responses

StatusMeaning
201The new key, shown once
400Error — error shape and codes
403Error — error shape and codes
404Error — error shape and codes
409Error — error shape and codes
422Error — error shape and codes

Fields of data (201)

FieldNotes
idstringpattern ^ak_[0-9a-f]{24}$
objectstring = "api_key"—
labelstring—
prefixstringThe first 15 characters of the key
site_idstring | null—
statusenumexpiring = rotated, working until expires_at. one of active, expiring, expired, revoked
expires_atstring | null (date-time)—
revoked_atstring | null (date-time)—
last_used_atstring | null (date-time)To the quarter hour
created_atstring (date-time)—
currentbooleanThe key this request came with
keystringsk_live_… or sk_sandbox_…; shown only here
Example

A key that acts for one site

POST /v1/api-keys
curl -X POST https://sandbox.socialmatterspay.com/v1/api-keys \
  -H 'Authorization: Bearer sk_sandbox_…' \
  -H 'Content-Type: application/json' \
  -d '{
  "label": "Wholesale store",
  "site_id": "site_3d810c4cb0b887ef83ca99c8"
}'
Response · 201
HTTP 201
Cache-Control: no-store

{
  "data": {
    "id": "ak_712aae48d8a5ea7d8c5336bd",
    "object": "api_key",
    "label": "Wholesale store",
    "prefix": "sk_sandbox_7ab3",
    "site_id": "site_3d810c4cb0b887ef83ca99c8",
    "status": "active",
    "expires_at": null,
    "revoked_at": null,
    "last_used_at": null,
    "created_at": "2026-10-28T00:22:39.867Z",
    "current": false,
    "key": "sk_sandbox_…"
  }
}
POST /v1/api-keys/{id}/rotate

Issue the replacement now; the old key keeps working until the overlap ends

Secret key

Host https://api.socialmatterspay.com · https://sandbox.socialmatterspay.com

The replacement has the old key's label and site. The old key's expires_at becomes now + expires_in_hours (default 24, 1 to 168), or stays sooner if it was already set. Rotating the key the dashboard shows makes the replacement the one it shows. The body is optional.

Parameters

FieldNotes
id requiredpath · string—

Request body

FieldNotes
expires_in_hoursinteger1 to 168. default 24

Responses

StatusMeaning
201The replacement, shown once, and when the old key stops
403Error — error shape and codes
404Error — error shape and codes
409Error — error shape and codes

Fields of data (201)

FieldNotes
idstringpattern ^ak_[0-9a-f]{24}$
objectstring = "api_key"—
labelstring—
prefixstringThe first 15 characters of the key
site_idstring | null—
statusenumexpiring = rotated, working until expires_at. one of active, expiring, expired, revoked
expires_atstring | null (date-time)—
revoked_atstring | null (date-time)—
last_used_atstring | null (date-time)To the quarter hour
created_atstring (date-time)—
currentbooleanThe key this request came with
keystringsk_live_… or sk_sandbox_…; shown only here
replacesobject
3 child fields
idstring—
prefixstring—
expires_atstring (date-time)—
Example

Rotate a key; the old one works for the overlap

POST /v1/api-keys/ak_712aae48d8a5ea7d8c5336bd/rotate
curl -X POST https://sandbox.socialmatterspay.com/v1/api-keys/ak_712aae48d8a5ea7d8c5336bd/rotate \
  -H 'Authorization: Bearer sk_sandbox_…' \
  -H 'Content-Type: application/json' \
  -d '{
  "expires_in_hours": 24
}'
Response · 201
HTTP 201
Cache-Control: no-store

{
  "data": {
    "id": "ak_0434deede69824be39cff34f",
    "object": "api_key",
    "label": "Wholesale store",
    "prefix": "sk_sandbox_8a81",
    "site_id": "site_3d810c4cb0b887ef83ca99c8",
    "status": "active",
    "expires_at": null,
    "revoked_at": null,
    "last_used_at": null,
    "created_at": "2026-10-28T00:22:39.874Z",
    "current": false,
    "key": "sk_sandbox_…",
    "replaces": {
      "id": "ak_712aae48d8a5ea7d8c5336bd",
      "prefix": "sk_sandbox_7ab3",
      "expires_at": "2026-10-29T00:22:39.874Z"
    }
  }
}
DELETE /v1/api-keys/{id}

Revoke a key now

Secret key

Host https://api.socialmatterspay.com · https://sandbox.socialmatterspay.com

409 last_merchant_key for the last working merchant-wide key; rotate or create a replacement first.

Parameters

FieldNotes
id requiredpath · string—

Responses

StatusMeaning
200The revoked key
403Error — error shape and codes
404Error — error shape and codes
409Error — error shape and codes

Fields of data (200)

The same fields as under listApiKeys.

Example

Revoke the old key now

DELETE /v1/api-keys/ak_712aae48d8a5ea7d8c5336bd
curl -X DELETE https://sandbox.socialmatterspay.com/v1/api-keys/ak_712aae48d8a5ea7d8c5336bd \
  -H 'Authorization: Bearer sk_sandbox_…'
Response · 200
HTTP 200
Cache-Control: no-store

{
  "data": {
    "id": "ak_712aae48d8a5ea7d8c5336bd",
    "object": "api_key",
    "label": "Wholesale store",
    "prefix": "sk_sandbox_7ab3",
    "site_id": "site_3d810c4cb0b887ef83ca99c8",
    "status": "revoked",
    "expires_at": "2026-10-29T00:22:39.874Z",
    "revoked_at": "2026-10-28T00:22:39.877Z",
    "last_used_at": null,
    "created_at": "2026-10-28T00:22:39.867Z",
    "current": false
  }
}