Dashboard
Developers → Agents → [agent name] → Issue credential| Field | Required | Description |
|---|---|---|
| Name | Yes | Label for this credential issuance (e.g. “Shift A — 2026-05-11”). |
| Description | No | Optional note for the audit trail. |
| Scope grants | Yes | One or more scope grants defining what the agent may do. Must be within the agent’s allowed scope types. |
| Expires in | Yes | Duration until the credential expires. Options: 1 hour, 8 hours, 24 hours, 7 days, 30 days. |
| Revocation policy | Yes | drain or kill. Defaults to the agent’s registered default. |
| Max concurrent invocations | No | Maximum number of parallel tool invocations. Default 10. |
API
Body
Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Credential label. 2–255 chars. |
description | string | No | Optional description. |
granted_scopes | ScopeGrant[] | Yes | Scope grant objects. Min 1, max 20. See Scope Grants. |
expires_at | ISO 8601 datetime | Yes | Must be in the future. |
revocation_policy | drain | kill | Yes | Revocation behavior. |
max_concurrent_invocations | integer | No | 1–1000. Default 10. |
Response
token field is returned only in this response. It is not stored and cannot be retrieved later.
Errors
| Code | HTTP | Meaning |
|---|---|---|
AGENT_ARCHIVED | 422 | Cannot issue credentials for an archived agent. |
INVALID_SCOPE_TYPE | 422 | A scope type is not in the agent’s allowed_scope_types. |
EXPIRY_IN_PAST | 422 | expires_at is not in the future. |
Using the credential
Pass the bearer token in theAuthorization header on every API call:
Token format
| Mode | Prefix | Example |
|---|---|---|
| Live | hasp_agent_ | hasp_agent_abcdef... |
| Test | hasp_agent_test_ | hasp_agent_test_abcdef... |
Listing credentials
token field is never returned in list or detail responses — only in the issuance response.
Query parameters
| Parameter | Description |
|---|---|
status | active, revoked, expired, or all (default). |
page | Page number. |
Retrieving a credential
Revoking a credential
Body (optional)
revocation_policy governs in-flight work (drain vs. kill). All delegation descendants are revoked simultaneously with kill policy regardless of their own configured policy.