Skip to content

API reference

List API keys

GET /v1/api-keys

Lists the active and disabled keys of the authenticated key's owner, newest first, including the calling key. Revoked and expired keys are omitted, and no secret is returned.

Authentication
Send an API key or a service-account access token as a Bearer token.

Responses

  • 200

    The owner's keys, newest first.

    PublicApiKeyList X-Request-ID
  • 401

    Authentication required.

    PublicApiError X-Request-ID
  • 403

    The API key lacks key-management permission.

    PublicApiError X-Request-ID

PublicApiKeyList

The API keys of the calling credential's owner, newest first.

  • api_keys PublicApiKey[] Required

    Active and disabled keys, newest first; revoked and expired keys are omitted.

Schemas

ApiKeyState

API-key lifecycle state visible in listings.

Allowed values
  • active
  • disabled

ErrorCode

Machine-readable product API failure.

Allowed values
  • unauthenticated
  • forbidden
  • invalid_request
  • not_found
  • conflict
  • payment_required
  • too_many_requests
  • upstream
  • internal

ErrorRecovery

Browser-safe recovery action selected by the authoritative product boundary.

ErrorRecovery alternatives
VariantType
1object
2object

PublicApiError

Stable public error envelope for APIs whose reason vocabulary is extensible.

  • code ErrorCode Required

    Closed status category suitable for program control flow.

    Allowed
    • unauthenticated
    • forbidden
    • invalid_request
    • not_found
    • conflict
    • payment_required
    • too_many_requests
    • upstream
    • internal
  • message string Required

    Safe diagnostic intended for operators, not program branching.

  • reason string Required

    Extensible machine-readable detail; clients must accept unknown values.

  • recovery null | ErrorRecovery Optional
  • request_id string | null Optional

    The request reference, equal to the response's `X-Request-ID`; quote it to support.

  • validation null | ValidationReport Optional

PublicApiKey

Public metadata for one API key; it never carries the secret or any digest of it.

  • created_at string Required

    Creation timestamp in UTC.

  • display_prefix string Required

    Non-secret prefix used to identify the key.

  • expires_at string | null Required

    Expiry timestamp in UTC, null for a key that never expires.

  • id string Required

    Stable credential id used for revocation.

  • last_used_at string | null Optional

    Most recent use in UTC, absent until the key is first used.

  • monthly_spend_limit_microusd integer | null Optional

    Monthly spend ceiling in millionths of a US dollar, absent when the key has none.

    Minimum
    • 0
  • name string Required

    User-provided display name.

  • state ApiKeyState Required

    Whether the key may authenticate now.

    Allowed
    • active
    • disabled

ValidationIssue

One actionable, privacy-safe contract violation.

  • allowed_values array | null Optional
    Maximum items
    • 16
  • code string Required

    Stable, extensible machine-readable category.

    Maximum length
    • 64
  • path string Required

    RFC 6901 pointer to the rejected location; empty means the root value.

    Maximum length
    • 1024
  • suggestion string Required

    Code-owned instruction for correcting the request.

    Maximum length
    • 512

ValidationReport

Bounded validation feedback shared by model, REST, and MCP boundaries.

  • contract string Required

    Stable contract name, normally the published schema component name.

    Maximum length
    • 128
  • issues ValidationIssue[] Required

    At most eight deterministic violations. Correct every issue before retrying.

    Maximum items
    • 8
  • truncated boolean Required

    Whether more violations were omitted; retry after correcting the listed issues.

Request
curl --request GET "https://platform.yep.com/api/v1/api-keys" \
  --header "Authorization: Bearer $YEP_API_KEY"
Response 200
{
  "api_keys": [
    {
      "created_at": "string",
      "display_prefix": "string",
      "expires_at": "string",
      "id": "string",
      "name": "string",
      "state": "active"
    }
  ]
}

Commands

No matching commands

Confirm it's you