Amistio
Back to Developers

For developers

Partner API reference

Everything the partner API answers today, read from the same schemas the routes validate with. List your agents, start runs of their published versions, read results, mint embed sessions, and register signed result callbacks - from your own servers, with your own keys.

The reference text - operation summaries, descriptions, and field descriptions - comes from the API description itself and is in English.

Overview

The API is plain JSON over HTTPS. Every address below is relative to the base URL, every request carries your key in the Authorization header, and every answer is JSON - including failures.

Base URL
https://www.amistio.com/api/v1
API version
1.0.0
Format
JSON over HTTPS

Changes inside v1 are additive only: new fields and new operations may appear, existing ones keep their meaning. Anything that would break a working client arrives as /api/v2 instead.

Authentication

Create API keys under Settings in the Builder. Each key belongs to you and carries only the scopes you chose when you created it.

Key shape

amk_<keyId>_<secret>

Header

Authorization: Bearer amk_<keyId>_<secret>
  • The key is shown exactly once, when you create it. Amistio keeps only a digest and can never show it again.
  • Send the key only in the Authorization header over HTTPS. A key anywhere in the query string is refused with 400 before anything else runs.
  • A key can carry an expiry date and can be revoked at any time. Revocation takes effect on the very next request.
  • Every use updates the key's last-used time, so Settings shows which keys are really in use.
  • You can hold at most 20 live keys at a time.
  • Amistio's own signed-in pages may call the same operations with the browser session, same-origin only. Keys are for your servers - never put one in a browser.

Scopes

A request the key's scopes do not cover fails with 403 before anything else runs. Give a key only the scopes its job needs.

Scopes
ScopeMeaningOperations
agents:readRead your agents and their published version pins.
runs:startStart runs of your agents' published versions.
runs:readRead runs, their results, and their callback deliveries.
embed:mintMint embed sessions for your allowed embedding origins.
callbacks:manageRegister, pause, resume, rotate, and remove result callbacks.

Limits

Protection bounds, not pricing. When a bound is reached the answer is 429 with a Retry-After header that says how many seconds to wait.

Limits
WhatBound
Requests per key60 per minute
Run starts per owner10 per minute
List page sizelimit from 1 to 100, default 20
Request bodyup to 256 KiB - a larger body answers 413
Callbacks per agentat most 10
Live keys per ownerat most 20
Embed token first usethe frame must load within 10 minutes of minting
Callback delivery attemptsup to 5 attempts, with growing waits between them

Idempotency

Send an Idempotency-Key header when you start a run, so a retry after a timeout or a lost answer never starts a second run.

  1. The key is yours to choose: 1 to 200 printable ASCII characters, for example your own order id.
  2. A repeat with the same key within 24 hours returns the same run with replayed set to true and status 200. A run that really started answers 201.
  3. The same key with a different input fails with 409, so a mistaken reuse can never silently return someone else's run.

Start one durable run of the agent's published version. Input is validated exactly like the public run page; an input object above the run bound (49152 serialized characters) fails with 400. Send an Idempotency-Key header to make retries safe: a repeat inside 24 hours returns the same run and never starts a second one; a repeat with a different input fails with 409.

POST /agents/{agentId}/runs

Pagination

List operations return one page at a time and hand you a cursor for the next one.

  1. Ask for a page with limit, from 1 to 100. Without it you get 20 items.
  2. When more pages exist the answer carries nextCursor. Pass it back as cursor with the same limit to read the next page.
  3. The last page carries no nextCursor.

Errors

Every failure is the same typed JSON body. The code is one of a closed, stable set; the message is plain, bounded, and never carries a secret.

Error body

{
  "error": {
    "code": "not-found",
    "message": "not found"
  }
}

HTTP statuses

HTTP statuses
StatusMeaningWhere
200
  • The OpenAPI document
  • One page of agents
  • The agent
  • An earlier start with the same Idempotency-Key was returned
  • One page of runs
  • The run
  • The agent's callbacks
  • The callback
  • The updated callback
  • The callback with its new secret, shown once
  • The run's deliveries
201
  • The run was started (it may still be running)
  • The embed session
  • The callback with its secret, shown once
204
  • Removed
400
  • Malformed request (also: an API key placed in the query string)
  • Malformed request, or an address that is not public https (private, loopback, link-local, and metadata ranges are refused)
