OneOS Docs
Genesis 0.3.3 Console

API reference

IAM

Organization API keys and credential verification for your One account organization.

Operations
64
Base path
https://os.one.ml/api/v1/iam
Scopes
iam:read iam:write
API keys
2 failed with an API key · 5 need a signed-in session · 5 refused to API keys · 1 untested · 2 untested · 45 tested with an API key
SDK
genesis.call('iam_revokeAgentCredential', …) · helpers under genesis.iam
CLI
genesis keys
MCP
52 tools; the other 12 through genesis_call

Operations

OperationEndpointAPI key
Revoke an agent credentialPOST/agents/credentials/{credential_id}/revoke—
Enroll an agentPOST/agents/enrollAPI keys refused
Revoke API keyDELETE/api-keys/{key_id}Signed-in session
Issue a capabilityPOST/capabilitiesFailed with an API key
Get a capabilityGET/capabilities/{capability_id}API keys refused
Revoke a capabilityDELETE/capabilities/{capability_id}—
Update a capabilityPATCH/capabilities/{capability_id}—
Verify a capabilityPOST/capabilities/verifyTested with an API key
Check an entitlementPOST/check-entitlementTested with an API key
Check a permissionPOST/check-permissionTested with an API key
Verify credentialPOST/credentials/verifyTested with an API key
List grantsGET/grantsTested with an API key
Create a grantPOST/grantsTested with an API key
Get a grantGET/grants/{grant_id}Tested with an API key
Delete a grantDELETE/grants/{grant_id}Tested with an API key
Update a grantPATCH/grants/{grant_id}Tested with an API key
List organization API keysGET/organizations/{org_id}/api-keysSigned-in session
Create organization API keyPOST/organizations/{org_id}/api-keysSigned-in session
List organizationsGET/orgsSigned-in session
Get an organizationGET/orgs/{org_id}Tested with an API key
Update an organizationPATCH/orgs/{org_id}Tested with an API key
List agent enrollment grantsGET/orgs/{org_id}/agent-enrollment-grantsSigned-in session
Create an agent enrollment grantPOST/orgs/{org_id}/agent-enrollment-grants—
Revoke an agent enrollment grantPOST/orgs/{org_id}/agent-enrollment-grants/{grant_id}/revoke—
List agentsGET/orgs/{org_id}/agentsTested with an API key
Register an agentPOST/orgs/{org_id}/agentsTested with an API key
Get an agentGET/orgs/{org_id}/agents/{agent_did}Tested with an API key
Revoke an agentDELETE/orgs/{org_id}/agents/{agent_did}Tested with an API key
List agent ACTsGET/orgs/{org_id}/agents/{agent_did}/actsTested with an API key
Issue an agent ACTPOST/orgs/{org_id}/agents/{agent_did}/actsTested with an API key
Resume an agentPOST/orgs/{org_id}/agents/{agent_did}/resumeTested with an API key
Rotate an agent keyPOST/orgs/{org_id}/agents/{agent_did}/rotateTested with an API key
Suspend an agentPOST/orgs/{org_id}/agents/{agent_did}/suspendTested with an API key
Get an agent's Orbit Msgs product grantGET/orgs/{org_id}/agents/by-id/{agent_id}/product-grants/orbit-msgsAPI keys refused
Get an agent's publication stateGET/orgs/{org_id}/agents/by-id/{agent_id}/publicationAPI keys refused
List entitlementsGET/orgs/{org_id}/entitlementsTested with an API key
List fleetsGET/orgs/{org_id}/fleetsTested with an API key
Create a fleetPOST/orgs/{org_id}/fleetsTested with an API key
Get a fleetGET/orgs/{org_id}/fleets/{fleet_id}Tested with an API key
Delete a fleetDELETE/orgs/{org_id}/fleets/{fleet_id}Tested with an API key
Update a fleetPATCH/orgs/{org_id}/fleets/{fleet_id}Tested with an API key
List membersGET/orgs/{org_id}/membersAPI keys refused
List a Mind's enrolled agentsGET/orgs/{org_id}/minds/{mind_id}/agentsTested with an API key
List projectsGET/orgs/{org_id}/projectsTested with an API key
Create a projectPOST/orgs/{org_id}/projectsTested with an API key
Get a projectGET/orgs/{org_id}/projects/{project_id}Tested with an API key
Delete a projectDELETE/orgs/{org_id}/projects/{project_id}Tested with an API key
Update a projectPATCH/orgs/{org_id}/projects/{project_id}Tested with an API key
List rolesGET/orgs/{org_id}/rolesTested with an API key
Create a rolePOST/orgs/{org_id}/rolesTested with an API key
Get a roleGET/orgs/{org_id}/roles/{role_id}Tested with an API key
Delete a roleDELETE/orgs/{org_id}/roles/{role_id}Tested with an API key
Update a rolePATCH/orgs/{org_id}/roles/{role_id}Tested with an API key
List workspacesGET/orgs/{org_id}/workspacesTested with an API key
Create a workspacePOST/orgs/{org_id}/workspacesTested with an API key
Get a workspaceGET/orgs/{org_id}/workspaces/{workspace_id}Tested with an API key
Delete a workspaceDELETE/orgs/{org_id}/workspaces/{workspace_id}Tested with an API key
Update a workspacePATCH/orgs/{org_id}/workspaces/{workspace_id}Tested with an API key
List platformsGET/platformsTested with an API key
Get a public agent cardGET/public/agents/{agent_id}Failed with an API key
Require a permissionPOST/require-permissionTested with an API key
Request scoped Runner self-execution permissionPOST/runner/self-execution-grant—
Get the tenant contextGET/tenant-contextTested with an API key
Select your tenant contextPOST/tenant-context—

Agents

Revoke an agent credential

POST/v1/iam/agents/credentials/{credential_id}/revoke

iam:writeiam_revokeAgentCredential

Revokes one enrolled agent's credential (acr_...). The application that enrolled the agent, or an owner or manager of its organization, may revoke it (an API key only in sandbox).

Parameters

  • credential_idpath · stringrequired

Responses

  • 200The revoked credential (no secret)
    Response fields
    • idstringrequired
    • organizationIdstringrequired
    • agentIdstring
    • revokedAtinteger | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/agents/credentials/$CREDENTIAL_ID/revoke" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Enroll an agent

POST/v1/iam/agents/enroll

iam:writeAPI keys refusedNo key needediam_enrollAgent

Enrolls (or re-enrolls) an agent for a Mind under an agent enrollment grant and returns its credential once. Send only the grant's enrollment key as Authorization: Bearer mek_...; the gateway forwards it to IAM and nothing else (no Genesis credential, never an organization API key).

Request body application/json

  • grantIdstring

    Optional with an enrollment key (checked)

  • externalKeystringrequired

    Your stable id for this agent

  • displayNamestringrequired
  • mindIdstringrequired
  • permissionsstring[]required
  • sharedNamespacesstring[]
  • ttlSecondsinteger
  • publicKeystring

    The agent's own Ed25519 public key (multibase), bound at first enrollment

  • agentCredentialstring

    Re-enrollment proof: a valid credential of this agent

  • reenrollmentProofobject
  • reenrollmentProof.issuedAtintegerrequired

    Milliseconds since the epoch

  • reenrollmentProof.signaturestringrequired

Responses

  • 200The enrolled agent and its credential
    Response fields
    • agentobjectrequired
    • agent.idstringrequired
    • agent.didstringrequired
    • agent.displayNamestring
    • agent.statusstring
    • agent.organizationIdstringrequired
    • agent.projectIdstring
    • createdbooleanrequired
    • credentialobjectrequired
    • credential.idstringrequired
    • credential.secretstringrequired

      Returned once

    • credential.mindIdstring
    • credential.scopesstring[]
    • credential.sharedNamespacesstring[]
    • credential.expiresAtinteger

      Milliseconds since the epoch

  • 400Bad request
  • 401ENROLLMENT_KEY_REQUIRED, or IAM refused the enrollment key
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/agents/enroll" \
  -H "Content-Type: application/json" \
  -d '{
    "externalKey": "string",
    "displayName": "string",
    "mindId": "string",
    "permissions": []
  }'

