On this page

Owner identity status (no secrets)

GET/identity

Operation getOwnerIdentityAuthBearer token

The owner identity (a DID derived from a 12-word BIP-39 phrase) is what new agents are sealed and attested under, the same identity ADF Studio uses. Stored in the OS keychain (shared with Studio), or where there is none in a passphrase-encrypted owner-secrets.json next to the daemon settings. status: none (create or restore), locked (unlock), restore-needed (this machine has an owner DID, e.g. from Studio, but the daemon lacks its phrase: restore), ready. passphraseRequired: true means file storage. Whenever the identity becomes ready the daemon re-unlocks every loaded agent that is degraded (credentials locked), without a reload.

Responses

StatusDescriptionBody
200StatusIdentityStatus
statusrequiredstring

One of none, locked, restore-needed, ready

ownerDidrequiredstring | null
runtimeDidrequiredstring | null

The runtime DID the daemon signs and stamps with: ADF Studio's when runtime.state is adopted, else the daemon's own

trustobject

K12: whether the owner trusts this daemon's key (trustedDaemonEncKeys). not-applicable: the daemon reads the OS keychain and shares ADF Studio's runtime identity instead.

3 fields of trust · DaemonTrustStatus
staterequiredstring

One of trusted, not-trusted, not-applicable

labelrequiredstring | null

Slot label daemon:<fingerprint> of the daemon key; null without a key file.

messagerequiredstring
runtimeobject

Whose runtime identity the daemon uses. adopted: ADF Studio's, from a verified OS keychain entry for this settings file. absent: no such entry. rejected: an entry exists but failed verification (reason). unavailable: no usable OS keychain. In every state but adopted the daemon runs as its own runtime, and Studio-made agents' credentials unlock through the trusted-daemon key daemonEncPublicKey.

6 fields of runtime · DaemonRuntimeAdoption
staterequiredstring

One of adopted, absent, rejected, unavailable

sourcerequiredstring

One of studio, daemon

reasonrequiredstring | null

One of malformed, unsupported_version, no_owner, owner_mismatch, bad_signing_key, subject_mismatch, bad_delegation, runtime_did_mismatch, enc_key_mismatch, scope_mismatch, null

daemonRuntimeDidrequiredstring | null

The daemon's own runtime DID

daemonEncPublicKeyrequiredstring | null

Base64 raw X25519 public key of the daemon's runtime-enc-key (what Studio lists in trustedDaemonEncKeys)

messagerequiredstring

One sentence for the UI

storagerequiredstring

One of keychain, file

backupConfirmedrequiredboolean
passphraseRequiredrequiredboolean

File storage not unlocked: create/restore/unlock take a passphrase

keychainProblemstring | null

The daemon could not read this machine's OS keychain at start and runs on its passphrase file: why and what to do; null otherwise. Create, restore, import and trust-daemon answer 409 keychain_unavailable meanwhile (set ADF_SECRET_STORE=file to use the file on purpose).

messagerequiredstring

What to do next

Errors 401 · 403 · 500 · 503
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl "http://127.0.0.1:7385/identity" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"
Response 200
{
  "status": "ready",
  "ownerDid": "did:key:z6MkOwner…",
  "runtimeDid": "did:key:z6MkRuntime…",
  "runtime": {
    "state": "adopted",
    "source": "studio",
    "reason": null,
    "daemonRuntimeDid": null,
    "daemonEncPublicKey": "q9Jw…=",
    "message": "Using ADF Studio's runtime identity did:key:z6MkRuntime… from the OS keychain, so agents open and unlock as they do in Studio."
  },
  "storage": "keychain",
  "backupConfirmed": true,
  "passphraseRequired": false,
  "message": "Owner identity is ready."
}

Create the owner identity; returns the seed phrase ONCE (loopback only)

POST/identity/create

Operation createOwnerIdentityAuthBearer tokenLoopback only

Only when status is none. passphrase (8+ characters) is required with file storage. Show the words to the user once, then call POST /identity/confirm-backup. Local callers only (see Local-only routes).

Header parameters

NameTypeDescription
X-ADF-Local-Proofstring

Required only when the daemon runs with ADF_DAEMON_BEHIND_PROXY: the contents of <settings dir>/daemon-local-proof (daemon-local-proof-<port> off the default port) on the daemon host (the adf CLI and terminal app send it automatically to their own daemon).

