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:readiam: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 undergenesis.iam- CLI
genesis keys- MCP
- 52 tools; the other 12 through
genesis_call
Operations
| Operation | Endpoint | API key |
|---|---|---|
| Revoke an agent credential | POST/agents/credentials/{credential_id}/revoke | — |
| Enroll an agent | POST/agents/enroll | API keys refused |
| Revoke API key | DELETE/api-keys/{key_id} | Signed-in session |
| Issue a capability | POST/capabilities | Failed with an API key |
| Get a capability | GET/capabilities/{capability_id} | API keys refused |
| Revoke a capability | DELETE/capabilities/{capability_id} | — |
| Update a capability | PATCH/capabilities/{capability_id} | — |
| Verify a capability | POST/capabilities/verify | Tested with an API key |
| Check an entitlement | POST/check-entitlement | Tested with an API key |
| Check a permission | POST/check-permission | Tested with an API key |
| Verify credential | POST/credentials/verify | Tested with an API key |
| List grants | GET/grants | Tested with an API key |
| Create a grant | POST/grants | Tested with an API key |
| Get a grant | GET/grants/{grant_id} | Tested with an API key |
| Delete a grant | DELETE/grants/{grant_id} | Tested with an API key |
| Update a grant | PATCH/grants/{grant_id} | Tested with an API key |
| List organization API keys | GET/organizations/{org_id}/api-keys | Signed-in session |
| Create organization API key | POST/organizations/{org_id}/api-keys | Signed-in session |
| List organizations | GET/orgs | Signed-in session |
| Get an organization | GET/orgs/{org_id} | Tested with an API key |
| Update an organization | PATCH/orgs/{org_id} | Tested with an API key |
| List agent enrollment grants | GET/orgs/{org_id}/agent-enrollment-grants | Signed-in session |
| Create an agent enrollment grant | POST/orgs/{org_id}/agent-enrollment-grants | — |
| Revoke an agent enrollment grant | POST/orgs/{org_id}/agent-enrollment-grants/{grant_id}/revoke | — |
| List agents | GET/orgs/{org_id}/agents | Tested with an API key |
| Register an agent | POST/orgs/{org_id}/agents | Tested with an API key |
| Get an agent | GET/orgs/{org_id}/agents/{agent_did} | Tested with an API key |
| Revoke an agent | DELETE/orgs/{org_id}/agents/{agent_did} | Tested with an API key |
| List agent ACTs | GET/orgs/{org_id}/agents/{agent_did}/acts | Tested with an API key |
| Issue an agent ACT | POST/orgs/{org_id}/agents/{agent_did}/acts | Tested with an API key |
| Resume an agent | POST/orgs/{org_id}/agents/{agent_did}/resume | Tested with an API key |
| Rotate an agent key | POST/orgs/{org_id}/agents/{agent_did}/rotate | Tested with an API key |
| Suspend an agent | POST/orgs/{org_id}/agents/{agent_did}/suspend | Tested with an API key |
| Get an agent's Orbit Msgs product grant | GET/orgs/{org_id}/agents/by-id/{agent_id}/product-grants/orbit-msgs | API keys refused |
| Get an agent's publication state | GET/orgs/{org_id}/agents/by-id/{agent_id}/publication | API keys refused |
| List entitlements | GET/orgs/{org_id}/entitlements | Tested with an API key |
| List fleets | GET/orgs/{org_id}/fleets | Tested with an API key |
| Create a fleet | POST/orgs/{org_id}/fleets | Tested with an API key |
| Get a fleet | GET/orgs/{org_id}/fleets/{fleet_id} | Tested with an API key |
| Delete a fleet | DELETE/orgs/{org_id}/fleets/{fleet_id} | Tested with an API key |
| Update a fleet | PATCH/orgs/{org_id}/fleets/{fleet_id} | Tested with an API key |
| List members | GET/orgs/{org_id}/members | API keys refused |
| List a Mind's enrolled agents | GET/orgs/{org_id}/minds/{mind_id}/agents | Tested with an API key |
| List projects | GET/orgs/{org_id}/projects | Tested with an API key |
| Create a project | POST/orgs/{org_id}/projects | Tested with an API key |
| Get a project | GET/orgs/{org_id}/projects/{project_id} | Tested with an API key |
| Delete a project | DELETE/orgs/{org_id}/projects/{project_id} | Tested with an API key |
| Update a project | PATCH/orgs/{org_id}/projects/{project_id} | Tested with an API key |
| List roles | GET/orgs/{org_id}/roles | Tested with an API key |
| Create a role | POST/orgs/{org_id}/roles | Tested with an API key |
| Get a role | GET/orgs/{org_id}/roles/{role_id} | Tested with an API key |
| Delete a role | DELETE/orgs/{org_id}/roles/{role_id} | Tested with an API key |
| Update a role | PATCH/orgs/{org_id}/roles/{role_id} | Tested with an API key |
| List workspaces | GET/orgs/{org_id}/workspaces | Tested with an API key |
| Create a workspace | POST/orgs/{org_id}/workspaces | Tested with an API key |
| Get a workspace | GET/orgs/{org_id}/workspaces/{workspace_id} | Tested with an API key |
| Delete a workspace | DELETE/orgs/{org_id}/workspaces/{workspace_id} | Tested with an API key |
| Update a workspace | PATCH/orgs/{org_id}/workspaces/{workspace_id} | Tested with an API key |
| List platforms | GET/platforms | Tested with an API key |
| Get a public agent card | GET/public/agents/{agent_id} | Failed with an API key |
| Require a permission | POST/require-permission | Tested with an API key |
| Request scoped Runner self-execution permission | POST/runner/self-execution-grant | — |
| Get the tenant context | GET/tenant-context | Tested with an API key |
| Select your tenant context | POST/tenant-context | — |
Agents
Revoke an agent credential
POST/v1/iam/agents/credentials/{credential_id}/revoke
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
idstringrequiredorganizationIdstringrequiredagentIdstringrevokedAtinteger | 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_revokeAgentCredential', {
credential_id: '<credential_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_revokeAgentCredential",
"arguments": {
"credential_id": "<credential_id>"
}
}
}
}Enroll an agent
POST/v1/iam/agents/enroll
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
grantIdstringOptional with an enrollment key (checked)
externalKeystringrequiredYour stable id for this agent
displayNamestringrequiredmindIdstringrequiredpermissionsstring[]requiredsharedNamespacesstring[]ttlSecondsintegerpublicKeystringThe agent's own Ed25519 public key (multibase), bound at first enrollment
agentCredentialstringRe-enrollment proof: a valid credential of this agent
reenrollmentProofobjectreenrollmentProof.issuedAtintegerrequiredMilliseconds since the epoch
reenrollmentProof.signaturestringrequired
Responses
- 200The enrolled agent and its credential
Response fields
agentobjectrequiredagent.idstringrequiredagent.didstringrequiredagent.displayNamestringagent.statusstringagent.organizationIdstringrequiredagent.projectIdstringcreatedbooleanrequiredcredentialobjectrequiredcredential.idstringrequiredcredential.secretstringrequiredReturned once
credential.mindIdstringcredential.scopesstring[]credential.sharedNamespacesstring[]credential.expiresAtintegerMilliseconds 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": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_enrollAgent', {
body: {
externalKey: 'string',
displayName: 'string',
mindId: 'string',
permissions: [],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_enrollAgent",
"arguments": {
"body": {
"externalKey": "string",
"displayName": "string",
"mindId": "string",
"permissions": []
}
}
}
}
}List agents
GET/v1/iam/orgs/{org_id}/agents
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 · stringrequiredThe organization you are signed in to
Responses
- 200Agents
Response fields
itemsobject[]requireditems[].[].idstringrequireda_<ulid>
items[].[].organizationIdstringrequireditems[].[].didstringrequireddid:oas:<kind>:<ulid>
items[].[].displayNamestringrequireditems[].[].kindstringrequireditems[].[].status"active" | "suspended" | "revoked"requireditems[].[].parentDidstring | nullitems[].[].publicKeystring | nullitems[].[].scopesstring[]requireditems[].[].metadataobject | nullitems[].[].createdAtintegerrequiredMilliseconds since the epoch
items[].[].updatedAtintegerrequiredMilliseconds since the epoch
next_cursorstring | nullagentsobject[]agents[].[].idstringrequireda_<ulid>
agents[].[].organizationIdstringrequiredagents[].[].didstringrequireddid:oas:<kind>:<ulid>
agents[].[].displayNamestringrequiredagents[].[].kindstringrequiredagents[].[].status"active" | "suspended" | "revoked"requiredagents[].[].parentDidstring | nullagents[].[].publicKeystring | nullagents[].[].scopesstring[]requiredagents[].[].metadataobject | nullagents[].[].createdAtintegerrequiredMilliseconds since the epoch
agents[].[].updatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listAgents', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listAgents",
"arguments": {
"org_id": "<org_id>"
}
}
}Register an agent
POST/v1/iam/orgs/{org_id}/agents
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 · stringrequiredThe organization you are signed in to
Request body application/json
displayNamestringrequiredmin length 1 · max length 64
kindstringrequiredOAS entity kind, e.g. agent
scopesstring[]parentDidstringpublicKeystringMultibase public key; omit to have IAM generate a pair
metadataobject
Responses
- 200The registered agent (privateKey only when IAM generated the key)
Response fields
agentobjectrequiredagent.idstringrequireda_<ulid>
agent.organizationIdstringrequiredagent.didstringrequireddid:oas:<kind>:<ulid>
agent.displayNamestringrequiredagent.kindstringrequiredagent.status"active" | "suspended" | "revoked"requiredagent.parentDidstring | nullagent.publicKeystring | nullagent.scopesstring[]requiredagent.metadataobject | nullagent.createdAtintegerrequiredMilliseconds since the epoch
agent.updatedAtintegerrequiredMilliseconds since the epoch
didstringrequiredpublicKeystring | nullprivateKeystring | nullReturned 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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_createAgent', {
org_id: '<org_id>',
body: {
displayName: 'string',
kind: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createAgent",
"arguments": {
"org_id": "<org_id>",
"body": {
"displayName": "string",
"kind": "string"
}
}
}
}Get an agent
GET/v1/iam/orgs/{org_id}/agents/{agent_did}
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 · stringrequiredThe organization you are signed in to
agent_didpath · stringrequiredThe agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the
idevery agent list returns); both name the same agent.
Responses
- 200The agent
Response fields
agentobjectrequiredagent.idstringrequireda_<ulid>
agent.organizationIdstringrequiredagent.didstringrequireddid:oas:<kind>:<ulid>
agent.displayNamestringrequiredagent.kindstringrequiredagent.status"active" | "suspended" | "revoked"requiredagent.parentDidstring | nullagent.publicKeystring | nullagent.scopesstring[]requiredagent.metadataobject | nullagent.createdAtintegerrequiredMilliseconds since the epoch
agent.updatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getAgent', {
org_id: '<org_id>',
agent_did: '<agent_did>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getAgent",
"arguments": {
"org_id": "<org_id>",
"agent_did": "<agent_did>"
}
}
}Revoke an agent
DELETE/v1/iam/orgs/{org_id}/agents/{agent_did}
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 · stringrequiredThe organization you are signed in to
agent_didpath · stringrequiredThe agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the
idevery agent list returns); both name the same agent.
Responses
- 200The revoked agent
Response fields
agentobjectrequiredagent.idstringrequireda_<ulid>
agent.organizationIdstringrequiredagent.didstringrequireddid:oas:<kind>:<ulid>
agent.displayNamestringrequiredagent.kindstringrequiredagent.status"active" | "suspended" | "revoked"requiredagent.parentDidstring | nullagent.publicKeystring | nullagent.scopesstring[]requiredagent.metadataobject | nullagent.createdAtintegerrequiredMilliseconds since the epoch
agent.updatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_deleteAgent', {
org_id: '<org_id>',
agent_did: '<agent_did>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_deleteAgent",
"arguments": {
"org_id": "<org_id>",
"agent_did": "<agent_did>"
}
}
}
}List agent ACTs
GET/v1/iam/orgs/{org_id}/agents/{agent_did}/acts
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 · stringrequiredThe organization you are signed in to
agent_didpath · stringrequiredThe agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the
idevery 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listAgentActs', {
org_id: '<org_id>',
agent_did: '<agent_did>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listAgentActs",
"arguments": {
"org_id": "<org_id>",
"agent_did": "<agent_did>"
}
}
}Issue an agent ACT
POST/v1/iam/orgs/{org_id}/agents/{agent_did}/acts
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 · stringrequiredThe organization you are signed in to
agent_didpath · stringrequiredThe 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[]requiredttlSecondsintegerrequiredmin 60 · max 2592000
Responses
- 200The ACT, returned once
Response fields
idstringrequiredact_<ulid>
actstringrequiredReturned once
scopesstring[]requiredissuedAtstringrequiredexpiresAtstringrequiredsubjectDidstringrequired
- 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
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_issueAgentAct', {
org_id: '<org_id>',
agent_did: '<agent_did>',
body: {
scopes: [],
ttlSeconds: 60,
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_issueAgentAct",
"arguments": {
"org_id": "<org_id>",
"agent_did": "<agent_did>",
"body": {
"scopes": [],
"ttlSeconds": 60
}
}
}
}Resume an agent
POST/v1/iam/orgs/{org_id}/agents/{agent_did}/resume
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 · stringrequiredThe organization you are signed in to
agent_didpath · stringrequiredThe agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the
idevery agent list returns); both name the same agent.
Responses
- 200The active agent
Response fields
agentobjectrequiredagent.idstringrequireda_<ulid>
agent.organizationIdstringrequiredagent.didstringrequireddid:oas:<kind>:<ulid>
agent.displayNamestringrequiredagent.kindstringrequiredagent.status"active" | "suspended" | "revoked"requiredagent.parentDidstring | nullagent.publicKeystring | nullagent.scopesstring[]requiredagent.metadataobject | nullagent.createdAtintegerrequiredMilliseconds since the epoch
agent.updatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_resumeAgent', {
org_id: '<org_id>',
agent_did: '<agent_did>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_resumeAgent",
"arguments": {
"org_id": "<org_id>",
"agent_did": "<agent_did>"
}
}
}Rotate an agent key
POST/v1/iam/orgs/{org_id}/agents/{agent_did}/rotate
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 · stringrequiredThe organization you are signed in to
agent_didpath · stringrequiredThe 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
publicKeystringOmit to have IAM generate a pair
Responses
- 200The new key
Response fields
didstringrequiredpublicKeystring | nullprivateKeystring | 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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_rotateAgentKey', {
org_id: '<org_id>',
agent_did: '<agent_did>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_rotateAgentKey",
"arguments": {
"org_id": "<org_id>",
"agent_did": "<agent_did>",
"body": {}
}
}
}Suspend an agent
POST/v1/iam/orgs/{org_id}/agents/{agent_did}/suspend
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 · stringrequiredThe organization you are signed in to
agent_didpath · stringrequiredThe agent's DID (did:oas:<kind>:<ulid>) or its IAM id (a_<ulid>, the
idevery agent list returns); both name the same agent.
Responses
- 200The suspended agent
Response fields
agentobjectrequiredagent.idstringrequireda_<ulid>
agent.organizationIdstringrequiredagent.didstringrequireddid:oas:<kind>:<ulid>
agent.displayNamestringrequiredagent.kindstringrequiredagent.status"active" | "suspended" | "revoked"requiredagent.parentDidstring | nullagent.publicKeystring | nullagent.scopesstring[]requiredagent.metadataobject | nullagent.createdAtintegerrequiredMilliseconds since the epoch
agent.updatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_suspendAgent', {
org_id: '<org_id>',
agent_did: '<agent_did>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_suspendAgent",
"arguments": {
"org_id": "<org_id>",
"agent_did": "<agent_did>"
}
}
}Get an agent's Orbit Msgs product grant
GET/v1/iam/orgs/{org_id}/agents/by-id/{agent_id}/product-grants/orbit-msgs
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 · stringrequiredThe organization you are signed in to
agent_idpath · stringrequiredThe agent principal id (a_<ulid>)
Responses
- 200The grant state
Response fields
schemaVersionintegerrequestIdstringagentIdstringrequiredorganizationIdstringrequiredprofilestringownerGenerationintegergrantobject | nullgrant.grantIdstringgrant.grantVersionintegergrant.actionsstring[]grant.expiresAtMsintegerMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getOrbitMsgsProductGrant', {
org_id: '<org_id>',
agent_id: '<agent_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getOrbitMsgsProductGrant",
"arguments": {
"org_id": "<org_id>",
"agent_id": "<agent_id>"
}
}
}Get an agent's publication state
GET/v1/iam/orgs/{org_id}/agents/by-id/{agent_id}/publication
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 · stringrequiredThe organization you are signed in to
agent_idpath · stringrequiredThe agent principal id (a_<ulid>)
Responses
- 200The publication state
Response fields
agentIdstringrequiredstate"private" | "published" | "withdrawn"requiredversionintegerrequired
- 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getAgentPublication', {
org_id: '<org_id>',
agent_id: '<agent_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getAgentPublication",
"arguments": {
"org_id": "<org_id>",
"agent_id": "<agent_id>"
}
}
}Api keys
Revoke API key
DELETE/v1/iam/api-keys/{key_id}
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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_revokeApiKey', {
key_id: '<key_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_revokeApiKey",
"arguments": {
"key_id": "<key_id>"
}
}
}List organization API keys
GET/v1/iam/organizations/{org_id}/api-keys
Parameters
org_idpath · stringrequired
Responses
- 200List of API keys
Response fields
object"list"requireddataobject[]requireddata[].[].idstringrequireddata[].[].namestringrequireddata[].[].obfuscated_valuestringrequireddata[].[].scopesstring[]requireddata[].[].last_used_atstring | null (date-time)data[].[].expires_atstring | null (date-time)data[].[].created_atstring (date-time)requireddata[].[].updated_atstring (date-time)requireddata[].[].bindingobjectdata[].[].binding.organizationIdstringrequireddata[].[].binding.projectIdstringrequireddata[].[].binding.platformIdstringrequireddata[].[].binding.workspaceIdstring | nulldata[].[].binding.fleetIdstring | nulldata[].[].binding.resourceEnvironment"sandbox" | "live"requireddata[].[].binding.source"key" | "organization_default"requiredkey: 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listOrgApiKeys', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listOrgApiKeys",
"arguments": {
"org_id": "<org_id>"
}
}
}Create organization API key
POST/v1/iam/organizations/{org_id}/api-keys
Requires org admin or owner role. The full key value is only returned once (custody=reveal).
Parameters
org_idpath · stringrequired
Request body application/json
namestringrequiredmin length 1 · max length 255
scopesstring[]custody"reveal" | "blinds"default
"reveal"expires_atstring (date-time)bindingobjectThe 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.projectIdstringpattern
^pr_[A-Za-z0-9_-]{1,125}$binding.workspaceIdstringpattern
^w_[A-Za-z0-9_-]{1,126}$binding.resourceEnvironment"sandbox" | "live"
Responses
- 201API key created
Response fields
idstringrequirednamestringrequiredobfuscated_valuestringrequiredvaluestring | nullblinds_credential_refstring | nullscopesstring[]requiredexpires_atstring | null (date-time)created_atstring (date-time)requiredbindingobjectbinding.organizationIdstringrequiredbinding.projectIdstringrequiredbinding.platformIdstringrequiredbinding.workspaceIdstring | nullbinding.fleetIdstring | nullbinding.resourceEnvironment"sandbox" | "live"requiredbinding.source"key" | "organization_default"requiredkey: 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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_createOrgApiKey', {
org_id: '<org_id>',
body: {
name: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createOrgApiKey",
"arguments": {
"org_id": "<org_id>",
"body": {
"name": "string"
}
}
}
}Capabilities
Issue a capability
POST/v1/iam/capabilities
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 · stringOptional; IAM replays the first result for it
Request body application/json
subject_principal_idstringrequiredorganization_idstringrequiredYour organization
permissionsstring[]requiredconstraintsobjectconstraints.expires_atintegerMilliseconds since the epoch
constraints.max_invocationsintegermin 0
constraints.max_spend_minorintegerconstraints.spend_currencystringconstraints.resource_idsstring[]constraints.environment_idsstring[]constraints.http_methodsstring[]constraints.not_beforeintegerMilliseconds since the epoch
issuer_principal_idstringOptional; must be the caller
Responses
- 200The capability
Response fields
idstringrequiredc_<ulid>
issuer_principal_idstringrequiredsubject_principal_idstringrequiredorganization_idstringrequiredpermissionsstring[]requiredconstraintsobjectrequiredconstraints.expires_atintegerMilliseconds since the epoch
constraints.max_invocationsintegermin 0
constraints.max_spend_minorintegerconstraints.spend_currencystringconstraints.resource_idsstring[]constraints.environment_idsstring[]constraints.http_methodsstring[]constraints.not_beforeintegerMilliseconds since the epoch
created_atintegerrequiredMilliseconds since the epoch
revoked_atintegerMilliseconds 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": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('iam_createCapability', {
body: {
subject_principal_id: 'string',
organization_id: 'string',
permissions: [],
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createCapability",
"arguments": {
"body": {
"subject_principal_id": "string",
"organization_id": "string",
"permissions": []
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a capability
GET/v1/iam/capabilities/{capability_id}
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
idstringrequiredc_<ulid>
issuer_principal_idstringrequiredsubject_principal_idstringrequiredorganization_idstringrequiredpermissionsstring[]requiredconstraintsobjectrequiredconstraints.expires_atintegerMilliseconds since the epoch
constraints.max_invocationsintegermin 0
constraints.max_spend_minorintegerconstraints.spend_currencystringconstraints.resource_idsstring[]constraints.environment_idsstring[]constraints.http_methodsstring[]constraints.not_beforeintegerMilliseconds since the epoch
created_atintegerrequiredMilliseconds since the epoch
revoked_atintegerMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getCapability', {
capability_id: '<capability_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getCapability",
"arguments": {
"capability_id": "<capability_id>"
}
}
}Revoke a capability
DELETE/v1/iam/capabilities/{capability_id}
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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_deleteCapability', {
capability_id: '<capability_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_deleteCapability",
"arguments": {
"capability_id": "<capability_id>",
"body": {}
}
}
}
}Update a capability
PATCH/v1/iam/capabilities/{capability_id}
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[]requiredconstraintsobjectrequiredconstraints.expires_atintegerMilliseconds since the epoch
constraints.max_invocationsintegermin 0
constraints.max_spend_minorintegerconstraints.spend_currencystringconstraints.resource_idsstring[]constraints.environment_idsstring[]constraints.http_methodsstring[]constraints.not_beforeintegerMilliseconds since the epoch
Responses
- 200The updated capability
Response fields
idstringrequiredc_<ulid>
issuer_principal_idstringrequiredsubject_principal_idstringrequiredorganization_idstringrequiredpermissionsstring[]requiredconstraintsobjectrequiredconstraints.expires_atintegerMilliseconds since the epoch
constraints.max_invocationsintegermin 0
constraints.max_spend_minorintegerconstraints.spend_currencystringconstraints.resource_idsstring[]constraints.environment_idsstring[]constraints.http_methodsstring[]constraints.not_beforeintegerMilliseconds since the epoch
created_atintegerrequiredMilliseconds since the epoch
revoked_atintegerMilliseconds 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": {}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_updateCapability', {
capability_id: '<capability_id>',
body: {
permissions: [],
constraints: {},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_updateCapability",
"arguments": {
"capability_id": "<capability_id>",
"body": {
"permissions": [],
"constraints": {}
}
}
}
}Verify a capability
POST/v1/iam/capabilities/verify
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
idstringrequiredc_<ulid>
expectedobjectexpected.permissionstringexpected.organization_idstringexpected.environmentId"live" | "sandbox"
Responses
- 200The verification
Response fields
validbooleanrequiredgrantobjectgrant.idstringrequiredc_<ulid>
grant.issuer_principal_idstringrequiredgrant.subject_principal_idstringrequiredgrant.organization_idstringrequiredgrant.permissionsstring[]requiredgrant.constraintsobjectrequiredgrant.constraints.expires_atintegerMilliseconds since the epoch
grant.constraints.max_invocationsintegermin 0
grant.constraints.max_spend_minorintegergrant.constraints.spend_currencystringgrant.constraints.resource_idsstring[]grant.constraints.environment_idsstring[]grant.constraints.http_methodsstring[]grant.constraints.not_beforeintegerMilliseconds since the epoch
grant.created_atintegerrequiredMilliseconds since the epoch
grant.revoked_atintegerMilliseconds since the epoch
grant.revoke_reasonstringreason_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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_verifyCapability', {
body: {
id: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_verifyCapability",
"arguments": {
"body": {
"id": "string"
}
}
}
}Check entitlement
Check an entitlement
POST/v1/iam/check-entitlement
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_idstringrequiredYour organization
keystringrequiredenvironment_id"live" | "sandbox"
Responses
- 200The entitlement
Response fields
keystringrequiredorganization_idstringrequiredenabledbooleanrequiredquotainteger | nullremaininginteger | nullevaluated_atintegerMilliseconds since the epoch
sourcestringenvironmentIdstring
- 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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_checkEntitlement', {
body: {
organization_id: 'string',
key: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_checkEntitlement",
"arguments": {
"body": {
"organization_id": "string",
"key": "string"
}
}
}
}Check permission
Check a permission
POST/v1/iam/check-permission
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
principalIdstringDefault: the caller
permissionstringrequirede.g. iam.fleets.read
tenantContextobjectrequiredtenantContext.organizationIdstringrequiredYour organization
tenantContext.projectIdstringrequiredtenantContext.platformIdstringrequiredtenantContext.workspaceIdstringtenantContext.fleetIdstringtenantContext.environmentId"live" | "sandbox"
Responses
- 200The decision
Response fields
allowedbooleanrequiredevaluated_atintegerMilliseconds since the epoch
viastringenvironmentIdstring
- 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"
}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_checkPermission', {
body: {
permission: 'string',
tenantContext: {
organizationId: 'string',
projectId: 'string',
platformId: 'string',
},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_checkPermission",
"arguments": {
"body": {
"permission": "string",
"tenantContext": {
"organizationId": "string",
"projectId": "string",
"platformId": "string"
}
}
}
}
}Credentials
Verify credential
POST/v1/iam/credentials/verify
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"requiredorgstringrequiredprincipalstring | nullscopesstring[]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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_verifyCredential', {
body: {
credential_value: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_verifyCredential",
"arguments": {
"body": {
"credential_value": "string"
}
}
}
}Grants
List grants
GET/v1/iam/grants
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 · stringorganization_idquery · stringproject_idquery · stringplatform_idquery · stringworkspace_idquery · string
Responses
- 200Grants
Response fields
itemsobject[]requireditems[].[].idstringrequiredg_<ulid>
items[].[].principal_idstringrequireditems[].[].organization_idstringrequireditems[].[].project_idstringitems[].[].platform_idstringitems[].[].workspace_idstringitems[].[].environmentId"live" | "sandbox"items[].[].role_idsstring[]requireditems[].[].permissionsstring[]items[].[].expires_atintegerMilliseconds since the epoch
items[].[].metadataobjectitems[].[].created_atintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listGrants'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listGrants",
"arguments": {}
}
}Create a grant
POST/v1/iam/grants
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 · stringOptional; IAM replays the first result for it
Request body application/json
principal_idstringrequiredorganization_idstringrequiredYour organization
project_idstringplatform_idstringworkspace_idstringenvironment_id"live" | "sandbox"role_idsstring[]requiredpermissionsstring[]expires_atintegerMilliseconds since the epoch
Responses
- 200The created grant
Response fields
idstringrequiredg_<ulid>
principal_idstringrequiredorganization_idstringrequiredproject_idstringplatform_idstringworkspace_idstringenvironmentId"live" | "sandbox"role_idsstring[]requiredpermissionsstring[]expires_atintegerMilliseconds since the epoch
metadataobjectcreated_atintegerrequiredMilliseconds 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": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('iam_createGrant', {
body: {
principal_id: 'string',
organization_id: 'string',
role_ids: [],
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createGrant",
"arguments": {
"body": {
"principal_id": "string",
"organization_id": "string",
"role_ids": []
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a grant
GET/v1/iam/grants/{grant_id}
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
idstringrequiredg_<ulid>
principal_idstringrequiredorganization_idstringrequiredproject_idstringplatform_idstringworkspace_idstringenvironmentId"live" | "sandbox"role_idsstring[]requiredpermissionsstring[]expires_atintegerMilliseconds since the epoch
metadataobjectcreated_atintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getGrant', {
grant_id: '<grant_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getGrant",
"arguments": {
"grant_id": "<grant_id>"
}
}
}Delete a grant
DELETE/v1/iam/grants/{grant_id}
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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_deleteGrant', {
grant_id: '<grant_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_deleteGrant",
"arguments": {
"grant_id": "<grant_id>"
}
}
}
}Update a grant
PATCH/v1/iam/grants/{grant_id}
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_atintegerMilliseconds since the epoch
metadataobjectenvironment_id"live" | "sandbox"
Responses
- 200The updated grant
Response fields
idstringrequiredg_<ulid>
principal_idstringrequiredorganization_idstringrequiredproject_idstringplatform_idstringworkspace_idstringenvironmentId"live" | "sandbox"role_idsstring[]requiredpermissionsstring[]expires_atintegerMilliseconds since the epoch
metadataobjectcreated_atintegerrequiredMilliseconds 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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_updateGrant', {
grant_id: '<grant_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_updateGrant",
"arguments": {
"grant_id": "<grant_id>",
"body": {}
}
}
}Orgs
List organizations
GET/v1/iam/orgs
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 · stringlimitquery · integer
Responses
- 200Organizations
Response fields
itemsobject[]requireditems[].[].idstringrequiredo_<ulid>
items[].[].namestringrequireditems[].[].slugstringrequireditems[].[].owner_human_principal_idstringitems[].[].metadataobjectitems[].[].created_atintegerrequiredMilliseconds since the epoch
items[].[].rolestringYour 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listOrgs'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listOrgs",
"arguments": {}
}
}Get an organization
GET/v1/iam/orgs/{org_id}
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 · stringrequiredThe organization you are signed in to
Responses
- 200The organization
Response fields
idstringrequiredo_<ulid>
namestringrequiredslugstringrequiredowner_human_principal_idstringmetadataobjectcreated_atintegerrequiredMilliseconds since the epoch
rolestringYour 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getOrg', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getOrg",
"arguments": {
"org_id": "<org_id>"
}
}
}Update an organization
PATCH/v1/iam/orgs/{org_id}
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 · stringrequiredThe organization you are signed in to
Request body application/json
namestringslugstringmetadataobjectMerged into the existing metadata
Responses
- 200The updated organization
Response fields
idstringrequiredo_<ulid>
namestringrequiredslugstringrequiredowner_human_principal_idstringmetadataobjectcreated_atintegerrequiredMilliseconds since the epoch
rolestringYour 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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_updateOrg', {
org_id: '<org_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_updateOrg",
"arguments": {
"org_id": "<org_id>",
"body": {}
}
}
}Agent enrollment grants
List agent enrollment grants
GET/v1/iam/orgs/{org_id}/agent-enrollment-grants
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 · stringrequiredThe organization you are signed in to
Responses
- 200Grants
Response fields
itemsobject[]requireditems[].[].idstringrequiredaeg_<ulid>
items[].[].organizationIdstringrequireditems[].[].projectIdstringrequireditems[].[].parentPrincipalIdstringrequireditems[].[].mindIdsstring[]requireditems[].[].permissionsstring[]requireditems[].[].sharedNamespacesstring[]items[].[].maxAgentsintegeritems[].[].maxCredentialTtlSecondsintegeritems[].[].createdByPrincipalIdstringitems[].[].createdAtintegerMilliseconds since the epoch
items[].[].expiresAtinteger | nullitems[].[].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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listAgentEnrollmentGrants', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listAgentEnrollmentGrants",
"arguments": {
"org_id": "<org_id>"
}
}
}Create an agent enrollment grant
POST/v1/iam/orgs/{org_id}/agent-enrollment-grants
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 · stringrequiredThe organization you are signed in to
Idempotency-Keyheader · stringrequired
Request body application/json
parentPrincipalIdstringrequiredThe application's service principal (s_...) in this organization
projectIdstringrequiredpattern
^pr_[A-Za-z0-9_-]{1,128}$mindIdsstring[]requiredpermissions"minds.agent_data.read" | "minds.agent_data.write"[]requiredsharedNamespacesstring[]Group namespaces (group:agp_...) the enrolled agents may share
maxAgentsintegerrequiredmin 1 · max 10000
maxCredentialTtlSecondsintegerrequiredmin 60 · max 7776000
expiresAtintegerMilliseconds since the epoch; in the future
returningAgentProof"required" | "trusted_parent"default
"required"
Responses
- 200The grant, and its enrollment key (returned once)
Response fields
grantobjectrequiredgrant.idstringrequiredaeg_<ulid>
grant.organizationIdstringrequiredgrant.projectIdstringrequiredgrant.parentPrincipalIdstringrequiredgrant.mindIdsstring[]requiredgrant.permissionsstring[]requiredgrant.sharedNamespacesstring[]grant.maxAgentsintegergrant.maxCredentialTtlSecondsintegergrant.createdByPrincipalIdstringgrant.createdAtintegerMilliseconds since the epoch
grant.expiresAtinteger | nullgrant.revokedAtinteger | nullenrollmentKeystringrequiredmek_... 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
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('iam_createAgentEnrollmentGrant', {
org_id: '<org_id>',
body: {
parentPrincipalId: 'string',
projectId: 'string',
mindIds: [
'string',
],
permissions: [
'minds.agent_data.read',
],
maxAgents: 1,
maxCredentialTtlSeconds: 60,
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_createAgentEnrollmentGrant",
"arguments": {
"org_id": "<org_id>",
"body": {
"parentPrincipalId": "string",
"projectId": "string",
"mindIds": [
"string"
],
"permissions": [
"minds.agent_data.read"
],
"maxAgents": 1,
"maxCredentialTtlSeconds": 60
},
"idempotency_key": "<a stable key per change>"
}
}
}
}Revoke an agent enrollment grant
POST/v1/iam/orgs/{org_id}/agent-enrollment-grants/{grant_id}/revoke
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 · stringrequiredThe organization you are signed in to
grant_idpath · stringrequired
Responses
- 200The revoked grant
Response fields
idstringrequiredaeg_<ulid>
organizationIdstringrequiredprojectIdstringrequiredparentPrincipalIdstringrequiredmindIdsstring[]requiredpermissionsstring[]requiredsharedNamespacesstring[]maxAgentsintegermaxCredentialTtlSecondsintegercreatedByPrincipalIdstringcreatedAtintegerMilliseconds since the epoch
expiresAtinteger | nullrevokedAtinteger | 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_revokeAgentEnrollmentGrant', {
org_id: '<org_id>',
grant_id: '<grant_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_revokeAgentEnrollmentGrant",
"arguments": {
"org_id": "<org_id>",
"grant_id": "<grant_id>"
}
}
}
}Entitlements
List entitlements
GET/v1/iam/orgs/{org_id}/entitlements
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 · stringrequiredThe organization you are signed in to
environment_idquery · "live" | "sandbox"live (default) or sandbox
Responses
- 200Entitlements
Response fields
itemsobject[]requireditems[].[].keystringrequireditems[].[].organization_idstringrequireditems[].[].enabledbooleanrequireditems[].[].quotainteger | nullitems[].[].remaininginteger | nullitems[].[].evaluated_atintegerMilliseconds since the epoch
items[].[].sourcestringitems[].[].environmentIdstringnext_cursorstring | nullsnapshotVersionanysnapshotGeneratedAtanysnapshotValidUntilanyenvironmentIdstring
- 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listEntitlements', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listEntitlements",
"arguments": {
"org_id": "<org_id>"
}
}
}Fleets
List fleets
GET/v1/iam/orgs/{org_id}/fleets
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 · stringrequiredThe organization you are signed in to
Responses
- 200Fleets
Response fields
itemsobject[]requireditems[].[].idstringrequiredfl_<ulid>
items[].[].organizationIdstringrequireditems[].[].projectIdstringitems[].[].workspaceIdstringitems[].[].namestringrequireditems[].[].slugstringrequireditems[].[].metadataobjectitems[].[].createdAtintegerrequiredMilliseconds since the epoch
items[].[].updatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listFleets', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listFleets",
"arguments": {
"org_id": "<org_id>"
}
}
}Create a fleet
POST/v1/iam/orgs/{org_id}/fleets
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 · stringrequiredThe organization you are signed in to
Idempotency-Keyheader · stringrequiredStable key; IAM replays the first result for it
Request body application/json
namestringrequiredslugstringrequiredUnique within the organization
project_idstringworkspace_idstringmetadataobject
Responses
- 200The created fleet
Response fields
idstringrequiredfl_<ulid>
organizationIdstringrequiredprojectIdstringworkspaceIdstringnamestringrequiredslugstringrequiredmetadataobjectcreatedAtintegerrequiredMilliseconds since the epoch
updatedAtintegerrequiredMilliseconds 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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('iam_createFleet', {
org_id: '<org_id>',
body: {
name: 'string',
slug: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createFleet",
"arguments": {
"org_id": "<org_id>",
"body": {
"name": "string",
"slug": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a fleet
GET/v1/iam/orgs/{org_id}/fleets/{fleet_id}
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 · stringrequiredThe organization you are signed in to
fleet_idpath · stringrequired
Responses
- 200The fleet
Response fields
idstringrequiredfl_<ulid>
organizationIdstringrequiredprojectIdstringworkspaceIdstringnamestringrequiredslugstringrequiredmetadataobjectcreatedAtintegerrequiredMilliseconds since the epoch
updatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getFleet', {
org_id: '<org_id>',
fleet_id: '<fleet_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getFleet",
"arguments": {
"org_id": "<org_id>",
"fleet_id": "<fleet_id>"
}
}
}Delete a fleet
DELETE/v1/iam/orgs/{org_id}/fleets/{fleet_id}
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 · stringrequiredThe 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_deleteFleet', {
org_id: '<org_id>',
fleet_id: '<fleet_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_deleteFleet",
"arguments": {
"org_id": "<org_id>",
"fleet_id": "<fleet_id>"
}
}
}
}Update a fleet
PATCH/v1/iam/orgs/{org_id}/fleets/{fleet_id}
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 · stringrequiredThe organization you are signed in to
fleet_idpath · stringrequired
Request body application/json
namestringslugstringmetadataobjectMerged into the existing metadata
Responses
- 200The updated fleet
Response fields
idstringrequiredfl_<ulid>
organizationIdstringrequiredprojectIdstringworkspaceIdstringnamestringrequiredslugstringrequiredmetadataobjectcreatedAtintegerrequiredMilliseconds since the epoch
updatedAtintegerrequiredMilliseconds 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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_updateFleet', {
org_id: '<org_id>',
fleet_id: '<fleet_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_updateFleet",
"arguments": {
"org_id": "<org_id>",
"fleet_id": "<fleet_id>",
"body": {}
}
}
}Members
List members
GET/v1/iam/orgs/{org_id}/members
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 · stringrequiredThe organization you are signed in to
cursorquery · stringlimitquery · integer
Responses
- 200Members
Response fields
itemsobject[]requireditems[].[].idstringrequireditems[].[].principalIdstringrequiredh_<id>
items[].[].organizationIdstringrequireditems[].[].displayNamestring | nullitems[].[].emailstring | nullitems[].[].accountStatusstringrequireditems[].[].rolestringrequireditems[].[].joinedAtinteger | nulltotalintegernextCursorstring | nullcompletebooleancanManageMembersboolean
- 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listMembers', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listMembers",
"arguments": {
"org_id": "<org_id>"
}
}
}Minds
List a Mind's enrolled agents
GET/v1/iam/orgs/{org_id}/minds/{mind_id}/agents
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 · stringrequiredThe organization you are signed in to
mind_idpath · stringrequired
Responses
- 200Agents
Response fields
itemsobject[]requireditems[].[].agentobjectrequireditems[].[].agent.idstringrequireda_<ulid>
items[].[].agent.organizationIdstringrequireditems[].[].agent.didstringrequireddid:oas:<kind>:<ulid>
items[].[].agent.displayNamestringrequireditems[].[].agent.kindstringrequireditems[].[].agent.status"active" | "suspended" | "revoked"requireditems[].[].agent.parentDidstring | nullitems[].[].agent.publicKeystring | nullitems[].[].agent.scopesstring[]requireditems[].[].agent.metadataobject | nullitems[].[].agent.createdAtintegerrequiredMilliseconds since the epoch
items[].[].agent.updatedAtintegerrequiredMilliseconds since the epoch
items[].[].mindIdstringrequireditems[].[].scopesstring[]items[].[].sharedNamespacesstring[]items[].[].credentialExpiresAtintegerMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listMindAgents', {
org_id: '<org_id>',
mind_id: '<mind_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listMindAgents",
"arguments": {
"org_id": "<org_id>",
"mind_id": "<mind_id>"
}
}
}Projects
List projects
GET/v1/iam/orgs/{org_id}/projects
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 · stringrequiredThe organization you are signed in to
Responses
- 200Projects
Response fields
itemsobject[]requireditems[].[].idstringrequiredpr_<ulid>
items[].[].organization_idstringrequireditems[].[].namestringrequireditems[].[].slugstringrequiredUnique within the organization
items[].[].metadataobjectitems[].[].created_atintegerrequiredMilliseconds since the epoch
next_cursorstring | nullAlways 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listProjects', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listProjects",
"arguments": {
"org_id": "<org_id>"
}
}
}Create a project
POST/v1/iam/orgs/{org_id}/projects
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 · stringrequiredThe organization you are signed in to
Idempotency-Keyheader · stringrequiredStable key; IAM replays the first result for it
Request body application/json
namestringrequiredslugstringrequiredUnique within the organization
metadataobject
Responses
- 200The created project
Response fields
idstringrequiredpr_<ulid>
organization_idstringrequirednamestringrequiredslugstringrequiredUnique within the organization
metadataobjectcreated_atintegerrequiredMilliseconds 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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('iam_createProject', {
org_id: '<org_id>',
body: {
name: 'string',
slug: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createProject",
"arguments": {
"org_id": "<org_id>",
"body": {
"name": "string",
"slug": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a project
GET/v1/iam/orgs/{org_id}/projects/{project_id}
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 · stringrequiredThe organization you are signed in to
project_idpath · stringrequired
Responses
- 200The project
Response fields
idstringrequiredpr_<ulid>
organization_idstringrequirednamestringrequiredslugstringrequiredUnique within the organization
metadataobjectcreated_atintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getProject', {
org_id: '<org_id>',
project_id: '<project_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getProject",
"arguments": {
"org_id": "<org_id>",
"project_id": "<project_id>"
}
}
}Delete a project
DELETE/v1/iam/orgs/{org_id}/projects/{project_id}
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 · stringrequiredThe 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_deleteProject', {
org_id: '<org_id>',
project_id: '<project_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_deleteProject",
"arguments": {
"org_id": "<org_id>",
"project_id": "<project_id>"
}
}
}
}Update a project
PATCH/v1/iam/orgs/{org_id}/projects/{project_id}
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 · stringrequiredThe organization you are signed in to
project_idpath · stringrequired
Request body application/json
namestringslugstringmetadataobjectMerged into the existing metadata
Responses
- 200The updated project
Response fields
idstringrequiredpr_<ulid>
organization_idstringrequirednamestringrequiredslugstringrequiredUnique within the organization
metadataobjectcreated_atintegerrequiredMilliseconds 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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_updateProject', {
org_id: '<org_id>',
project_id: '<project_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_updateProject",
"arguments": {
"org_id": "<org_id>",
"project_id": "<project_id>",
"body": {}
}
}
}Roles
List roles
GET/v1/iam/orgs/{org_id}/roles
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 · stringrequiredThe organization you are signed in to
Responses
- 200Roles
Response fields
itemsobject[]requireditems[].[].idstringrequiredr_<ulid> or r_system_*
items[].[].organization_idstringAbsent on system roles
items[].[].namestringrequireditems[].[].descriptionstringitems[].[].permissionsstring[]requireditems[].[].metadataobjectnext_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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listRoles', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listRoles",
"arguments": {
"org_id": "<org_id>"
}
}
}Create a role
POST/v1/iam/orgs/{org_id}/roles
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 · stringrequiredThe organization you are signed in to
Request body application/json
namestringrequireddescriptionstringpermissionsstring[]required
Responses
- 200The created role
Response fields
idstringrequiredr_<ulid> or r_system_*
organization_idstringAbsent on system roles
namestringrequireddescriptionstringpermissionsstring[]requiredmetadataobject
- 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": []
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_createRole', {
org_id: '<org_id>',
body: {
name: 'string',
permissions: [],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createRole",
"arguments": {
"org_id": "<org_id>",
"body": {
"name": "string",
"permissions": []
}
}
}
}Get a role
GET/v1/iam/orgs/{org_id}/roles/{role_id}
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 · stringrequiredThe organization you are signed in to
role_idpath · stringrequired
Responses
- 200The role
Response fields
idstringrequiredr_<ulid> or r_system_*
organization_idstringAbsent on system roles
namestringrequireddescriptionstringpermissionsstring[]requiredmetadataobject
- 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getRole', {
org_id: '<org_id>',
role_id: '<role_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getRole",
"arguments": {
"org_id": "<org_id>",
"role_id": "<role_id>"
}
}
}Delete a role
DELETE/v1/iam/orgs/{org_id}/roles/{role_id}
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 · stringrequiredThe 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_deleteRole', {
org_id: '<org_id>',
role_id: '<role_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_deleteRole",
"arguments": {
"org_id": "<org_id>",
"role_id": "<role_id>"
}
}
}
}Update a role
PATCH/v1/iam/orgs/{org_id}/roles/{role_id}
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 · stringrequiredThe organization you are signed in to
role_idpath · stringrequired
Request body application/json
namestringdescriptionstringpermissionsstring[]metadataobject
Responses
- 200The updated role
Response fields
idstringrequiredr_<ulid> or r_system_*
organization_idstringAbsent on system roles
namestringrequireddescriptionstringpermissionsstring[]requiredmetadataobject
- 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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_updateRole', {
org_id: '<org_id>',
role_id: '<role_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_updateRole",
"arguments": {
"org_id": "<org_id>",
"role_id": "<role_id>",
"body": {}
}
}
}Workspaces
List workspaces
GET/v1/iam/orgs/{org_id}/workspaces
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 · stringrequiredThe organization you are signed in to
Responses
- 200Workspaces
Response fields
itemsobject[]requireditems[].[].idstringrequiredw_<ulid>
items[].[].organizationIdstringrequireditems[].[].projectIdstringThe project this workspace belongs to, when it has one
items[].[].namestringrequireditems[].[].metadataobjectitems[].[].createdAtintegerrequiredMilliseconds since the epoch
next_cursorstring | nullAlways 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listWorkspaces', {
org_id: '<org_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listWorkspaces",
"arguments": {
"org_id": "<org_id>"
}
}
}Create a workspace
POST/v1/iam/orgs/{org_id}/workspaces
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 · stringrequiredThe organization you are signed in to
Idempotency-Keyheader · stringrequiredStable key; IAM replays the first result for it
Request body application/json
namestringrequiredproject_idstringOptional pr_ id in the same organization (IAM also accepts projectId)
Responses
- 200The created workspace
Response fields
idstringrequiredw_<ulid>
organizationIdstringrequiredprojectIdstringThe project this workspace belongs to, when it has one
namestringrequiredmetadataobjectcreatedAtintegerrequiredMilliseconds 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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('iam_createWorkspace', {
org_id: '<org_id>',
body: {
name: 'string',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_createWorkspace",
"arguments": {
"org_id": "<org_id>",
"body": {
"name": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a workspace
GET/v1/iam/orgs/{org_id}/workspaces/{workspace_id}
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 · stringrequiredThe organization you are signed in to
workspace_idpath · stringrequired
Responses
- 200The workspace
Response fields
idstringrequiredw_<ulid>
organizationIdstringrequiredprojectIdstringThe project this workspace belongs to, when it has one
namestringrequiredmetadataobjectcreatedAtintegerrequiredMilliseconds 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getWorkspace', {
org_id: '<org_id>',
workspace_id: '<workspace_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getWorkspace",
"arguments": {
"org_id": "<org_id>",
"workspace_id": "<workspace_id>"
}
}
}Delete a workspace
DELETE/v1/iam/orgs/{org_id}/workspaces/{workspace_id}
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 · stringrequiredThe 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_deleteWorkspace', {
org_id: '<org_id>',
workspace_id: '<workspace_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_deleteWorkspace",
"arguments": {
"org_id": "<org_id>",
"workspace_id": "<workspace_id>"
}
}
}
}Update a workspace
PATCH/v1/iam/orgs/{org_id}/workspaces/{workspace_id}
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 · stringrequiredThe organization you are signed in to
workspace_idpath · stringrequired
Request body application/json
namestringmetadataobjectMerged into the existing metadata
Responses
- 200The updated workspace
Response fields
idstringrequiredw_<ulid>
organizationIdstringrequiredprojectIdstringThe project this workspace belongs to, when it has one
namestringrequiredmetadataobjectcreatedAtintegerrequiredMilliseconds 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 '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_updateWorkspace', {
org_id: '<org_id>',
workspace_id: '<workspace_id>',
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_updateWorkspace",
"arguments": {
"org_id": "<org_id>",
"workspace_id": "<workspace_id>",
"body": {}
}
}
}Platforms
List platforms
GET/v1/iam/platforms
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[]requireditems[].[].idstringrequiredpf_<key>
items[].[].keystringrequireditems[].[].namestringrequireditems[].[].metadataobjectnext_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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_listPlatforms'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_listPlatforms",
"arguments": {}
}
}Public
Get a public agent card
GET/v1/iam/public/agents/{agent_id}
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 · stringrequiredThe agent principal id (a_<ulid>)
Responses
- 200The public card
Response fields
schemaVersionintegerprincipalIdstringrequiredkindstringrequiredpublicationVersionintegercanonicalAgentDidstringhandlestring | nullhandleStatusstringcontactobjectoperatingCompanyobject | null
- 400Bad request
- 404Not found
- 503Service unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/iam/public/agents/$AGENT_ID"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getPublicAgent', {
agent_id: '<agent_id>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getPublicAgent",
"arguments": {
"agent_id": "<agent_id>"
}
}
}Require permission
Require a permission
POST/v1/iam/require-permission
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
principalIdstringDefault: the caller
permissionstringrequirede.g. iam.fleets.read
tenantContextobjectrequiredtenantContext.organizationIdstringrequiredYour organization
tenantContext.projectIdstringrequiredtenantContext.platformIdstringrequiredtenantContext.workspaceIdstringtenantContext.fleetIdstringtenantContext.environmentId"live" | "sandbox"
Responses
- 200The allowing decision
Response fields
allowedbooleanrequiredevaluated_atintegerMilliseconds since the epoch
viastringenvironmentIdstring
- 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"
}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_requirePermission', {
body: {
permission: 'string',
tenantContext: {
organizationId: 'string',
projectId: 'string',
platformId: 'string',
},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_requirePermission",
"arguments": {
"body": {
"permission": "string",
"tenantContext": {
"organizationId": "string",
"projectId": "string",
"platformId": "string"
}
}
}
}
}Runner
Request scoped Runner self-execution permission
POST/v1/iam/runner/self-execution-grant
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)requiredExact body operationId
x-request-idheader · string (uuid)requiredExact body requestId; the gateway translates it to the native correlation header
Request body application/json
schemaVersion1requiredrequestIdstringrequiredpattern
^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$operationIdstringrequiredpattern
^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$organizationIdstringrequiredpattern
^o_[A-Za-z0-9_]{1,32}$projectIdstringrequiredpattern
^pr_[A-Za-z0-9_]{1,32}$platformId"pf_console"requiredworkspaceIdstringrequiredpattern
^w_[A-Za-z0-9_]{1,32}$fleetIdnullrequiredresourceEnvironment"sandbox"requiredexpiresAtMsintegerrequiredmin 1 · max 9007199254740991
Responses
- 200Exact scoped native grant
Response fields
idstringrequiredpattern
^g_[0-7][0123456789ABCDEFGHJKMNPQRSTVWXYZ]{25}$principal_idstringrequiredpattern
^h_[A-Za-z0-9_]{1,32}$organization_idstringrequiredpattern
^o_[A-Za-z0-9_]{1,32}$project_idstringrequiredpattern
^pr_[A-Za-z0-9_]{1,32}$platform_id"pf_console"requiredworkspace_idstringrequiredpattern
^w_[A-Za-z0-9_]{1,32}$environmentId"sandbox"requiredrole_idsany[]requiredpermissions"runner.tasks.execute"[]requiredexpires_atintegerrequiredmin 1 · max 9007199254740991
created_atintegerrequiredmin 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
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('iam_runnerSelfExecutionGrant', {
body: {
schemaVersion: 1,
requestId: 'string',
operationId: 'string',
organizationId: 'string',
projectId: 'string',
platformId: 'pf_console',
workspaceId: 'string',
fleetId: 'string',
resourceEnvironment: 'sandbox',
expiresAtMs: 1,
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_runnerSelfExecutionGrant",
"arguments": {
"body": {
"schemaVersion": 1,
"requestId": "string",
"operationId": "string",
"organizationId": "string",
"projectId": "string",
"platformId": "pf_console",
"workspaceId": "string",
"fleetId": "string",
"resourceEnvironment": "sandbox",
"expiresAtMs": 1
},
"idempotency_key": "<a stable key per change>"
}
}
}Tenant context
Get the tenant context
GET/v1/iam/tenant-context
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
organizationIdstringrequiredprojectIdstringrequiredplatformIdstringrequiredworkspaceIdstringfleetIdstringorganizationNamestringenvironmentIdstring
- 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"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_getTenantContext'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam_getTenantContext",
"arguments": {}
}
}Select your tenant context
POST/v1/iam/tenant-context
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_idstringrequiredYour organization (the verified login's own) pattern
^o_[A-Za-z0-9_-]{1,128}$project_idstringDefault: your default project in the organization (IAM creates it when missing)
platform_idstringe.g. pf_one
workspaceIdstring | nullworkspace_idstring | nullSame as workspaceId (send one spelling, not both)
fleetIdstring | nullfleet_idstring | nullSame as fleetId (send one spelling, not both)
environmentId"sandbox" | "live"
Responses
- 200The selected tenant context, wrapped in
tenantResponse fields
tenantobjectrequiredtenant.organizationIdstringrequiredtenant.projectIdstringrequiredtenant.platformIdstringrequiredtenant.workspaceIdstringtenant.fleetIdstringtenant.organizationNamestringtenant.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"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('iam_selectTenantContext', {
body: {
organization_id: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "iam_selectTenantContext",
"arguments": {
"body": {
"organization_id": "string"
}
}
}
}
}L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support