List agents

GET/v1/iam/orgs/{org_id}/agents

iam:readTested with an API keyiam_listAgents

The organization's agent registry (OpenAgentID DIDs). Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Responses

  • 200Agents
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      a_<ulid>

    • items[].[].organizationIdstringrequired
    • items[].[].didstringrequired

      did:oas:<kind>:<ulid>

    • items[].[].displayNamestringrequired
    • items[].[].kindstringrequired
    • items[].[].status"active" | "suspended" | "revoked"required
    • items[].[].parentDidstring | null
    • items[].[].publicKeystring | null
    • items[].[].scopesstring[]required
    • items[].[].metadataobject | null
    • items[].[].createdAtintegerrequired

      Milliseconds since the epoch

    • items[].[].updatedAtintegerrequired

      Milliseconds since the epoch

    • next_cursorstring | null
    • agentsobject[]
    • agents[].[].idstringrequired

      a_<ulid>

    • agents[].[].organizationIdstringrequired
    • agents[].[].didstringrequired

      did:oas:<kind>:<ulid>

    • agents[].[].displayNamestringrequired
    • agents[].[].kindstringrequired
    • agents[].[].status"active" | "suspended" | "revoked"required
    • agents[].[].parentDidstring | null
    • agents[].[].publicKeystring | null
    • agents[].[].scopesstring[]required
    • agents[].[].metadataobject | null
    • agents[].[].createdAtintegerrequired

      Milliseconds since the epoch

    • agents[].[].updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Register an agent

POST/v1/iam/orgs/{org_id}/agents

iam:writeTested with an API keyiam_createAgent

Registers an agent DID in the organization. Without publicKey IAM generates a key pair and returns the private key once. Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Request body application/json

  • displayNamestringrequired

    min length 1 · max length 64

  • kindstringrequired

    OAS entity kind, e.g. agent

  • scopesstring[]
  • parentDidstring
  • publicKeystring

    Multibase public key; omit to have IAM generate a pair

  • metadataobject

Responses

  • 200The registered agent (privateKey only when IAM generated the key)
    Response fields
    • agentobjectrequired
    • agent.idstringrequired

      a_<ulid>

    • agent.organizationIdstringrequired
    • agent.didstringrequired

      did:oas:<kind>:<ulid>

    • agent.displayNamestringrequired
    • agent.kindstringrequired
    • agent.status"active" | "suspended" | "revoked"required
    • agent.parentDidstring | null
    • agent.publicKeystring | null
    • agent.scopesstring[]required
    • agent.metadataobject | null
    • agent.createdAtintegerrequired

      Milliseconds since the epoch

    • agent.updatedAtintegerrequired

      Milliseconds since the epoch

    • didstringrequired
    • publicKeystring | null
    • privateKeystring | null

      Returned once, only when IAM generated the key

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "string",
    "kind": "string"
  }'

Get an agent

GET/v1/iam/orgs/{org_id}/agents/{agent_did}

iam:readTested with an API keyiam_getAgent

Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_didpath · stringrequired

    The agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the id every agent list returns); both name the same agent.

Responses

  • 200The agent
    Response fields
    • agentobjectrequired
    • agent.idstringrequired

      a_<ulid>

    • agent.organizationIdstringrequired
    • agent.didstringrequired

      did:oas:<kind>:<ulid>

    • agent.displayNamestringrequired
    • agent.kindstringrequired
    • agent.status"active" | "suspended" | "revoked"required
    • agent.parentDidstring | null
    • agent.publicKeystring | null
    • agent.scopesstring[]required
    • agent.metadataobject | null
    • agent.createdAtintegerrequired

      Milliseconds since the epoch

    • agent.updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/$AGENT_DID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Revoke an agent

DELETE/v1/iam/orgs/{org_id}/agents/{agent_did}

iam:writeTested with an API keyiam_deleteAgent

Sets the agent's status to revoked (the record stays, returned with 200). Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_didpath · stringrequired

    The agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the id every agent list returns); both name the same agent.

Responses

  • 200The revoked agent
    Response fields
    • agentobjectrequired
    • agent.idstringrequired

      a_<ulid>

    • agent.organizationIdstringrequired
    • agent.didstringrequired

      did:oas:<kind>:<ulid>

    • agent.displayNamestringrequired
    • agent.kindstringrequired
    • agent.status"active" | "suspended" | "revoked"required
    • agent.parentDidstring | null
    • agent.publicKeystring | null
    • agent.scopesstring[]required
    • agent.metadataobject | null
    • agent.createdAtintegerrequired

      Milliseconds since the epoch

    • agent.updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/$AGENT_DID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

List agent ACTs

GET/v1/iam/orgs/{org_id}/agents/{agent_did}/acts

iam:readTested with an API keyiam_listAgentActs

Issued ACTs are not stored, so the list is empty. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_didpath · stringrequired

    The agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the id every agent list returns); both name the same agent.

Responses

  • 200ACTs
    Response fields
    • actsobject[]required
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/$AGENT_DID/acts" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Issue an agent ACT

POST/v1/iam/orgs/{org_id}/agents/{agent_did}/acts

iam:writeTested with an API keyiam_issueAgentAct

A bounded agent capability token for an active agent (ttlSeconds 60 s to 30 days). Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_didpath · stringrequired

    The agent DID (did:oas:<kind>:<ulid>). This operation answers with the DID only, so it takes only the DID, not the a_ id.

Request body application/json

  • scopesstring[]required
  • ttlSecondsintegerrequired

    min 60 · max 2592000

Responses

  • 200The ACT, returned once
    Response fields
    • idstringrequired

      act_<ulid>

    • actstringrequired

      Returned once

    • scopesstring[]required
    • issuedAtstringrequired
    • expiresAtstringrequired
    • subjectDidstringrequired
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/$AGENT_DID/acts" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scopes": [],
    "ttlSeconds": 60
  }'

Resume an agent

POST/v1/iam/orgs/{org_id}/agents/{agent_did}/resume

iam:writeTested with an API keyiam_resumeAgent

Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_didpath · stringrequired

    The agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the id every agent list returns); both name the same agent.

Responses

  • 200The active agent
    Response fields
    • agentobjectrequired
    • agent.idstringrequired

      a_<ulid>

    • agent.organizationIdstringrequired
    • agent.didstringrequired

      did:oas:<kind>:<ulid>

    • agent.displayNamestringrequired
    • agent.kindstringrequired
    • agent.status"active" | "suspended" | "revoked"required
    • agent.parentDidstring | null
    • agent.publicKeystring | null
    • agent.scopesstring[]required
    • agent.metadataobject | null
    • agent.createdAtintegerrequired

      Milliseconds since the epoch

    • agent.updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/$AGENT_DID/resume" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Rotate an agent key

POST/v1/iam/orgs/{org_id}/agents/{agent_did}/rotate

iam:writeTested with an API keyiam_rotateAgentKey

Replaces the agent's public key; without publicKey IAM generates a pair and returns the private key once. Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_didpath · stringrequired

    The agent DID (did:oas:<kind>:<ulid>). This operation answers with the DID only, so it takes only the DID, not the a_ id.

Request body application/json

  • publicKeystring

    Omit to have IAM generate a pair

Responses

  • 200The new key
    Response fields
    • didstringrequired
    • publicKeystring | null
    • privateKeystring | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/$AGENT_DID/rotate" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Suspend an agent

POST/v1/iam/orgs/{org_id}/agents/{agent_did}/suspend

iam:writeTested with an API keyiam_suspendAgent

Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_didpath · stringrequired

    The agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the id every agent list returns); both name the same agent.

