ChirpieDocs
API Reference

API Keys

Create, list, and revoke API keys programmatically.

Create a Key

POST /api/v1/keys
Authorization: Bearer chirpie_sk_YOUR_KEY
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
namestringNoKey name (1-100 chars, default: "Default")

Response 201 Created

{
  "data": {
    "key": "chirpie_sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789ab",
    "prefix": "chirpie_sk_...9ab",
    "name": "Production",
    "message": "Save this key securely. It will not be shown again."
  }
}

The full key is returned only once in this response. Store it immediately. Chirpie stores a SHA-256 hash — the raw key cannot be retrieved later.

Limits

Maximum 25 keys per account. Returns 400 if the limit is reached.


List Keys

GET /api/v1/keys
Authorization: Bearer chirpie_sk_YOUR_KEY

Response 200 OK

{
  "data": [
    {
      "id": "key-uuid-here",
      "name": "Production",
      "key_prefix": "chirpie_sk_...9ab",
      "last_used_at": "2026-03-23T10:00:00.000Z",
      "created_at": "2026-03-01T00:00:00.000Z"
    }
  ]
}

Only key prefixes are returned — never the full key.


Revoke a Key

DELETE /api/v1/keys?id=KEY_UUID
Authorization: Bearer chirpie_sk_YOUR_KEY

Query Parameters

ParameterTypeRequiredDescription
idstring (UUID)YesThe key ID to revoke

Response 200 OK

{
  "data": {
    "id": "key-uuid-here",
    "revoked": true
  }
}

Revoked keys stop working immediately. This action cannot be undone.

On this page