Request bodyapplication/json · IdentityPassphraseBody · optional

FieldTypeDescription
passphrasestring

Required with file storage (no OS keychain)

length: ≥ 8

Responses

StatusDescriptionBody
201Created. Show the phrase once; it is never returned again.IdentityCreateResponse
mnemonicrequiredstring
wordsrequiredarray<string>

items: 12–12

identityrequiredobject

Fields as in IdentityStatus above.

Errors 400 · 401 · 403 · 409 · 500 · 503
400No keychain and no/weak passphrase (passphrase_required, weak_passphrase)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
409An identity already exists (identity_exists, owner_mismatch)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/create" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Restore the owner identity from its seed phrase (loopback only)

POST/identity/restore

Operation restoreOwnerIdentityAuthBearer tokenLoopback only

A phrase of a different owner than the one this machine already has answers 409 owner_mismatch (switch owners in Studio instead); a wrong passphrase for an existing file 403 wrong_passphrase. Local callers only (see Local-only routes).

Header parameters

NameTypeDescription
X-ADF-Local-Proofstring

Required only when the daemon runs with ADF_DAEMON_BEHIND_PROXY: the contents of <settings dir>/daemon-local-proof (daemon-local-proof-<port> off the default port) on the daemon host (the adf CLI and terminal app send it automatically to their own daemon).

Request bodyapplication/json · IdentityRestoreBody · required

FieldTypeDescription
mnemonicrequiredstring

12-word BIP-39 phrase (case/whitespace-insensitive)

passphrasestring

Responses

StatusDescriptionBody
200RestoredIdentityStatusEnvelope
identityrequiredobject

Fields as in IdentityStatus above.

Errors 400 · 401 · 403 · 409 · 500 · 503
400Invalid phrase or passphrase (invalid_mnemonic, passphrase_required, weak_passphrase)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
409A different owner is already set up here (owner_mismatch, identity_exists)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/restore" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mnemonic":"string"}'

Trust this daemon's key (owner action, no OS keychain)

POST/identity/trust-daemon

Operation trustDaemonKeyAuthBearer tokenLoopback only

K12. Adds the daemon's key (runtime-enc-key) to trustedDaemonEncKeys, so ADF Studio wraps every agent's credentials to it and they unlock here without the owner passphrase; loaded agents get their slot at once. An explicit owner action, never automatic: the body must say confirm: true. Refused when the daemon reads the OS keychain (keychain_available) and without the owner key (not_ready). The grant is a settings entry, not a signed statement. Local callers only, always with the local proof (see Local-only routes).

Request bodyapplication/json · object · required

FieldTypeDescription
confirmrequiredboolean

One of true

Responses

StatusDescriptionBody
200The trust state after the call, and how many loaded agents got or lost their slotobject
trustrequiredobject

K12: whether the owner trusts this daemon's key (trustedDaemonEncKeys). not-applicable: the daemon reads the OS keychain and shares ADF Studio's runtime identity instead.

3 fields of trust
staterequiredstring

One of trusted, not-trusted, not-applicable

labelrequiredstring | null

Slot label daemon:<fingerprint> of the daemon key; null without a key file.

messagerequiredstring
agentsUpdatedrequiredinteger
Errors 400 · 401 · 403 · 409 · 503
400No confirm: true (confirm_required); the error says what trusting meansIdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
409The daemon reads the OS keychain (keychain_available) or the owner key is not available (not_ready)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

503No owner identity service on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/trust-daemon" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm":true}'

Revoke the owner's trust in this daemon's key

POST/identity/untrust-daemon

Operation untrustDaemonKeyAuthBearer tokenLoopback only

K12. Removes the daemon's key from trustedDaemonEncKeys and rotates it: a new key replaces the key file, the old one is no longer used, and its label is recorded as revoked. Loaded agents lose the slot at once, agents in the tracked folders in a background sweep (sweep: started; it skips files another runtime runs and documents this daemon holds open, which are cleaned when next opened), any other agent when this daemon or ADF Studio next opens it. A copy outside the tracked folders keeps the old slot until it is opened; anyone holding a copy of the old key file can open that slot until then. Slots of the daemon's own runtime wrapped to the old key open again after the next owner-key unlock. The daemon never adds a key back by itself. Local callers only, always with the local proof.

Responses

StatusDescriptionBody
200The trust state after the call, and how many loaded agents got or lost their slotobject
trustrequiredobject