Responses

  • 200The suspended agent
    Response fields
    • agentobjectrequired
    • agent.idstringrequired

      a_<ulid>

    • agent.organizationIdstringrequired
    • agent.didstringrequired

      did:oas:<kind>:<ulid>

    • agent.displayNamestringrequired
    • agent.kindstringrequired
    • agent.status"active" | "suspended" | "revoked"required
    • agent.parentDidstring | null
    • agent.publicKeystring | null
    • agent.scopesstring[]required
    • agent.metadataobject | null
    • agent.createdAtintegerrequired

      Milliseconds since the epoch

    • agent.updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/$AGENT_DID/suspend" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Get an agent's Orbit Msgs product grant

GET/v1/iam/orgs/{org_id}/agents/by-id/{agent_id}/product-grants/orbit-msgs

iam:readAPI keys refusediam_getOrbitMsgsProductGrant

The owner view of the agent's Orbit Msgs grant (enabling and revoking stay in the Console). IAM decides who may read it. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_idpath · stringrequired

    The agent principal id (a_<ulid>)

Responses

  • 200The grant state
    Response fields
    • schemaVersioninteger
    • requestIdstring
    • agentIdstringrequired
    • organizationIdstringrequired
    • profilestring
    • ownerGenerationinteger
    • grantobject | null
    • grant.grantIdstring
    • grant.grantVersioninteger
    • grant.actionsstring[]
    • grant.expiresAtMsinteger

      Milliseconds since the epoch

    • grant.status"active" | "expired" | "revoked"
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/by-id/$AGENT_ID/product-grants/orbit-msgs" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Get an agent's publication state

GET/v1/iam/orgs/{org_id}/agents/by-id/{agent_id}/publication

iam:readAPI keys refusediam_getAgentPublication

private, published or withdrawn, with its version (publishing and withdrawing stay in the Console). IAM decides who may read it. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • agent_idpath · stringrequired

    The agent principal id (a_<ulid>)

Responses

  • 200The publication state
    Response fields
    • agentIdstringrequired
    • state"private" | "published" | "withdrawn"required
    • versionintegerrequired
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agents/by-id/$AGENT_ID/publication" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Api keys

Revoke API key

DELETE/v1/iam/api-keys/{key_id}

iam:writeSigned-in sessioniam_revokeApiKey

Revocation is honored within 60 seconds due to caching.

Parameters

  • key_idpath · stringrequired

Responses

  • 204API key revoked
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/api-keys/$KEY_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

List organization API keys

GET/v1/iam/organizations/{org_id}/api-keys

iam:readSigned-in sessioniam_listOrgApiKeys

Parameters

  • org_idpath · stringrequired

Responses

  • 200List of API keys
    Response fields
    • object"list"required
    • dataobject[]required
    • data[].[].idstringrequired
    • data[].[].namestringrequired
    • data[].[].obfuscated_valuestringrequired
    • data[].[].scopesstring[]required
    • data[].[].last_used_atstring | null (date-time)
    • data[].[].expires_atstring | null (date-time)
    • data[].[].created_atstring (date-time)required
    • data[].[].updated_atstring (date-time)required
    • data[].[].bindingobject
    • data[].[].binding.organizationIdstringrequired
    • data[].[].binding.projectIdstringrequired
    • data[].[].binding.platformIdstringrequired
    • data[].[].binding.workspaceIdstring | null
    • data[].[].binding.fleetIdstring | null
    • data[].[].binding.resourceEnvironment"sandbox" | "live"required
    • data[].[].binding.source"key" | "organization_default"required

      key: recorded at creation. organization_default: no recorded binding; the organization default project in sandbox.

  • 401Unauthorized
  • 403Forbidden
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/organizations/$ORG_ID/api-keys" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create organization API key

POST/v1/iam/organizations/{org_id}/api-keys

iam:writeSigned-in sessioniam_createOrgApiKey

Requires org admin or owner role. The full key value is only returned once (custody=reveal).

Parameters

  • org_idpath · stringrequired

Request body application/json

  • namestringrequired

    min length 1 · max length 255

  • scopesstring[]
  • custody"reveal" | "blinds"

    default "reveal"

  • expires_atstring (date-time)
  • bindingobject

    The tenant the key is bound to, chosen once at creation. Omitted fields mean the organization's default project, its workspace and sandbox. A key's environment never changes: a Live key needs resourceEnvironment live here.

  • binding.projectIdstring

    pattern ^pr_[A-Za-z0-9_-]{1,125}$

  • binding.workspaceIdstring

    pattern ^w_[A-Za-z0-9_-]{1,126}$

  • binding.resourceEnvironment"sandbox" | "live"

Responses

  • 201API key created
    Response fields
    • idstringrequired
    • namestringrequired
    • obfuscated_valuestringrequired
    • valuestring | null
    • blinds_credential_refstring | null
    • scopesstring[]required
    • expires_atstring | null (date-time)
    • created_atstring (date-time)required
    • bindingobject
    • binding.organizationIdstringrequired
    • binding.projectIdstringrequired
    • binding.platformIdstringrequired
    • binding.workspaceIdstring | null
    • binding.fleetIdstring | null
    • binding.resourceEnvironment"sandbox" | "live"required
    • binding.source"key" | "organization_default"required

      key: recorded at creation. organization_default: no recorded binding; the organization default project in sandbox.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/organizations/$ORG_ID/api-keys" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Capabilities

Issue a capability

POST/v1/iam/capabilities

iam:writeFailed with an API keyIdempotency-Key optionaliam_createCapability

Bounded delegation from the caller (always the issuer) to a subject, never above the caller's own authority. organization_id must be your organization. With an Idempotency-Key a retry returns the original capability. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • Idempotency-Keyheader · string

    Optional; IAM replays the first result for it

Request body application/json

  • subject_principal_idstringrequired
  • organization_idstringrequired

    Your organization

  • permissionsstring[]required
  • constraintsobject
  • constraints.expires_atinteger

    Milliseconds since the epoch

  • constraints.max_invocationsinteger

    min 0

  • constraints.max_spend_minorinteger
  • constraints.spend_currencystring
  • constraints.resource_idsstring[]
  • constraints.environment_idsstring[]
  • constraints.http_methodsstring[]
  • constraints.not_beforeinteger

    Milliseconds since the epoch

  • issuer_principal_idstring

    Optional; must be the caller

Responses

  • 200The capability
    Response fields
    • idstringrequired

      c_<ulid>

    • issuer_principal_idstringrequired
    • subject_principal_idstringrequired
    • organization_idstringrequired
    • permissionsstring[]required
    • constraintsobjectrequired
    • constraints.expires_atinteger

      Milliseconds since the epoch

    • constraints.max_invocationsinteger

      min 0

    • constraints.max_spend_minorinteger
    • constraints.spend_currencystring
    • constraints.resource_idsstring[]
    • constraints.environment_idsstring[]
    • constraints.http_methodsstring[]
    • constraints.not_beforeinteger

      Milliseconds since the epoch

    • created_atintegerrequired

      Milliseconds since the epoch

    • revoked_atinteger

      Milliseconds since the epoch

    • revoke_reasonstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/capabilities" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject_principal_id": "string",
    "organization_id": "string",
    "permissions": []
  }'

Get a capability

GET/v1/iam/capabilities/{capability_id}

iam:readAPI keys refusediam_getCapability

Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • capability_idpath · stringrequired

Responses

  • 200The capability
    Response fields
    • idstringrequired

      c_<ulid>

    • issuer_principal_idstringrequired
    • subject_principal_idstringrequired
    • organization_idstringrequired
    • permissionsstring[]required
    • constraintsobjectrequired
    • constraints.expires_atinteger

      Milliseconds since the epoch

    • constraints.max_invocationsinteger

      min 0

    • constraints.max_spend_minorinteger
    • constraints.spend_currencystring
    • constraints.resource_idsstring[]
    • constraints.environment_idsstring[]
    • constraints.http_methodsstring[]
    • constraints.not_beforeinteger

      Milliseconds since the epoch

    • created_atintegerrequired

      Milliseconds since the epoch

    • revoked_atinteger

      Milliseconds since the epoch

    • revoke_reasonstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/capabilities/$CAPABILITY_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Revoke a capability