401
  • No credential, or an invalid, expired, or revoked API key
  • Every authenticated operation
403
  • The key lacks the required scope
  • Every authenticated operation
404
  • Unknown or foreign id - always the same body
  • The partner API is off
409
  • No published version is live, or the Idempotency-Key was reused with a different input
  • The origin is not on your allowed list, or no published version is live
  • The agent already has 10 callbacks
413
  • The request body is larger than 256 KiB
429
  • Protection bound reached; wait Retry-After seconds
  • Every authenticated operation
501
  • Embedding is not configured on this deployment

Error codes

The codes a request can come back with, and the HTTP status each one travels with. Match on the code, not on the message.

Error codes
CodeStatusMeaning
auth-required401No credential was sent and no session is signed in.
auth-invalid401The API key is malformed, unknown, expired, or revoked.
scope-insufficient403The key lacks the scope this operation needs.
payload-invalid400The body, a parameter, or a header is malformed - including a key placed in the query string.
payload-too-large413The request body is larger than the allowed size.
not-found404The id is unknown, belongs to someone else, is malformed, or the partner API is off - always the same answer.
rate-limited429A protection bound was reached; wait the seconds named in Retry-After.
version-not-published409The agent has no live published version to run or embed.
unsupported-trigger409The agent's live version has no trigger that a run or an embedded page could start.
conflict409The Idempotency-Key was already used with a different input.
budget-exceeded409The agent already has the maximum number of callbacks.
embed-origin-not-allowed409The origin is not on your allowed embedding origins list.
capability-not-implemented501This deployment does not offer what the request needs, for example embedding is not configured.
storage-error500Amistio could not complete the request; try again later.

Endpoints

One section per operation, grouped by resource. Each sample reads your key from an environment variable and is meant to run on your server, never in a browser.

Document

GET/openapi.json

This document

The OpenAPI 3.1 description of the partner API, generated from the same schemas the routes validate with.

ScopeNone - public while the API is onoperationIdgetOpenApiDocument

Request body

No request body.

Responses

Request sample

curl https://www.amistio.com/api/v1/openapi.json

Agents

GET/agents

List your agents

Your agents with their published version pins, newest-updated first, paged by cursor.

Scopeagents:readoperationIdlistAgents

Query parameters

Query parameters
NameTypeRequiredDescription
cursorstringoptional
limitstringoptional1-100, default 20

Request body

No request body.

Responses

  • 200One page of agents

    listAgents 200
    NameTypeRequiredDescription
    agentsarray of objectrequired
    agentIdstringrequiredThe agent's definition id
    namestringrequired
    descriptionstringoptional
    publishedVersionIdstring | nullrequiredThe exact published version the agent runs, or null when nothing is live
    livebooleanrequiredTrue when a published version is active and runnable through the API
    archivedbooleanrequired
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    updatedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    nextCursorstringoptionalPass back as cursor to read the next page
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/agents
GET/agents/{agentId}

One agent

One agent with its published pin, start mode, and the input form its published version expects.

Scopeagents:readoperationIdgetAgent

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired

Request body

No request body.

Responses

  • 200The agent

    One agent in detail

    getAgent 200
    NameTypeRequiredDescription
    agentIdstringrequiredThe agent's definition id
    namestringrequired
    descriptionstringoptional
    publishedVersionIdstring | nullrequiredThe exact published version the agent runs, or null when nothing is live
    livebooleanrequiredTrue when a published version is active and runnable through the API
    archivedbooleanrequired
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    updatedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    startModestringoptionalHow the live version starts; present only when liveAllowed values: manual, schedule, provider-event, event, none
    formobject | nullrequiredThe inputs to send in input when starting a run; null when nothing is live
    fieldsarray of objectrequired
    keystringrequiredInput key this field's value lands under
    labelstringrequired
    kindstringrequiredField kind, e.g. text, long-text, number, select, photo, document
    requiredbooleanoptional
    placeholderstringoptional
    helpstringoptional
    optionsarray of stringoptionalChoices for select fields
    minnumberoptional
    maxnumberoptional
    stepnumberoptional
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/agents/<agentId>

Runs

POST/agents/{agentId}/runs

Start a run