K12: whether the owner trusts this daemon's key (trustedDaemonEncKeys). not-applicable: the daemon reads the OS keychain and shares ADF Studio's runtime identity instead.

3 fields of trust
staterequiredstring

One of trusted, not-trusted, not-applicable

labelrequiredstring | null

Slot label daemon:<fingerprint> of the daemon key; null without a key file.

messagerequiredstring
agentsUpdatedrequiredinteger
Errors 401 · 403 · 503
401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
503No owner identity service on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/untrust-daemon" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Unlock a passphrase-file identity (loopback only)

POST/identity/unlock

Operation unlockOwnerIdentityAuthBearer tokenLoopback only

Only for file storage (no OS keychain). A wrong passphrase answers 403 wrong_passphrase. The daemon can also unlock at boot from ADF_OWNER_PASSPHRASE or ADF_OWNER_PASSPHRASE_FILE. Local callers only (see Local-only routes).

Header parameters

NameTypeDescription
X-ADF-Local-Proofstring

Required only when the daemon runs with ADF_DAEMON_BEHIND_PROXY: the contents of <settings dir>/daemon-local-proof (daemon-local-proof-<port> off the default port) on the daemon host (the adf CLI and terminal app send it automatically to their own daemon).

Request bodyapplication/json · IdentityPassphraseBody · required

FieldTypeDescription
passphrasestring

Required with file storage (no OS keychain)

length: ≥ 8

Responses

StatusDescriptionBody
200UnlockedIdentityStatusEnvelope

Fields as in IdentityStatusEnvelope above.

Errors 400 · 401 · 403 · 409 · 500 · 503
400Keychain storage (not_file_storage) or no passphrase (passphrase_required)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
409No identity file yet (nothing_to_unlock)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/unlock" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Lock a passphrase-file identity (loopback only)

POST/identity/lock

Operation lockOwnerIdentityAuthBearer tokenLoopback only

No body. Local callers only (see Local-only routes).

Header parameters

NameTypeDescription
X-ADF-Local-Proofstring

Required only when the daemon runs with ADF_DAEMON_BEHIND_PROXY: the contents of <settings dir>/daemon-local-proof (daemon-local-proof-<port> off the default port) on the daemon host (the adf CLI and terminal app send it automatically to their own daemon).

Responses

StatusDescriptionBody
200LockedIdentityStatusEnvelope

Fields as in IdentityStatusEnvelope above.

Errors 400 · 401 · 403 · 500 · 503
400Keychain storage cannot be locked by the daemon (not_file_storage)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/lock" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Record that the seed phrase was written down (loopback only)

POST/identity/confirm-backup

Operation confirmOwnerBackupAuthBearer tokenLoopback only

No body. Local callers only (see Local-only routes).

Header parameters

NameTypeDescription
X-ADF-Local-Proofstring

Required only when the daemon runs with ADF_DAEMON_BEHIND_PROXY: the contents of <settings dir>/daemon-local-proof (daemon-local-proof-<port> off the default port) on the daemon host (the adf CLI and terminal app send it automatically to their own daemon).

Responses

StatusDescriptionBody
200ConfirmedIdentityStatusEnvelope

Fields as in IdentityStatusEnvelope above.

Errors 401 · 403 · 409 · 500 · 503
401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
409No usable identity (not_ready)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/confirm-backup" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Import an owner seed phrase, switching owners when confirmed (loopback only)

POST/identity/import

Operation importOwnerIdentityAuthBearer tokenLoopback only

Studio's Import identity. The phrase of this machine's owner acts as a restore. The phrase of another owner answers 409 switch_unconfirmed, naming both DIDs, unless switchOwner is true; then that owner replaces this machine's owner and the agents of the previous owner in tracked directories are restamped, except files another runtime runs (restamp.skipped; restamped when next opened). Loaded agents are unloaded before the restamp and loaded again after it; the response lists both. A Studio runtime identity the daemon had adopted is re-certified by the new owner on a switch, and the daemon rewrites its OS keychain entry (same keys, new delegation), so identity.runtime.state stays adopted and agents made in Studio keep unlocking without Studio running. Unlike the other local-only routes, this one always requires X-ADF-Local-Proof (the daemon writes the proof file on every run), not only in proxy mode. Every refusal (phrase, confirmations, file-storage passphrase) happens before an agent is unloaded; imports run one at a time. On a switch the daemon also moves ADF Studio's stored copy of the previous phrase, still encrypted, from ownerMnemonic to ownerMnemonicSuperseded:<previous owner DID> in the settings file, so Studio takes the new phrase from the OS keychain at its next start. The phrase never appears in a response, log or error. Local callers only (see Local-only routes).