DELETE/v1/iam/capabilities/{capability_id}

iam:writeiam_deleteCapability

Only its issuer; needs iam:write. An optional reason is recorded. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • capability_idpath · stringrequired

Request body application/json

  • reasonstring

Responses

  • 204Revoked
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/capabilities/$CAPABILITY_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Update a capability

PATCH/v1/iam/capabilities/{capability_id}

iam:writeiam_updateCapability

Replaces its permissions and constraints. Only its issuer; needs iam:write. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • capability_idpath · stringrequired

Request body application/json

  • permissionsstring[]required
  • constraintsobjectrequired
  • constraints.expires_atinteger

    Milliseconds since the epoch

  • constraints.max_invocationsinteger

    min 0

  • constraints.max_spend_minorinteger
  • constraints.spend_currencystring
  • constraints.resource_idsstring[]
  • constraints.environment_idsstring[]
  • constraints.http_methodsstring[]
  • constraints.not_beforeinteger

    Milliseconds since the epoch

Responses

  • 200The updated capability
    Response fields
    • idstringrequired

      c_<ulid>

    • issuer_principal_idstringrequired
    • subject_principal_idstringrequired
    • organization_idstringrequired
    • permissionsstring[]required
    • constraintsobjectrequired
    • constraints.expires_atinteger

      Milliseconds since the epoch

    • constraints.max_invocationsinteger

      min 0

    • constraints.max_spend_minorinteger
    • constraints.spend_currencystring
    • constraints.resource_idsstring[]
    • constraints.environment_idsstring[]
    • constraints.http_methodsstring[]
    • constraints.not_beforeinteger

      Milliseconds since the epoch

    • created_atintegerrequired

      Milliseconds since the epoch

    • revoked_atinteger

      Milliseconds since the epoch

    • revoke_reasonstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/iam/capabilities/$CAPABILITY_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "permissions": [],
    "constraints": {}
  }'

Verify a capability

POST/v1/iam/capabilities/verify

iam:writeTested with an API keyiam_verifyCapability

Is the capability valid now, optionally for a permission, organization and environment? Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Request body application/json

  • idstringrequired

    c_<ulid>

  • expectedobject
  • expected.permissionstring
  • expected.organization_idstring
  • expected.environmentId"live" | "sandbox"

Responses

  • 200The verification
    Response fields
    • validbooleanrequired
    • grantobject
    • grant.idstringrequired

      c_<ulid>

    • grant.issuer_principal_idstringrequired
    • grant.subject_principal_idstringrequired
    • grant.organization_idstringrequired
    • grant.permissionsstring[]required
    • grant.constraintsobjectrequired
    • grant.constraints.expires_atinteger

      Milliseconds since the epoch

    • grant.constraints.max_invocationsinteger

      min 0

    • grant.constraints.max_spend_minorinteger
    • grant.constraints.spend_currencystring
    • grant.constraints.resource_idsstring[]
    • grant.constraints.environment_idsstring[]
    • grant.constraints.http_methodsstring[]
    • grant.constraints.not_beforeinteger

      Milliseconds since the epoch

    • grant.created_atintegerrequired

      Milliseconds since the epoch

    • grant.revoked_atinteger

      Milliseconds since the epoch

    • grant.revoke_reasonstring
    • reason_invalid"expired" | "revoked" | "scope_mismatch" | "tenant_mismatch" | "not_found"
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/capabilities/verify" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string"
  }'

Check entitlement

Check an entitlement

POST/v1/iam/check-entitlement

iam:writeTested with an API keyiam_checkEntitlement

One entitlement of your organization in one environment (live by default). Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Request body application/json

  • organization_idstringrequired

    Your organization

  • keystringrequired
  • environment_id"live" | "sandbox"

Responses

  • 200The entitlement
    Response fields
    • keystringrequired
    • organization_idstringrequired
    • enabledbooleanrequired
    • quotainteger | null
    • remaininginteger | null
    • evaluated_atinteger

      Milliseconds since the epoch

    • sourcestring
    • environmentIdstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/check-entitlement" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "string",
    "key": "string"
  }'

Check permission

Check a permission

POST/v1/iam/check-permission

iam:writeTested with an API keyiam_checkPermission

Would principalId (default: the caller) hold permission in this tenant context? tenantContext.organizationId must be your organization. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Request body application/json

  • principalIdstring

    Default: the caller

  • permissionstringrequired

    e.g. iam.fleets.read

  • tenantContextobjectrequired
  • tenantContext.organizationIdstringrequired

    Your organization

  • tenantContext.projectIdstringrequired
  • tenantContext.platformIdstringrequired
  • tenantContext.workspaceIdstring
  • tenantContext.fleetIdstring
  • tenantContext.environmentId"live" | "sandbox"

Responses

  • 200The decision
    Response fields
    • allowedbooleanrequired
    • evaluated_atinteger

      Milliseconds since the epoch

    • viastring
    • environmentIdstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/check-permission" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "permission": "string",
    "tenantContext": {
      "organizationId": "string",
      "projectId": "string",
      "platformId": "string"
    }
  }'

Credentials

Verify credential

POST/v1/iam/credentials/verify

iam:writeTested with an API keyNo key needediam_verifyCredential

Verifies an API key, M2M token, or bridge session and returns principal information.

Request body application/json

  • credential_valuestringrequired

Responses

  • 200Verified
    Response fields
    • kind"api_key" | "m2m_token" | "bridge_session"required
    • orgstringrequired
    • principalstring | null
    • scopesstring[]required
  • 400Bad request
  • 401Unauthorized
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/credentials/verify" \
  -H "Content-Type: application/json" \
  -d '{
    "credential_value": "string"
  }'

Grants

List grants

GET/v1/iam/grants

iam:readTested with an API keyiam_listGrants

Permission grants in your organization (default: the token's organization), optionally for one principal, project, platform or workspace. Records may name the organization by IAM's Auth v4 UUID projection. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • principal_idquery · string
  • organization_idquery · string
  • project_idquery · string
  • platform_idquery · string
  • workspace_idquery · string

Responses

  • 200Grants
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      g_<ulid>

    • items[].[].principal_idstringrequired
    • items[].[].organization_idstringrequired
    • items[].[].project_idstring
    • items[].[].platform_idstring
    • items[].[].workspace_idstring
    • items[].[].environmentId"live" | "sandbox"
    • items[].[].role_idsstring[]required
    • items[].[].permissionsstring[]
    • items[].[].expires_atinteger

      Milliseconds since the epoch

    • items[].[].metadataobject
    • items[].[].created_atintegerrequired

      Milliseconds since the epoch

    • next_cursorstring | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/grants" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a grant

POST/v1/iam/grants

iam:writeTested with an API keyIdempotency-Key optionaliam_createGrant

Grants roles or permissions to a principal in your organization (organization_id must be your organization). A key cannot grant the owner role. Needs iam:write and member-management authority. With an Idempotency-Key a retry returns the original grant. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • Idempotency-Keyheader · string

    Optional; IAM replays the first result for it

Request body application/json

  • principal_idstringrequired
  • organization_idstringrequired

    Your organization

  • project_idstring
  • platform_idstring
  • workspace_idstring
  • environment_id"live" | "sandbox"
  • role_idsstring[]required
  • permissionsstring[]
  • expires_atinteger

    Milliseconds since the epoch

Responses

  • 200The created grant
    Response fields
    • idstringrequired

      g_<ulid>

    • principal_idstringrequired
    • organization_idstringrequired
    • project_idstring
    • platform_idstring
    • workspace_idstring
    • environmentId"live" | "sandbox"
    • role_idsstring[]required
    • permissionsstring[]
    • expires_atinteger

      Milliseconds since the epoch

    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/grants" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "principal_id": "string",
    "organization_id": "string",
    "role_ids": []
  }'

