Skip to main content
POST
Issue a new API key for the current admin

Authorizations

Authorization
string
header
required

Passport bearer token authentication for legacy admin sessions.

Body

application/json
name
string | null

Human-readable key label. Validation: nullable|string|max:120.

Maximum string length: 120
Example:

"Zapier production"

expires_at
string<date-time> | null

Optional expiry timestamp; parsed via Carbon::parse(...)->utc(). Validation: nullable|date.

Example:

"2027-01-01T00:00:00Z"

Response

Key created. The api_key / token plain text is shown ONLY in this response.

id
integer
Example:

42

name
string
Example:

"Zapier production"

key_prefix
string
Example:

"hys_live_"

api_key
string

Plain-text secret. Persist client-side immediately — it is unrecoverable.

Example:

"hys_live_abc123def456..."

token
string

Deprecated alias of api_key for legacy clients.

user_id
integer
Example:

15

client_id
integer
Example:

207

expires_at
string<date-time> | null
created_at
string<date-time>
status
string
Example:

"success"