Start one durable run of the agent's published version. Input is validated exactly like the public run page; an input object above the run bound (49152 serialized characters) fails with 400. Send an Idempotency-Key header to make retries safe: a repeat inside 24 hours returns the same run and never starts a second one; a repeat with a different input fails with 409.

Scoperuns:startoperationIdstartRun

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired

Request headers

Request headers
NameTypeRequiredDescription
Idempotency-KeystringoptionalOptional client-chosen key (1-200 printable ASCII characters)

Request body

Start one run of the agent's published version

startRun Request body
NameTypeRequiredDescription
inputobject (any keys)optionalThe run input, keyed exactly like the agent's form fields; validated like the public run page

Responses

  • 200An earlier start with the same Idempotency-Key was returned

    startRun 200
    NameTypeRequiredDescription
    runobjectrequiredOne run: state plus the same bounded, redacted view the Amistio result page shows
    runIdstringrequired
    agentIdstringrequired
    versionIdstringoptional
    statestringrequiredAllowed values: running, awaiting-approval, succeeded, failed, cancelled
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    finishedAtMillisintegerminimum: 0optionalUnix time in milliseconds
    originobjectrequired
    kindstringrequiredAllowed values: manual, draft-test, webhook, schedule, share-link, provider-event, room-message, conversation, api, embed
    inputobject (any keys)required
    outputsobject (any keys)requiredRedacted outputs; generated media keeps only descriptors
    stepsarray of objectrequired
    seqintegerminimum: 0required
    kindstringrequired
    statusstringrequiredAllowed values: ok, error
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    durationMillisintegerminimum: 0required
    previewstringrequiredBounded, redacted preview of the step's output
    stepsTruncatedbooleanrequired
    errorobjectoptional
    codestringrequired
    messagestringrequired
    pendingApprovalobjectoptionalPresent while the run waits for the owner's decision in Amistio
    requiredApproversintegerminimum: -9007199254740991required
    decisionsintegerminimum: -9007199254740991required
    approvalsintegerminimum: 0required
    usageobjectoptional
    modelCallsintegerminimum: -9007199254740991required
    toolCallsintegerminimum: -9007199254740991required
    connectorCallsintegerminimum: -9007199254740991required
    retriesintegerminimum: -9007199254740991required
    cancellationobjectoptional
    reasonstringrequiredAllowed values: user-requested, deadline
    requestedAtMillisintegerminimum: 0optionalUnix time in milliseconds
    replayedbooleanrequiredTrue when an Idempotency-Key matched an earlier start and no new run began
  • 201The run was started (it may still be running)

    startRun 201
    NameTypeRequiredDescription
    runobjectrequiredOne run: state plus the same bounded, redacted view the Amistio result page shows
    runIdstringrequired
    agentIdstringrequired
    versionIdstringoptional
    statestringrequiredAllowed values: running, awaiting-approval, succeeded, failed, cancelled
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    finishedAtMillisintegerminimum: 0optionalUnix time in milliseconds
    originobjectrequired
    kindstringrequiredAllowed values: manual, draft-test, webhook, schedule, share-link, provider-event, room-message, conversation, api, embed
    inputobject (any keys)required
    outputsobject (any keys)requiredRedacted outputs; generated media keeps only descriptors
    stepsarray of objectrequired
    seqintegerminimum: 0required
    kindstringrequired
    statusstringrequiredAllowed values: ok, error
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    durationMillisintegerminimum: 0required
    previewstringrequiredBounded, redacted preview of the step's output
    stepsTruncatedbooleanrequired
    errorobjectoptional
    codestringrequired
    messagestringrequired
    pendingApprovalobjectoptionalPresent while the run waits for the owner's decision in Amistio
    requiredApproversintegerminimum: -9007199254740991required
    decisionsintegerminimum: -9007199254740991required
    approvalsintegerminimum: 0required
    usageobjectoptional
    modelCallsintegerminimum: -9007199254740991required
    toolCallsintegerminimum: -9007199254740991required
    connectorCallsintegerminimum: -9007199254740991required
    retriesintegerminimum: -9007199254740991required
    cancellationobjectoptional
    reasonstringrequiredAllowed values: user-requested, deadline
    requestedAtMillisintegerminimum: 0optionalUnix time in milliseconds
    replayedbooleanrequiredTrue when an Idempotency-Key matched an earlier start and no new run began
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 409No published version is live, or the Idempotency-Key was reused with a different input

    The shared error body - see Errors.

  • 413The request body is larger than 256 KiB

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -X POST -H "Authorization: Bearer $AMISTIO_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-42" \
  -d '{"input":{}}' \
  https://www.amistio.com/api/v1/agents/<agentId>/runs