Get a grant

GET/v1/iam/grants/{grant_id}

iam:readTested with an API keyiam_getGrant

Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • grant_idpath · stringrequired

Responses

  • 200The grant
    Response fields
    • idstringrequired

      g_<ulid>

    • principal_idstringrequired
    • organization_idstringrequired
    • project_idstring
    • platform_idstring
    • workspace_idstring
    • environmentId"live" | "sandbox"
    • role_idsstring[]required
    • permissionsstring[]
    • expires_atinteger

      Milliseconds since the epoch

    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/grants/$GRANT_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete a grant

DELETE/v1/iam/grants/{grant_id}

iam:writeTested with an API keyiam_deleteGrant

Permanent. The organization owner's grant cannot be removed by a key. Needs iam:write and member-management authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • grant_idpath · stringrequired

Responses

  • 204Deleted
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/grants/$GRANT_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Update a grant

PATCH/v1/iam/grants/{grant_id}

iam:writeTested with an API keyiam_updateGrant

Replace its roles, permissions, expiry or environment; metadata is merged. Needs iam:write and member-management authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • grant_idpath · stringrequired

Request body application/json

  • role_idsstring[]
  • permissionsstring[]
  • expires_atinteger

    Milliseconds since the epoch

  • metadataobject
  • environment_id"live" | "sandbox"

Responses

  • 200The updated grant
    Response fields
    • idstringrequired

      g_<ulid>

    • principal_idstringrequired
    • organization_idstringrequired
    • project_idstring
    • platform_idstring
    • workspace_idstring
    • environmentId"live" | "sandbox"
    • role_idsstring[]required
    • permissionsstring[]
    • expires_atinteger

      Milliseconds since the epoch

    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/iam/grants/$GRANT_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Orgs

List organizations

GET/v1/iam/orgs

iam:readSigned-in sessioniam_listOrgs

Organizations the caller can see, with the caller's own role on each for a login. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • cursorquery · string
  • limitquery · integer

Responses

  • 200Organizations
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      o_<ulid>

    • items[].[].namestringrequired
    • items[].[].slugstringrequired
    • items[].[].owner_human_principal_idstring
    • items[].[].metadataobject
    • items[].[].created_atintegerrequired

      Milliseconds since the epoch

    • items[].[].rolestring

      Your role here (organization lists for a login)

    • next_cursorstring | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Get an organization

GET/v1/iam/orgs/{org_id}

iam:readTested with an API keyiam_getOrg

Needs iam:read and access to the organization. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Responses

  • 200The organization
    Response fields
    • idstringrequired

      o_<ulid>

    • namestringrequired
    • slugstringrequired
    • owner_human_principal_idstring
    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

    • rolestring

      Your role here (organization lists for a login)

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Update an organization

PATCH/v1/iam/orgs/{org_id}

iam:writeTested with an API keyiam_updateOrg

Rename it or change its slug; metadata is merged. Ownership cannot be transferred here. Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Request body application/json

  • namestring
  • slugstring
  • metadataobject

    Merged into the existing metadata

Responses

  • 200The updated organization
    Response fields
    • idstringrequired

      o_<ulid>

    • namestringrequired
    • slugstringrequired
    • owner_human_principal_idstring
    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

    • rolestring

      Your role here (organization lists for a login)

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/iam/orgs/$ORG_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Agent enrollment grants

List agent enrollment grants

GET/v1/iam/orgs/{org_id}/agent-enrollment-grants

iam:readSigned-in sessioniam_listAgentEnrollmentGrants

Grants that let an application enroll agents automatically (create with POST, revoke with .../revoke). Needs owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Responses

  • 200Grants
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      aeg_<ulid>

    • items[].[].organizationIdstringrequired
    • items[].[].projectIdstringrequired
    • items[].[].parentPrincipalIdstringrequired
    • items[].[].mindIdsstring[]required
    • items[].[].permissionsstring[]required
    • items[].[].sharedNamespacesstring[]
    • items[].[].maxAgentsinteger
    • items[].[].maxCredentialTtlSecondsinteger
    • items[].[].createdByPrincipalIdstring
    • items[].[].createdAtinteger

      Milliseconds since the epoch

    • items[].[].expiresAtinteger | null
    • items[].[].revokedAtinteger | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agent-enrollment-grants" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create an agent enrollment grant

POST/v1/iam/orgs/{org_id}/agent-enrollment-grants

iam:writeIdempotency-Key requirediam_createAgentEnrollmentGrant

Lets an application (a service principal of this organization, the parent) enroll agents for the named Minds by itself, with at most the named data permissions (minds.agent_data.read, minds.agent_data.write) and shared namespaces. Needs iam:write and owner or manager authority; an organization API key works only in a sandbox environment. The enrollment key (mek_...) is returned once and only its hash is stored: give it to the application, which calls POST /v1/iam/agents/enroll. A retry with the same Idempotency-Key answers with the status only, never the key again. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • Idempotency-Keyheader · stringrequired

Request body application/json

  • parentPrincipalIdstringrequired

    The application's service principal (s_...) in this organization

  • projectIdstringrequired

    pattern ^pr_[A-Za-z0-9_-]{1,128}$

  • mindIdsstring[]required
  • permissions"minds.agent_data.read" | "minds.agent_data.write"[]required
  • sharedNamespacesstring[]

    Group namespaces (group:agp_...) the enrolled agents may share

  • maxAgentsintegerrequired

    min 1 · max 10000

  • maxCredentialTtlSecondsintegerrequired

    min 60 · max 7776000

  • expiresAtinteger

    Milliseconds since the epoch; in the future

  • returningAgentProof"required" | "trusted_parent"

    default "required"

Responses

  • 200The grant, and its enrollment key (returned once)
    Response fields
    • grantobjectrequired
    • grant.idstringrequired

      aeg_<ulid>

    • grant.organizationIdstringrequired
    • grant.projectIdstringrequired
    • grant.parentPrincipalIdstringrequired
    • grant.mindIdsstring[]required
    • grant.permissionsstring[]required
    • grant.sharedNamespacesstring[]
    • grant.maxAgentsinteger
    • grant.maxCredentialTtlSecondsinteger
    • grant.createdByPrincipalIdstring
    • grant.createdAtinteger

      Milliseconds since the epoch

    • grant.expiresAtinteger | null
    • grant.revokedAtinteger | null
    • enrollmentKeystringrequired

      mek_... returned once; only its hash is stored

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agent-enrollment-grants" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parentPrincipalId": "string",
    "projectId": "string",
    "mindIds": [
      "string"
    ],
    "permissions": [
      "minds.agent_data.read"
    ],
    "maxAgents": 1,
    "maxCredentialTtlSeconds": 60
  }'

Revoke an agent enrollment grant

POST/v1/iam/orgs/{org_id}/agent-enrollment-grants/{grant_id}/revoke

iam:writeiam_revokeAgentEnrollmentGrant

The enrollment key stops working at once; agents already enrolled keep their credentials until they expire or are revoked. Needs iam:write and owner or manager authority (an API key only in sandbox).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • grant_idpath · stringrequired

Responses

  • 200The revoked grant
    Response fields
    • idstringrequired

      aeg_<ulid>

    • organizationIdstringrequired
    • projectIdstringrequired
    • parentPrincipalIdstringrequired
    • mindIdsstring[]required
    • permissionsstring[]required
    • sharedNamespacesstring[]
    • maxAgentsinteger
    • maxCredentialTtlSecondsinteger
    • createdByPrincipalIdstring
    • createdAtinteger

      Milliseconds since the epoch

    • expiresAtinteger | null
    • revokedAtinteger | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/agent-enrollment-grants/$GRANT_ID/revoke" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Entitlements

List entitlements

GET/v1/iam/orgs/{org_id}/entitlements

iam:readTested with an API keyiam_listEntitlements

