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

Create an automation

Create a new credential automation. Automations define when and how
credentials are automatically issued from a data source mapping.

Parameters

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

* Required parameter

Request Body

application/json

Parameters for creating a credential automation

name * string

Display name for the automation

Example: Employee Badge Automation

data_source_mapping * string

Data source mapping slug or hashid

Example: employee-badge-mapping

account_domain * string

Domain name or hashid (e.g., 'trust.example.com')

Example: trust.example.com

trigger_mode * string

How the automation is triggered

Allowed values: "manual", "scheduled", "webhook"

Example: manual

schedule string

Cron expression for scheduled mode

Example: 0 9 * * 1

Response

201 Automation created

Content-Type: application/json

success boolean
data object

An automated credential issuance policy

id * string

Unique identifier (hashid)

Example: abc123xyz

name * string

Display name for the automation

Example: Daily Badge Sync

trigger_mode * string

How the automation is triggered: - manual: Triggered via API or dashboard - scheduled: Runs on cron schedule - webhook: Triggered via authenticated webhook

Allowed values: "manual", "scheduled", "webhook"

Example: scheduled

status * string

Current status: - draft: Not yet activated - active: Ready to run - paused: Temporarily disabled - error: Error state

Allowed values: "draft", "active", "paused", "error"

Example: active

schedule string nullable

Cron expression for scheduled mode

Example: 0 0 * * *

data_source_mapping * object

The linked data source mapping

id * string

Example: badge-credential-mapping

name * string

Example: Employee Database → Employee Badge

account_domain * object

The domain under which credentials are issued

id * string

Example: aEdOjwxyMwQBkxwgZjNG

domain * string

Example: acme-corp.com

can_run * boolean

Whether the automation can be triggered

Example: true

running * boolean

Whether the automation is currently running

last_run object nullable

Information about the last run (detail view only)

at string (date-time)

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

record_count integer nullable

Example: 150

error string nullable
webhook object nullable

Webhook configuration (webhook mode only, detail view)

configured boolean

Whether a webhook token is configured

Example: true

enabled boolean

Whether webhook triggers are allowed

Example: true

created_at * string (date-time)

When the automation was created

Example: 2025-01-01T00:00:00Z

updated_at * string (date-time)

When the automation was last updated

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

Code Examples

import os
from aho_sdk import AhoSdk

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

result = client.automations.create(
    body={
        "name": "Employee Badge Automation",
        "data_source_mapping": "employee-badge-mapping",
        "account_domain": "trust.example.com",
        "trigger_mode": "manual",
        "schedule": "0 9 * * 1"
    }
)

Try It

Log in to test this endpoint directly from the documentation.

Log in