GET/runs

List runs of one agent

Runs of one agent you own, newest first, paged by cursor. The agent query parameter is required.

Scoperuns:readoperationIdlistRuns

Query parameters

Query parameters
NameTypeRequiredDescription
cursorstringoptional
limitstringoptional1-100, default 20
agentstringrequiredThe agent whose runs to list (required)

Request body

No request body.

Responses

  • 200One page of runs

    listRuns 200
    NameTypeRequiredDescription
    runsarray of objectrequired
    runIdstringrequired
    agentIdstringrequired
    versionIdstringoptional
    statestringrequiredAllowed values: running, awaiting-approval, succeeded, failed, cancelled
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    finishedAtMillisintegerminimum: 0optionalUnix time in milliseconds
    originobjectrequired
    kindstringrequiredAllowed values: manual, draft-test, webhook, schedule, share-link, provider-event, room-message, conversation, api, embed
    inputobject (any keys)required
    outputsobject (any keys)requiredRedacted outputs; generated media keeps only descriptors
    stepsarray of objectrequired
    seqintegerminimum: 0required
    kindstringrequired
    statusstringrequiredAllowed values: ok, error
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    durationMillisintegerminimum: 0required
    previewstringrequiredBounded, redacted preview of the step's output
    stepsTruncatedbooleanrequired
    errorobjectoptional
    codestringrequired
    messagestringrequired
    pendingApprovalobjectoptionalPresent while the run waits for the owner's decision in Amistio
    requiredApproversintegerminimum: -9007199254740991required
    decisionsintegerminimum: -9007199254740991required
    approvalsintegerminimum: 0required
    usageobjectoptional
    modelCallsintegerminimum: -9007199254740991required
    toolCallsintegerminimum: -9007199254740991required
    connectorCallsintegerminimum: -9007199254740991required
    retriesintegerminimum: -9007199254740991required
    cancellationobjectoptional
    reasonstringrequiredAllowed values: user-requested, deadline
    requestedAtMillisintegerminimum: 0optionalUnix time in milliseconds
    nextCursorstringoptionalPass back as cursor with the same limit to read the next page
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -H "Authorization: Bearer $AMISTIO_KEY" \
  "https://www.amistio.com/api/v1/runs?agent=<agentId>&limit=20"
GET/runs/{runId}

One run

State plus the same bounded, redacted view the Amistio result page shows.

Scoperuns:readoperationIdgetRun

Path parameters

Path parameters
NameTypeRequiredDescription
runIdstringrequired

Request body

No request body.

Responses

  • 200The run

    One run: state plus the same bounded, redacted view the Amistio result page shows

    getRun 200
    NameTypeRequiredDescription
    runIdstringrequired
    agentIdstringrequired
    versionIdstringoptional
    statestringrequiredAllowed values: running, awaiting-approval, succeeded, failed, cancelled
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    finishedAtMillisintegerminimum: 0optionalUnix time in milliseconds
    originobjectrequired
    kindstringrequiredAllowed values: manual, draft-test, webhook, schedule, share-link, provider-event, room-message, conversation, api, embed
    inputobject (any keys)required
    outputsobject (any keys)requiredRedacted outputs; generated media keeps only descriptors
    stepsarray of objectrequired
    seqintegerminimum: 0required
    kindstringrequired
    statusstringrequiredAllowed values: ok, error
    startedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    durationMillisintegerminimum: 0required
    previewstringrequiredBounded, redacted preview of the step's output
    stepsTruncatedbooleanrequired
    errorobjectoptional
    codestringrequired
    messagestringrequired
    pendingApprovalobjectoptionalPresent while the run waits for the owner's decision in Amistio
    requiredApproversintegerminimum: -9007199254740991required
    decisionsintegerminimum: -9007199254740991required
    approvalsintegerminimum: 0required
    usageobjectoptional
    modelCallsintegerminimum: -9007199254740991required
    toolCallsintegerminimum: -9007199254740991required
    connectorCallsintegerminimum: -9007199254740991required
    retriesintegerminimum: -9007199254740991required
    cancellationobjectoptional
    reasonstringrequiredAllowed values: user-requested, deadline
    requestedAtMillisintegerminimum: 0optionalUnix time in milliseconds
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/runs/<runId>