Effective entitlements for the organization in one environment (live by default). Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • environment_idquery · "live" | "sandbox"

    live (default) or sandbox

Responses

  • 200Entitlements
    Response fields
    • itemsobject[]required
    • items[].[].keystringrequired
    • items[].[].organization_idstringrequired
    • items[].[].enabledbooleanrequired
    • items[].[].quotainteger | null
    • items[].[].remaininginteger | null
    • items[].[].evaluated_atinteger

      Milliseconds since the epoch

    • items[].[].sourcestring
    • items[].[].environmentIdstring
    • next_cursorstring | null
    • snapshotVersionany
    • snapshotGeneratedAtany
    • snapshotValidUntilany
    • environmentIdstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/entitlements" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Fleets

List fleets

GET/v1/iam/orgs/{org_id}/fleets

iam:readTested with an API keyiam_listFleets

IAM fleets (AgentOS operating scopes) in the organization. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Responses

  • 200Fleets
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      fl_<ulid>

    • items[].[].organizationIdstringrequired
    • items[].[].projectIdstring
    • items[].[].workspaceIdstring
    • items[].[].namestringrequired
    • items[].[].slugstringrequired
    • items[].[].metadataobject
    • items[].[].createdAtintegerrequired

      Milliseconds since the epoch

    • items[].[].updatedAtintegerrequired

      Milliseconds since the epoch

    • next_cursorstring | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/fleets" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a fleet

POST/v1/iam/orgs/{org_id}/fleets

iam:writeTested with an API keyIdempotency-Key requirediam_createFleet

Optionally under a project and workspace of the organization. A retry with the same Idempotency-Key returns the original fleet. Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • Idempotency-Keyheader · stringrequired

    Stable key; IAM replays the first result for it

Request body application/json

  • namestringrequired
  • slugstringrequired

    Unique within the organization

  • project_idstring
  • workspace_idstring
  • metadataobject

Responses

  • 200The created fleet
    Response fields
    • idstringrequired

      fl_<ulid>

    • organizationIdstringrequired
    • projectIdstring
    • workspaceIdstring
    • namestringrequired
    • slugstringrequired
    • metadataobject
    • createdAtintegerrequired

      Milliseconds since the epoch

    • updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 409A fleet with this slug exists
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/fleets" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "slug": "string"
  }'

Get a fleet

GET/v1/iam/orgs/{org_id}/fleets/{fleet_id}

iam:readTested with an API keyiam_getFleet

Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • fleet_idpath · stringrequired

Responses

  • 200The fleet
    Response fields
    • idstringrequired

      fl_<ulid>

    • organizationIdstringrequired
    • projectIdstring
    • workspaceIdstring
    • namestringrequired
    • slugstringrequired
    • metadataobject
    • createdAtintegerrequired

      Milliseconds since the epoch

    • updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/fleets/$FLEET_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete a fleet

DELETE/v1/iam/orgs/{org_id}/fleets/{fleet_id}

iam:writeTested with an API keyiam_deleteFleet

Permanent. Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • fleet_idpath · stringrequired

Responses

  • 204Deleted
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 409Grants still reference the fleet
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/fleets/$FLEET_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Update a fleet

PATCH/v1/iam/orgs/{org_id}/fleets/{fleet_id}

iam:writeTested with an API keyiam_updateFleet

Rename it or change its slug; metadata is merged. Needs iam:write and owner or manager authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • fleet_idpath · stringrequired

Request body application/json

  • namestring
  • slugstring
  • metadataobject

    Merged into the existing metadata

Responses

  • 200The updated fleet
    Response fields
    • idstringrequired

      fl_<ulid>

    • organizationIdstringrequired
    • projectIdstring
    • workspaceIdstring
    • namestringrequired
    • slugstringrequired
    • metadataobject
    • createdAtintegerrequired

      Milliseconds since the epoch

    • updatedAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/fleets/$FLEET_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Members

List members

GET/v1/iam/orgs/{org_id}/members

iam:readAPI keys refusediam_listMembers

People in the organization with their role (display fields from Auth). Inviting, changing roles and removing members stay with a person in the Console. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • cursorquery · string
  • limitquery · integer

Responses

  • 200Members
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired
    • items[].[].principalIdstringrequired

      h_<id>

    • items[].[].organizationIdstringrequired
    • items[].[].displayNamestring | null
    • items[].[].emailstring | null
    • items[].[].accountStatusstringrequired
    • items[].[].rolestringrequired
    • items[].[].joinedAtinteger | null
    • totalinteger
    • nextCursorstring | null
    • completeboolean
    • canManageMembersboolean
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/members" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Minds

List a Mind's enrolled agents

GET/v1/iam/orgs/{org_id}/minds/{mind_id}/agents

iam:readTested with an API keyiam_listMindAgents

Active agents with a currently valid credential for the Mind. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • mind_idpath · stringrequired

Responses

  • 200Agents
    Response fields
    • itemsobject[]required
    • items[].[].agentobjectrequired
    • items[].[].agent.idstringrequired

      a_<ulid>

    • items[].[].agent.organizationIdstringrequired
    • items[].[].agent.didstringrequired

      did:oas:<kind>:<ulid>

    • items[].[].agent.displayNamestringrequired
    • items[].[].agent.kindstringrequired
    • items[].[].agent.status"active" | "suspended" | "revoked"required
    • items[].[].agent.parentDidstring | null
    • items[].[].agent.publicKeystring | null
    • items[].[].agent.scopesstring[]required
    • items[].[].agent.metadataobject | null
    • items[].[].agent.createdAtintegerrequired

      Milliseconds since the epoch

    • items[].[].agent.updatedAtintegerrequired

      Milliseconds since the epoch

    • items[].[].mindIdstringrequired
    • items[].[].scopesstring[]
    • items[].[].sharedNamespacesstring[]
    • items[].[].credentialExpiresAtinteger

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/minds/$MIND_ID/agents" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Projects

List projects

GET/v1/iam/orgs/{org_id}/projects

iam:readTested with an API keyiam_listProjects

Projects in the organization you are signed in to. Needs iam:read (or iam:write) and persisted access to the organization; a project-scoped grant sees only its own project. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Responses

  • 200Projects
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      pr_<ulid>

    • items[].[].organization_idstringrequired
    • items[].[].namestringrequired
    • items[].[].slugstringrequired

      Unique within the organization

    • items[].[].metadataobject
    • items[].[].created_atintegerrequired

      Milliseconds since the epoch

    • next_cursorstring | null

      Always null; IAM returns every project in one page

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:read) or IAM PERMISSION_DENIED
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/projects" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a project

POST/v1/iam/orgs/{org_id}/projects

iam:writeTested with an API keyIdempotency-Key requirediam_createProject

Needs iam:write and owner or admin authority in the organization (IAM ensure_org_agent_manager). The project id is pr_<ulid>. A retry with the same Idempotency-Key returns the original project. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • Idempotency-Keyheader · stringrequired

    Stable key; IAM replays the first result for it

Request body application/json

  • namestringrequired
  • slugstringrequired

    Unique within the organization

  • metadataobject

Responses

  • 200The created project
    Response fields
    • idstringrequired

      pr_<ulid>

    • organization_idstringrequired
    • namestringrequired
    • slugstringrequired

      Unique within the organization

    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:write) or IAM PERMISSION_DENIED (owner/admin required); iam:write is carried only by a session that names the organization, and only for an owner or admin
  • 409A project with this slug already exists in the organization
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/projects" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "slug": "string"
  }'

Get a project

GET/v1/iam/orgs/{org_id}/projects/{project_id}

iam:readTested with an API keyiam_getProject

Needs iam:read (or iam:write) and access to this project. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • project_idpath · stringrequired

Responses

  • 200The project
    Response fields
    • idstringrequired

      pr_<ulid>

    • organization_idstringrequired
    • namestringrequired
    • slugstringrequired

      Unique within the organization

    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/projects/$PROJECT_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete a project

