SureshakeDocs
ApiEndpoints

API Key Endpoints

Manage programmatic access keys for your account.

API keys allow you to integrate Sureshake with your own systems and scripts.

List API Keys

Retrieve a list of API keys associated with your account.

GET/api/v1/api-keys
curl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/api-keys

Create API Key

Generate a new secret API key. The full key is only returned once upon creation.

POST/api/v1/api-keys
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Internal Script", "scope": "read"}' \
https://api.sureshake.com/api/v1/api-keys
201 Created
{
"data": {
  "id": "8f2349ef...",
  "name": "Internal Script",
  "key": "sk_live_...",
  "prefix": "sk_live",
  "status": "active",
  "createdAt": "2024-01-10T10:00:00Z"
}
}

Revoke API Key

Disable an API key immediately.

POST/api/v1/api-keys/:id/revoke
curl -X POST -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/api-keys/8f2349ef.../revoke

On this page