Embedding

POST/embed-sessions

Mint an embed session

A short-lived signed token that lets exactly one allowed origin show the agent's public run page inside an iframe at the returned embedUrl. The frame must load within 10 minutes; the token is shown once.

Scopeembed:mintoperationIdcreateEmbedSession

Request body

Mint one short-lived embed session

createEmbedSession Request body
NameTypeRequiredDescription
agentIdstringrequiredA live agent you own
originstringrequiredExact site that will embed the frame, e.g. https://app.example.com; must be on your allowed list
surfacestringoptionalThe only surface in this sliceAllowed values: run-page

Responses

Request sample

curl -X POST -H "Authorization: Bearer $AMISTIO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agentId":"<agentId>","origin":"https://app.example.com"}' \
  https://www.amistio.com/api/v1/embed-sessions

Callbacks

GET/agents/{agentId}/callbacks

List an agent's result callbacks

The callbacks registered on one agent you own, oldest first. Secrets are never listed. Every callback POST carries X-Amistio-Event-Id, X-Amistio-Timestamp (Unix seconds), and X-Amistio-Signature: sha256=<hex HMAC-SHA256(secret, "<timestamp>.<rawBody>")>. Verify with the raw secret over the raw body in constant time, refuse timestamps more than 300 seconds from your clock, and deduplicate on the event id (retries resend the same id with a fresh timestamp and signature). The registration's secretVersion tells you which secret signed after a rotation.

Scopecallbacks:manageoperationIdlistCallbacks

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired

Request body

No request body.

Responses

  • 200The agent's callbacks

    listCallbacks 200
    NameTypeRequiredDescription
    callbacksarray of objectrequired
    callbackIdstringrequiredThe registration id (cb-...)
    agentIdstringrequiredThe agent this callback belongs to
    urlstringrequiredThe https address Amistio POSTs to
    descriptionstringoptional
    eventsarray of stringrequiredWhich settle states are sentAllowed values: succeeded, failed, cancelled, awaiting-approval
    enabledbooleanrequiredFalse while paused: nothing new is sent
    secretVersionintegerexclusiveMinimum: 0requiredIncrements on every rotation; tells the receiver which secret signed a message
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    updatedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    disabledAtMillisintegerminimum: 0optionalPresent while paused
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/agents/<agentId>/callbacks
POST/agents/{agentId}/callbacks

Register a result callback

Register one public https address to receive a signed message whenever a run of this agent settles (succeeded, failed, cancelled, or awaiting-approval - or only the states you list). The address is checked against the egress guard now and again before every send. The response is the ONLY time the raw secret is returned. At most 10 callbacks per agent. Every callback POST carries X-Amistio-Event-Id, X-Amistio-Timestamp (Unix seconds), and X-Amistio-Signature: sha256=<hex HMAC-SHA256(secret, "<timestamp>.<rawBody>")>. Verify with the raw secret over the raw body in constant time, refuse timestamps more than 300 seconds from your clock, and deduplicate on the event id (retries resend the same id with a fresh timestamp and signature). The registration's secretVersion tells you which secret signed after a rotation.

Scopecallbacks:manageoperationIdcreateCallback

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired

Request body

Register one result callback for the agent

createCallback Request body
NameTypeRequiredDescription
urlstringminLength: 1, maxLength: 2048requiredPublic https address, no embedded credentials or fragment; private and internal addresses are refused
eventsarray of stringminItems: 1, maxItems: 4optionalSettle states to send; absent means all of themAllowed values: succeeded, failed, cancelled, awaiting-approval
descriptionstringmaxLength: 200optionalA short note for yourself