DELETE/v1/iam/orgs/{org_id}/projects/{project_id}

iam:writeTested with an API keyiam_deleteProject

Permanently deletes the project record. IAM refuses (409) while workspaces, fleets or grants still reference it; IAM does not check other services' resources that name the project. Needs iam:write and owner or admin authority. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • project_idpath · stringrequired

Responses

  • 204Deleted
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:write) or IAM PERMISSION_DENIED; iam:write is carried only by a session that names the organization, and only for an owner or admin
  • 404Not found
  • 409Workspaces, fleets or grants still reference the project
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/projects/$PROJECT_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Update a project

PATCH/v1/iam/orgs/{org_id}/projects/{project_id}

iam:writeTested with an API keyiam_updateProject

Rename a project or change its slug; metadata is merged into the existing metadata. Needs iam:write and owner or admin authority. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • project_idpath · stringrequired

Request body application/json

  • namestring
  • slugstring
  • metadataobject

    Merged into the existing metadata

Responses

  • 200The updated project
    Response fields
    • idstringrequired

      pr_<ulid>

    • organization_idstringrequired
    • namestringrequired
    • slugstringrequired

      Unique within the organization

    • metadataobject
    • created_atintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:write) or IAM PERMISSION_DENIED; iam:write is carried only by a session that names the organization, and only for an owner or admin
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/projects/$PROJECT_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Roles

List roles

GET/v1/iam/orgs/{org_id}/roles

iam:readTested with an API keyiam_listRoles

The organization's custom roles and the system roles. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Responses

  • 200Roles
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      r_<ulid> or r_system_*

    • items[].[].organization_idstring

      Absent on system roles

    • items[].[].namestringrequired
    • items[].[].descriptionstring
    • items[].[].permissionsstring[]required
    • items[].[].metadataobject
    • next_cursorstring | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/roles" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a role

POST/v1/iam/orgs/{org_id}/roles

iam:writeTested with an API keyiam_createRole

Needs iam:write and member-management authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Request body application/json

  • namestringrequired
  • descriptionstring
  • permissionsstring[]required

Responses

  • 200The created role
    Response fields
    • idstringrequired

      r_<ulid> or r_system_*

    • organization_idstring

      Absent on system roles

    • namestringrequired
    • descriptionstring
    • permissionsstring[]required
    • metadataobject
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 409A role with this name exists
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/roles" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "permissions": []
  }'

Get a role

GET/v1/iam/orgs/{org_id}/roles/{role_id}

iam:readTested with an API keyiam_getRole

A custom role of the organization, or a system role. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • role_idpath · stringrequired

Responses

  • 200The role
    Response fields
    • idstringrequired

      r_<ulid> or r_system_*

    • organization_idstring

      Absent on system roles

    • namestringrequired
    • descriptionstring
    • permissionsstring[]required
    • metadataobject
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/roles/$ROLE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete a role

DELETE/v1/iam/orgs/{org_id}/roles/{role_id}

iam:writeTested with an API keyiam_deleteRole

Permanent; system roles cannot be deleted. Needs iam:write and member-management authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • role_idpath · stringrequired

Responses

  • 204Deleted
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 409Grants still use the role
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/roles/$ROLE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Update a role

PATCH/v1/iam/orgs/{org_id}/roles/{role_id}

iam:writeTested with an API keyiam_updateRole

System roles cannot be changed. Needs iam:write and member-management authority. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • role_idpath · stringrequired

Request body application/json

  • namestring
  • descriptionstring
  • permissionsstring[]
  • metadataobject

Responses

  • 200The updated role
    Response fields
    • idstringrequired

      r_<ulid> or r_system_*

    • organization_idstring

      Absent on system roles

    • namestringrequired
    • descriptionstring
    • permissionsstring[]required
    • metadataobject
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/roles/$ROLE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Workspaces

List workspaces

GET/v1/iam/orgs/{org_id}/workspaces

iam:readTested with an API keyiam_listWorkspaces

Workspaces in the organization you are signed in to. Needs iam:read (or iam:write) and persisted access to the organization. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

Responses

  • 200Workspaces
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      w_<ulid>

    • items[].[].organizationIdstringrequired
    • items[].[].projectIdstring

      The project this workspace belongs to, when it has one

    • items[].[].namestringrequired
    • items[].[].metadataobject
    • items[].[].createdAtintegerrequired

      Milliseconds since the epoch

    • next_cursorstring | null

      Always null; IAM returns every workspace in one page

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:read) or IAM PERMISSION_DENIED
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/workspaces" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a workspace

POST/v1/iam/orgs/{org_id}/workspaces

iam:writeTested with an API keyIdempotency-Key requirediam_createWorkspace

Optionally under a project of the same organization. Needs iam:write and owner or admin authority. The workspace id is w_<ulid>. A retry with the same Idempotency-Key returns the original workspace. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • Idempotency-Keyheader · stringrequired

    Stable key; IAM replays the first result for it

Request body application/json

  • namestringrequired
  • project_idstring

    Optional pr_ id in the same organization (IAM also accepts projectId)

Responses

  • 200The created workspace
    Response fields
    • idstringrequired

      w_<ulid>

    • organizationIdstringrequired
    • projectIdstring

      The project this workspace belongs to, when it has one

    • namestringrequired
    • metadataobject
    • createdAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:write), IAM PERMISSION_DENIED or TENANT_MISMATCH (project in another org); iam:write is carried only by a session that names the organization, and only for an owner or admin
  • 404The named project does not exist
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/workspaces" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Get a workspace

GET/v1/iam/orgs/{org_id}/workspaces/{workspace_id}

iam:readTested with an API keyiam_getWorkspace

Needs iam:read (or iam:write) and persisted access to the organization. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • workspace_idpath · stringrequired

Responses

  • 200The workspace
    Response fields
    • idstringrequired

      w_<ulid>

    • organizationIdstringrequired
    • projectIdstring

      The project this workspace belongs to, when it has one

    • namestringrequired
    • metadataobject
    • createdAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/workspaces/$WORKSPACE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Delete a workspace

DELETE/v1/iam/orgs/{org_id}/workspaces/{workspace_id}

iam:writeTested with an API keyiam_deleteWorkspace

Permanently deletes the workspace record. IAM refuses (409) while fleets or grants still reference it. Needs iam:write and owner or admin authority. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • workspace_idpath · stringrequired

Responses

  • 204Deleted
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:write) or IAM PERMISSION_DENIED; iam:write is carried only by a session that names the organization, and only for an owner or admin
  • 404Not found
  • 409Fleets or grants still reference the workspace
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/workspaces/$WORKSPACE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Update a workspace

PATCH/v1/iam/orgs/{org_id}/workspaces/{workspace_id}

iam:writeTested with an API keyiam_updateWorkspace

Rename a workspace; metadata is merged into the existing metadata. A workspace's project cannot be changed. Needs iam:write and owner or admin authority. A One account session (the gateway obtains its organization from Auth's organization-context exchange; see 400 TENANT_REQUIRED), or an organization API key with iam:read / iam:write when the gateway admits keys (IAM_KEYS_ENABLED).

Parameters

  • org_idpath · stringrequired

    The organization you are signed in to

  • workspace_idpath · stringrequired

Request body application/json

  • namestring
  • metadataobject

    Merged into the existing metadata

Responses

  • 200The updated workspace
    Response fields
    • idstringrequired

      w_<ulid>

    • organizationIdstringrequired
    • projectIdstring

      The project this workspace belongs to, when it has one

    • namestringrequired
    • metadataobject
    • createdAtintegerrequired

      Milliseconds since the epoch

  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED, SCOPE_MISSING (iam:write) or IAM PERMISSION_DENIED; iam:write is carried only by a session that names the organization, and only for an owner or admin
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/iam/orgs/$ORG_ID/workspaces/$WORKSPACE_ID" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Platforms

List platforms

GET/v1/iam/platforms

