hzel
ReferenceStructures

OAuth Application Structures

OAuthApplicationView and OAuthAppPublicView returned by OAuth app endpoints.

OAuthApplicationView

Returned by the OAuth application management endpoints (GET, PATCH, POST /secret). The client_secret field is never present in this view — it is only returned once, at creation time, inside CreateAppResponse.

Fields

FieldTypeDescription
idstring (UUID)Internal application identifier.
namestringHuman-readable application name.
descriptionstring | nullOptional description provided at registration.
client_idstring (UUID)Public OAuth client identifier. Include this in authorization URLs.
client_secret_prefixstringFirst 12 characters of the raw client secret (display only — used to identify which secret is active).
redirect_urisarray of stringsRegistered callback URIs.
created_atstring (ISO 8601)UTC timestamp when the application was registered.
revoked_atstring (ISO 8601) | nullSet when the application is deleted; null if still active.

Example

{
  "id": "b3c4d5e6-0000-0000-0000-000000000001",
  "name": "My Integration",
  "description": "Connects MyApp to hzel containers",
  "client_id": "a1b2c3d4-0000-0000-0000-000000000001",
  "client_secret_prefix": "hzcs_AbCdEfGh",
  "redirect_uris": ["https://myapp.example.com/callback"],
  "created_at": "2025-06-15T10:00:00Z",
  "revoked_at": null
}

CreateAppResponse

Returned only by POST /api/v1/oauth/apps. Contains all OAuthApplicationView fields plus the one-time client_secret.

FieldTypeDescription
client_secretstringThe raw client secret — returned only at creation. Prefix hzcs_. Store it immediately and securely.
(all OAuthApplicationView fields)See above.
{
  "client_secret": "hzcs_AbCdEfGhIjKlMnOpQrSt...",
  "id": "b3c4d5e6-0000-0000-0000-000000000001",
  "name": "My Integration",
  "description": "Connects MyApp to hzel containers",
  "client_id": "a1b2c3d4-0000-0000-0000-000000000001",
  "client_secret_prefix": "hzcs_AbCdEfGh",
  "redirect_uris": ["https://myapp.example.com/callback"],
  "created_at": "2025-06-15T10:00:00Z",
  "revoked_at": null
}

OAuthAppPublicView

Returned by the unauthenticated GET /api/v1/oauth/apps/public/{client_id} endpoint. Used by the consent screen to show the application's identity before a user approves access.

Fields

FieldTypeDescription
client_idstring (UUID)Public OAuth client identifier.
namestringApplication name as registered by the owner.
descriptionstring | nullOptional description.
owner_namestringDisplay name or email of the user who registered the application.

Example

{
  "client_id": "a1b2c3d4-0000-0000-0000-000000000001",
  "name": "My Integration",
  "description": "Connects MyApp to hzel containers",
  "owner_name": "Alice Example"
}