Responses

  • 201The callback with its secret, shown once

    createCallback 201
    NameTypeRequiredDescription
    callbackobjectrequiredOne result-callback registration; never carries the secret or its digest
    callbackIdstringrequiredThe registration id (cb-...)
    agentIdstringrequiredThe agent this callback belongs to
    urlstringrequiredThe https address Amistio POSTs to
    descriptionstringoptional
    eventsarray of stringrequiredWhich settle states are sentAllowed values: succeeded, failed, cancelled, awaiting-approval
    enabledbooleanrequiredFalse while paused: nothing new is sent
    secretVersionintegerexclusiveMinimum: 0requiredIncrements on every rotation; tells the receiver which secret signed a message
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    updatedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    disabledAtMillisintegerminimum: 0optionalPresent while paused
    secretstringrequiredThe raw signing secret (amcb_...). Shown exactly once here and on rotate; Amistio keeps only its digest
  • 400Malformed request, or an address that is not public https (private, loopback, link-local, and metadata ranges are refused)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 409The agent already has 10 callbacks

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -X POST -H "Authorization: Bearer $AMISTIO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://app.example.com/amistio/callback"}' \
  https://www.amistio.com/api/v1/agents/<agentId>/callbacks
GET/agents/{agentId}/callbacks/{callbackId}

One result callback

One callback registration on an agent you own, without its secret.

Scopecallbacks:manageoperationIdgetCallback

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired
callbackIdstringrequired

Request body

No request body.

Responses

  • 200The callback

    getCallback 200
    NameTypeRequiredDescription
    callbackobjectrequiredOne result-callback registration; never carries the secret or its digest
    callbackIdstringrequiredThe registration id (cb-...)
    agentIdstringrequiredThe agent this callback belongs to
    urlstringrequiredThe https address Amistio POSTs to
    descriptionstringoptional
    eventsarray of stringrequiredWhich settle states are sentAllowed values: succeeded, failed, cancelled, awaiting-approval
    enabledbooleanrequiredFalse while paused: nothing new is sent
    secretVersionintegerexclusiveMinimum: 0requiredIncrements on every rotation; tells the receiver which secret signed a message
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    updatedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    disabledAtMillisintegerminimum: 0optionalPresent while paused
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/agents/<agentId>/callbacks/<callbackId>
PATCH/agents/{agentId}/callbacks/{callbackId}

Pause or resume a result callback

Set enabled to false to pause: nothing new is sent and a message already queued for it is skipped. Set it to true to resume. The secret and the events do not change.

Scopecallbacks:manageoperationIdupdateCallback

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired
callbackIdstringrequired

Request body

Pause or resume one callback

updateCallback Request body
NameTypeRequiredDescription
enabledbooleanrequiredFalse pauses the callback; true resumes it

Responses

  • 200The updated callback

    updateCallback 200
    NameTypeRequiredDescription
    callbackobjectrequiredOne result-callback registration; never carries the secret or its digest
    callbackIdstringrequiredThe registration id (cb-...)
    agentIdstringrequiredThe agent this callback belongs to
    urlstringrequiredThe https address Amistio POSTs to
    descriptionstringoptional
    eventsarray of stringrequiredWhich settle states are sentAllowed values: succeeded, failed, cancelled, awaiting-approval
    enabledbooleanrequiredFalse while paused: nothing new is sent
    secretVersionintegerexclusiveMinimum: 0requiredIncrements on every rotation; tells the receiver which secret signed a message
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    updatedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    disabledAtMillisintegerminimum: 0optionalPresent while paused
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -X PATCH -H "Authorization: Bearer $AMISTIO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}' \
  https://www.amistio.com/api/v1/agents/<agentId>/callbacks/<callbackId>
DELETE/agents/{agentId}/callbacks/{callbackId}

Remove a result callback

Permanently remove the registration and its secret. Deliveries already recorded stay on their runs as evidence.

Scopecallbacks:manageoperationIddeleteCallback

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired
callbackIdstringrequired

Request body

No request body.

Responses

Request sample

curl -X DELETE -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/agents/<agentId>/callbacks/<callbackId>
POST/agents/{agentId}/callbacks/{callbackId}/rotate-secret

Rotate a callback's secret

Mint a fresh secret and raise secretVersion. Messages sent after this call are signed with the new secret only - there is no overlap window - so update the receiver right after. The response is the only time the new secret is returned. Every callback POST carries X-Amistio-Event-Id, X-Amistio-Timestamp (Unix seconds), and X-Amistio-Signature: sha256=<hex HMAC-SHA256(secret, "<timestamp>.<rawBody>")>. Verify with the raw secret over the raw body in constant time, refuse timestamps more than 300 seconds from your clock, and deduplicate on the event id (retries resend the same id with a fresh timestamp and signature). The registration's secretVersion tells you which secret signed after a rotation.