iam:readTested with an API keyiam_listPlatforms

The platform catalog (pf_ ids). Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Responses

  • 200Platforms
    Response fields
    • itemsobject[]required
    • items[].[].idstringrequired

      pf_<key>

    • items[].[].keystringrequired
    • items[].[].namestringrequired
    • items[].[].metadataobject
    • next_cursorstring | null
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/platforms" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Public

Get a public agent card

GET/v1/iam/public/agents/{agent_id}

iam:readFailed with an API keyNo key needediam_getPublicAgent

The public card of a published agent: no tenant, owner, scopes or keys. Anonymous; 404 for any agent that is not published.

Parameters

  • agent_idpath · stringrequired

    The agent principal id (a_<ulid>)

Responses

  • 200The public card
    Response fields
    • schemaVersioninteger
    • principalIdstringrequired
    • kindstringrequired
    • publicationVersioninteger
    • canonicalAgentDidstring
    • handlestring | null
    • handleStatusstring
    • contactobject
    • operatingCompanyobject | null
  • 400Bad request
  • 404Not found
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/public/agents/$AGENT_ID"

Require permission

Require a permission

POST/v1/iam/require-permission

iam:writeTested with an API keyiam_requirePermission

As check-permission, but a denial is 403 PERMISSION_DENIED. Needs iam:read. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Request body application/json

  • principalIdstring

    Default: the caller

  • permissionstringrequired

    e.g. iam.fleets.read

  • tenantContextobjectrequired
  • tenantContext.organizationIdstringrequired

    Your organization

  • tenantContext.projectIdstringrequired
  • tenantContext.platformIdstringrequired
  • tenantContext.workspaceIdstring
  • tenantContext.fleetIdstring
  • tenantContext.environmentId"live" | "sandbox"

Responses

  • 200The allowing decision
    Response fields
    • allowedbooleanrequired
    • evaluated_atinteger

      Milliseconds since the epoch

    • viastring
    • environmentIdstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/require-permission" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "permission": "string",
    "tenantContext": {
      "organizationId": "string",
      "projectId": "string",
      "platformId": "string"
    }
  }'

Runner

Request scoped Runner self-execution permission

POST/v1/iam/runner/self-execution-grant

iam:writeIdempotency-Key requirediam_runnerSelfExecutionGrant

Requires an actual ordinary interactive human session and current native organization owner or qualifying manager authority. Explicit null fleet, Sandbox, full signed selection and finite expiry only. Preserve operationId, scope and expiry on replay; requestId is fresh correlation. Backend deployment and gateway activation remain required.

Parameters

  • Idempotency-Keyheader · string (uuid)required

    Exact body operationId

  • x-request-idheader · string (uuid)required

    Exact body requestId; the gateway translates it to the native correlation header

Request body application/json

  • schemaVersion1required
  • requestIdstringrequired

    pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

  • operationIdstringrequired

    pattern ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

  • organizationIdstringrequired

    pattern ^o_[A-Za-z0-9_]{1,32}$

  • projectIdstringrequired

    pattern ^pr_[A-Za-z0-9_]{1,32}$

  • platformId"pf_console"required
  • workspaceIdstringrequired

    pattern ^w_[A-Za-z0-9_]{1,32}$

  • fleetIdnullrequired
  • resourceEnvironment"sandbox"required
  • expiresAtMsintegerrequired

    min 1 · max 9007199254740991

Responses

  • 200Exact scoped native grant
    Response fields
    • idstringrequired

      pattern ^g_[0-7][0123456789ABCDEFGHJKMNPQRSTVWXYZ]{25}$

    • principal_idstringrequired

      pattern ^h_[A-Za-z0-9_]{1,32}$

    • organization_idstringrequired

      pattern ^o_[A-Za-z0-9_]{1,32}$

    • project_idstringrequired

      pattern ^pr_[A-Za-z0-9_]{1,32}$

    • platform_id"pf_console"required
    • workspace_idstringrequired

      pattern ^w_[A-Za-z0-9_]{1,32}$

    • environmentId"sandbox"required
    • role_idsany[]required
    • permissions"runner.tasks.execute"[]required
    • expires_atintegerrequired

      min 1 · max 9007199254740991

    • created_atintegerrequired

      min 1 · max 9007199254740991

  • 400Closed invalid request or expiry error
  • 401Current human authority inactive
  • 403Current native authority denied
  • 409Changed operation payload or stale retained grant
  • 503Native authority or store unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/runner/self-execution-grant" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "schemaVersion": 1,
    "requestId": "string",
    "operationId": "string",
    "organizationId": "string",
    "projectId": "string",
    "platformId": "pf_console",
    "workspaceId": "string",
    "fleetId": "string",
    "resourceEnvironment": "sandbox",
    "expiresAtMs": 1
  }'

Tenant context

Get the tenant context

GET/v1/iam/tenant-context

iam:readTested with an API keyiam_getTenantContext

The organization, project and platform the IAM token names. A login's organization-context child names no project, so it gets 400 TENANT_REQUIRED; a key gets its bound or requested project. A One account login (the gateway exchanges it at Auth for an organization-context child) or an organization API key with iam:read/iam:write (when the gateway admits keys, IAM_KEYS_ENABLED; Auth mints a short-lived IAM token for the key). The raw credential never reaches IAM.

Responses

  • 200The tenant context, as IAM answers it (the context object itself, not wrapped)
    Response fields
    • organizationIdstringrequired
    • projectIdstringrequired
    • platformIdstringrequired
    • workspaceIdstring
    • fleetIdstring
    • organizationNamestring
    • environmentIdstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/tenant-context" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Select your tenant context

POST/v1/iam/tenant-context

iam:writeiam_selectTenantContext

Select the organization, project, platform, workspace and fleet this login works in (One's sign-in uses it). A One account login only: an organization API key gets 403 IAM_HUMAN_SESSION_REQUIRED. organization_id must be your organization. IAM authorizes the binding for you (the login's subject) and may create your default project when project_id is omitted, so do not retry a request that timed out without reading the context first. The gateway exchanges the login at Auth for an organization-context child and forwards only that; your bearer never reaches IAM. The answer must name the organization and every id you asked for, or it is the gateway's 502.

Request body application/json

  • organization_idstringrequired

    Your organization (the verified login's own) pattern ^o_[A-Za-z0-9_-]{1,128}$

  • project_idstring

    Default: your default project in the organization (IAM creates it when missing)

  • platform_idstring

    e.g. pf_one

  • workspaceIdstring | null
  • workspace_idstring | null

    Same as workspaceId (send one spelling, not both)

  • fleetIdstring | null
  • fleet_idstring | null

    Same as fleetId (send one spelling, not both)

  • environmentId"sandbox" | "live"

Responses

  • 200The selected tenant context, wrapped in tenant
    Response fields
    • tenantobjectrequired
    • tenant.organizationIdstringrequired
    • tenant.projectIdstringrequired
    • tenant.platformIdstringrequired
    • tenant.workspaceIdstring
    • tenant.fleetIdstring
    • tenant.organizationNamestring
    • tenant.environmentIdstring
  • 400Invalid request, or TENANT_REQUIRED: IAM found no organization on the session. The gateway normally binds the organization itself (an Auth organization-context exchange, forwarding only the short-lived child), so this is returned only if IAM still sees none. Nothing is stored and no selected context changes.
  • 401Unauthorized
  • 403IAM_HUMAN_SESSION_REQUIRED (an M2M token, or an API key while keys are not admitted), SCOPE_MISSING (iam:read / iam:write on the key), FORBIDDEN (another organization), IAM_KEY_SCOPE_MISSING or IAM_REFUSED (Auth would not mint an IAM token for the key), or IAM PERMISSION_DENIED / TENANT_MISMATCH
  • 404IAM does not know the organization or project (OrganizationNotFound / ProjectNotFound)
  • 503Service unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/iam/tenant-context" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "string"
  }'

L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support