Skip to main content
POST /v1/issuer/credentials API Key

Issue a new credential

Issue a new verifiable credential to a holder. Requires issuer authentication via API key or bearer token.
The credential is signed and stored, ready for the holder to claim.

Parameters

Name Location Type Description
X-API-Key * header string Issuer API key for authentication

* Required parameter

Request Body

application/json

Parameters for issuing a credential

schema_id * string

Schema UUID or slug

Example: employee-badge

subject_identifier * string

Email or DID identifying the credential subject

Example: [email protected]

subject_identifier_type string

Type of subject identifier

Allowed values: "email", "did"

Example: email

claims * object

Credential claims (schema-dependent)

Example: {"name":"Jane Smith","employee_id":"EMP-12345","department":"Engineering"}

expires_in integer

Expiration in seconds from now

Example: 31536000

signing_key_id string

Specific signing key to use (key_id from /account/signing_keys)

Example: key-3e96c61b-3710-49d7-b256-5c06f881e120

cryptosuite object

Override the schema's default cryptosuite for this issuance (Data Integrity format only).

Response

201 Credential created successfully

Content-Type: application/json

success boolean
data object

A credential issuance record from the issuer's perspective

uuid string (uuid)

Unique identifier for the credential issuance

Example: 43861766-680a-4417-8657-9c22cc3d50fc

status string

Current status of the credential/issuance: - pending: Created but not yet issued - issued: Credential has been signed and delivered - active: Credential is valid and can be verified - suspended: Temporarily disabled - revoked: Permanently invalidated - expired: Credential has passed its expiration date - archived: Credential has been archived

Allowed values: "pending", "issued", "suspended", "revoked", "active", "expired", "archived"

Example: active

subject_identifier string

Email or DID identifying the credential subject

Example: [email protected]

subject_identifier_type string

Type of identifier used for the subject

Allowed values: "email", "did"

Example: email

issued_at string (date-time)

When the credential was issued

Example: 2025-01-15T10:00:00Z

expires_at string (date-time) nullable

When the credential expires

Example: 2027-01-15T10:00:00Z

schema object nullable
uuid string (uuid)

Example: 03e5242c-5b6c-4e3f-9df8-5f4ddecb28c4

name string

Example: Employee Badge

type string

Example: EmployeeBadgeCredential

issuer object
name string

Example: Acme Corporation

did string

Example: did:web:acme-corp.com

verification_url string (uri)

URL to verify this credential

Example: https://aho.com/verify/391fde06-ced0-4a2e-b904-0d7e6bd2777c

credential_jwt string nullable

The signed JWT credential token

Example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...

created_at string (date-time)

Example: 2025-01-15T09:55:00Z

subject_id string nullable

Internal subject identifier (detail view only)

Example: did:web:example.com:users:67890

claims object nullable

Credential claims/attributes (detail view only)

Example: {"name":"John Smith","title":"Senior Engineer","department":"Engineering"}

vc_json object nullable

Raw VC JSON-LD document (detail view only)

issuer_signing_key object

Signing key used (detail view only)

id string

Signing key identifier

Example: key-043b1dc6-863a-4b4a-8eed-2167ae85aaf9

key_id string

Key ID used in JWT header (kid)

Example: did:web:acme-corp.com#key-1

algorithm string

Signing algorithm

Allowed values: "es256", "es384", "ed25519"

Example: ed25519

verification_logs_count integer

Number of verification attempts (detail view only)

Example: 3

updated_at string (date-time)

When last updated (detail view only)

Example: 2025-01-20T14:30:00Z

Code Examples

import os
from aho_sdk import AhoSdk

client = AhoSdk.issuer(api_key=os.environ["AHO_API_KEY"])

result = client.credentials.create(
    body={
        "schema_id": "employee-badge",
        "subject_identifier": "[email protected]",
        "subject_identifier_type": "email",
        "claims": {
            "name": "Jane Smith",
            "employee_id": "EMP-12345",
            "department": "Engineering"
        },
        "expires_in": 31536000,
        "signing_key_id": "key-3e96c61b-3710-49d7-b256-5c06f881e120",
        "cryptosuite": {}
    }
)

Try It

Log in to test this endpoint directly from the documentation.

Log in