Scopecallbacks:manageoperationIdrotateCallbackSecret

Path parameters

Path parameters
NameTypeRequiredDescription
agentIdstringrequired
callbackIdstringrequired

Request body

No request body.

Responses

  • 200The callback with its new secret, shown once

    rotateCallbackSecret 200
    NameTypeRequiredDescription
    callbackobjectrequiredOne result-callback registration; never carries the secret or its digest
    callbackIdstringrequiredThe registration id (cb-...)
    agentIdstringrequiredThe agent this callback belongs to
    urlstringrequiredThe https address Amistio POSTs to
    descriptionstringoptional
    eventsarray of stringrequiredWhich settle states are sentAllowed values: succeeded, failed, cancelled, awaiting-approval
    enabledbooleanrequiredFalse while paused: nothing new is sent
    secretVersionintegerexclusiveMinimum: 0requiredIncrements on every rotation; tells the receiver which secret signed a message
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    updatedAtMillisintegerminimum: 0requiredUnix time in milliseconds
    disabledAtMillisintegerminimum: 0optionalPresent while paused
    secretstringrequiredThe raw signing secret (amcb_...). Shown exactly once here and on rotate; Amistio keeps only its digest
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -X POST -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/agents/<agentId>/callbacks/<callbackId>/rotate-secret

Deliveries

GET/runs/{runId}/deliveries

Callback deliveries for one run

Every callback delivery recorded for one run you own, oldest first: outcome (pending, delivered, failed, skipped), the closed reason, and each attempt's time, HTTP status or failure class, and bounded response excerpt. Never a secret, and never the registered address beyond its host.

Scoperuns:readoperationIdlistRunDeliveries

Path parameters

Path parameters
NameTypeRequiredDescription
runIdstringrequired

Request body

No request body.

Responses

  • 200The run's deliveries

    listRunDeliveries 200
    NameTypeRequiredDescription
    deliveriesarray of objectrequired
    deliveryIdstringrequired
    callbackIdstringrequiredThe registration this delivery was for
    targetHoststringoptionalHost of the registered address (never its path or query); absent when the callback was removed
    runIdstringrequired
    agentIdstringrequired
    versionIdstringoptional
    eventstringrequiredrun.<state>, the same value as the body's type
    eventIdstringrequiredStable across retries; the receiver deduplicates on it
    settledAtMillisintegerminimum: 0requiredUnix time in milliseconds
    createdAtMillisintegerminimum: 0requiredUnix time in milliseconds
    outcomestringrequiredAllowed values: pending, delivered, failed, skipped
    reasonstringoptionalClosed reason for a failed or skipped outcomeAllowed values: queue-unavailable, enqueue-failed, registration-missing, registration-disabled, run-missing, secret-unavailable, egress-denied, rejected, attempts-exhausted
    attemptsarray of objectrequired
    attemptintegerexclusiveMinimum: 0required
    atMillisintegerminimum: 0requiredUnix time in milliseconds
    statusintegerminimum: -9007199254740991optionalHTTP status the receiver answered, when it answered
    errorClassstringoptionalClosed failure class; never raw error textAllowed values: timeout, network, egress-denied, rejected, server-error, rate-limited
    responseExcerptstringoptionalAt most 256 printable, secret-free characters of the response
    nextAttemptAtMillisintegerminimum: 0optionalUnix time in milliseconds
    finishedAtMillisintegerminimum: 0optionalUnix time in milliseconds
  • 400Malformed request (also: an API key placed in the query string)

    The shared error body - see Errors.

  • 401No credential, or an invalid, expired, or revoked API key

    The shared error body - see Errors.

  • 403The key lacks the required scope

    The shared error body - see Errors.

  • 404Unknown or foreign id - always the same body

    The shared error body - see Errors.

  • 429Protection bound reached; wait Retry-After seconds

    The shared error body - see Errors.

Request sample

curl -H "Authorization: Bearer $AMISTIO_KEY" \
  https://www.amistio.com/api/v1/runs/<runId>/deliveries

Changelog

  1. v1.0.0

    First public release, with 14 operations.

Not offered

Amistio does not offer an SDK, a CLI, an extension marketplace, or self-hosting today. Use the API directly with any HTTP client - every sample above is plain HTTP in its language.

Essential cookies keep Amistio working. Nothing is tracked until you allow analytics.