Skip to main content
Help Getting Started
Getting Started

Generate and use your first API key

2 min read·1 views·100% found this helpful

API keys let your applications and scripts authenticate with G8KEPR programmatically. This guide walks you through creating your first organization API key (prefixed gk_org_) and using it to make an authenticated request.

Before you begin

  • You need an active G8KEPR account and access to your organization's dashboard.
  • Creating keys requires an admin or owner role in your organization.

Create an API key

  1. 1.Sign in and open the API Keys page in your dashboard.
  2. 2.Select Create API key.
  3. 3.Give the key a descriptive name (for example, production-backend or ci-pipeline) so you can identify it later.
  4. 4.Select Create. Your new key is generated with the gk_org_ prefix.
  5. 5.Copy the key and store it somewhere safe.

The full secret is shown only once, at creation time. If you lose it, you cannot recover it — you'll need to create a new key. Never commit keys to source control or paste them into client-side code.

Authenticate a request

G8KEPR API keys are sent as a bearer token in the Authorization header of each request. API endpoints live under the /api/v1/ path.

bash
curl https://app.g8kepr.com/api/v1/... \
  -H "Authorization: Bearer gk_org_your_key_here"

Replace gk_org_your_key_here with the key you copied, and the ... with the endpoint you want to call. A successful, authenticated request returns a 200 response; the exact response body depends on the endpoint you call.

If the key is missing, malformed, or revoked, the API responds with 401 Unauthorized. Double-check that you included the Bearer prefix and that the key hasn't been rotated.

Keep your keys secure

  • Store keys in environment variables or a secrets manager, never hard-coded in your application.
  • Use separate keys for each environment or service so you can revoke one without affecting the others.
  • Rotate keys periodically, and immediately if a key may have been exposed.
  • Revoke unused keys from the API Keys page to reduce your attack surface.

Name each key after the service that uses it. When it's time to rotate or revoke, you'll know exactly what the key does and what depends on it.

Next steps

Was this helpful?Still stuck? Submit a request →

Related articles