Header parameters

NameTypeDescription
X-ADF-Local-Proofstring

Required only when the daemon runs with ADF_DAEMON_BEHIND_PROXY: the contents of <settings dir>/daemon-local-proof (daemon-local-proof-<port> off the default port) on the daemon host (the adf CLI and terminal app send it automatically to their own daemon).

Request bodyapplication/json · IdentityImportBody · required

FieldTypeDescription
mnemonicrequiredstring

12-word BIP-39 phrase (case/whitespace-insensitive)

passphrasestring

File storage only, when it is not unlocked

switchOwnerboolean

Required (true) when the phrase belongs to another owner than this machine's

previousOwnerBackupConfirmedboolean

The caller holds the previous owner's phrase although its backup was never confirmed (ownerSeedBackupConfirmed). Without either, a switch answers 409 backup_unconfirmed.

Responses

StatusDescriptionBody
200ImportedIdentityImportResponse
identityrequiredobject

Fields as in IdentityStatus above.

ownerDidrequiredstring
previousOwnerDidrequiredstring | null
switchedrequiredboolean

The owner changed

restamprequiredobject
4 fields of restamp
restampedrequiredinteger
attestedrequiredinteger
failuresrequiredarray<string>
skippedarray<string>

Tracked files another runtime runs (agent lease): not restamped now; restamped when next opened. Absent when there are none.

reloadedrequiredarray<object>
3 fields of reloaded
agentIdrequiredstring
namerequiredstring
filePathrequiredstring
reloadFailuresrequiredarray<object>
3 fields of reloadFailures
namerequiredstring
filePathrequiredstring
errorrequiredstring
Errors 400 · 401 · 403 · 409 · 500 · 503
400Invalid phrase, passphrase or field type (invalid_mnemonic, passphrase_required, weak_passphrase, bad_request)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

401Missing or wrong bearer token (unauthorized)
403Not a local caller (loopback_only): the request came from another machine, through a proxy (forwarded headers), or: with ADF_DAEMON_BEHIND_PROXY, without this machine's X-ADF-Local-Proof. Owner secrets and shutdown are handled on the daemon host only. Or the request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)loopback_onlyhost_not_allowedcross_origin
409The phrase belongs to another owner and switchOwner is not true (switch_unconfirmed), or the previous owner's backup is unconfirmed and previousOwnerBackupConfirmed is not true (backup_unconfirmed; the switch overwrites the daemon's copy of that phrase), or ADF Studio runs agents in embedded mode on the same settings file (studio_running, naming its pid and the file: quit it or import in Studio; checked first, from the runtime host registry)IdentityErrorResponse
errorrequiredstring
coderequiredstring

One of invalid_mnemonic, owner_mismatch, identity_exists, passphrase_required, weak_passphrase, wrong_passphrase, not_file_storage, nothing_to_unlock, not_ready, loopback_only, switch_unconfirmed, bad_request, backup_unconfirmed, studio_running, keychain_available, keychain_unavailable

500Unexpected runtime failure
503The subsystem is not configured on this daemon

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/import" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mnemonic":"string"}'

Mint an identity draft

POST/identity/drafts

Operation mintIdentityDraftAuthBearer token

A keypair held in daemon memory (30 min, at most 16) so a create screen can show the next agent’s DID; creating with its draftId adopts it.

Responses

StatusDescriptionBody
200OKIdentityDraft
draftIdrequiredstring
didrequiredstring
Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl -X POST "http://127.0.0.1:7385/identity/drafts" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"

Discard an identity draft

DELETE/identity/drafts/{draftId}

Operation discardIdentityDraftAuthBearer token

Path parameters

NameTypeDescription
draftIdrequiredstring

Draft id

Responses

StatusDescriptionBody
200OKIdentityDraftDiscardResponse
discardedrequiredboolean
Errors 401 · 403
401Missing or wrong bearer token (unauthorized)
403The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin

Error bodies use the error format.

Example

Request
curl -X DELETE "http://127.0.0.1:7385/identity/drafts/DRAFT_ID" \
  -H "Authorization: Bearer $ADF_DAEMON_TOKEN"