API reference
Zaps
Managed key-value stores: create, list and delete them, run commands and pipelines, and read statistics, usage and the audit log.
- Operations
- 12
- Base path
https://os.one.ml/api/v1/zaps- Scopes
zaps:readzaps:write- API keys
- 12 tested with an API key
- SDK
genesis.call('zaps_searchAudit', …)· helpers undergenesis.zaps- CLI
genesis zaps- MCP
- 12 tools
Operations
| Operation | Endpoint | API key |
|---|---|---|
| Search the audit log | POST/audit/search | Tested with an API key |
| Audit log statistics | GET/audit/stats | Tested with an API key |
| Run a key-value command | POST/command | Tested with an API key |
| Usage metrics for this tenant | GET/metrics | Tested with an API key |
| Run a pipeline of key-value commands | POST/pipeline | Tested with an API key |
| Key-value statistics | GET/stats | Tested with an API key |
| List Zaps | GET/zaps | Tested with an API key |
| Create a Zap | POST/zaps | Tested with an API key |
| Get a Zap | GET/zaps/{name} | Tested with an API key |
| Delete a Zap | DELETE/zaps/{name} | Tested with an API key |
| Run a command in one Zap | POST/zaps/{name}/command | Tested with an API key |
| List Zap purposes | GET/zaps/purposes | Tested with an API key |
Audit
Search the audit log
POST/v1/zaps/audit/search
Needs zaps:read (or zaps:write) on an org API key; Sandbox. Read-only search.
Request body application/json
principal_idstring | nullcategorystring | nullfrom_msinteger | nullmin 0
to_msinteger | nullmin 0
limitinteger | nullmin 0
cursorstring | null
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/zaps/audit/search" \
-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('zaps_searchAudit', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_searchAudit",
"arguments": {
"body": {}
}
}
}Audit log statistics
GET/v1/zaps/audit/stats
Needs zaps:read (or zaps:write) on an org API key; Sandbox.
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/zaps/audit/stats" \
-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('zaps_getAuditStats'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_getAuditStats",
"arguments": {}
}
}Command
Run a key-value command
POST/v1/zaps/command
Read commands (PING, GET, EXISTS, TTL, SCAN) need zaps:read; write commands (SET, DELETE, EXPIRE) need zaps:write and an Idempotency-Key.
Parameters
Idempotency-Keyheader · stringRequired for write commands; reuse it to replay instead of acting twice
Request body application/json
cmd"PING" | "GET" | "EXISTS" | "TTL" | "DELETE" | "SET" | "EXPIRE" | "SCAN"requiredkeystringvalueanykeyspacestring | nullttlinteger | nullmin 0
prefixstring | nullcursorstring | nullcountinteger | nullmin 0
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/zaps/command" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"cmd": "PING"
}'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('zaps_command', {
body: {
cmd: 'PING',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_command",
"arguments": {
"body": {
"cmd": "PING"
},
"idempotency_key": "<a stable key per change>"
}
}
}Run a command in one Zap
POST/v1/zaps/zaps/{name}/command
Read commands (PING, GET, EXISTS, TTL, SCAN) need zaps:read; write commands (SET, DELETE, EXPIRE) need zaps:write and an Idempotency-Key. Purpose commands INCR, LPUSH, RPOP, LLEN, REMEMBER and RECALL run only here.
Parameters
namepath · stringrequiredZap name
Idempotency-Keyheader · stringRequired for write commands; reuse it to replay instead of acting twice
Request body application/json
cmd"PING" | "GET" | "EXISTS" | "TTL" | "DELETE" | "SET" | "EXPIRE" | "SCAN" | "INCR" | "LPUSH" | "RPOP" | "LLEN" | "REMEMBER" | "RECALL"requiredkeystringvalueanykeyspacestring | nullttlinteger | nullmin 0
prefixstring | nullcursorstring | nullcountinteger | nullmin 0
deltaintegerfieldsobjectfield_namesarray | null
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/zaps/zaps/$NAME/command" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"cmd": "PING"
}'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('zaps_zapCommand', {
name: '<name>',
body: {
cmd: 'PING',
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_zapCommand",
"arguments": {
"name": "<name>",
"body": {
"cmd": "PING"
},
"idempotency_key": "<a stable key per change>"
}
}
}Metrics
Usage metrics for this tenant
GET/v1/zaps/metrics
Needs zaps:read (or zaps:write) on an org API key; Sandbox.
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/zaps/metrics" \
-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('zaps_getMetrics'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_getMetrics",
"arguments": {}
}
}Pipeline
Run a pipeline of key-value commands
POST/v1/zaps/pipeline
Up to 1000 commands that are all reads or all writes. Read commands (PING, GET, EXISTS, TTL, SCAN) need zaps:read; write commands (SET, DELETE, EXPIRE) need zaps:write and an Idempotency-Key.
Parameters
Idempotency-Keyheader · stringRequired for write commands; reuse it to replay instead of acting twice
Request body application/json
commandsobject[]requiredcommands[].[].cmd"PING" | "GET" | "EXISTS" | "TTL" | "DELETE" | "SET" | "EXPIRE" | "SCAN"requiredcommands[].[].keystringcommands[].[].valueanycommands[].[].keyspacestring | nullcommands[].[].ttlinteger | nullmin 0
commands[].[].prefixstring | nullcommands[].[].cursorstring | nullcommands[].[].countinteger | nullmin 0
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/zaps/pipeline" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{
"commands": [
{
"cmd": "PING"
}
]
}'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('zaps_pipeline', {
body: {
commands: [
{
cmd: 'PING',
},
],
},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_pipeline",
"arguments": {
"body": {
"commands": [
{
"cmd": "PING"
}
]
},
"idempotency_key": "<a stable key per change>"
}
}
}Stats
Key-value statistics
GET/v1/zaps/stats
Needs zaps:read (or zaps:write) on an org API key; Sandbox.
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/zaps/stats" \
-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('zaps_getStats'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_getStats",
"arguments": {}
}
}Zaps
List Zaps
GET/v1/zaps/zaps
Needs zaps:read (or zaps:write) on an org API key; Sandbox.
Responses
- 200OK
Response fields
statusstringrequiredzapsobject[]requiredzaps[].[].namestringrequiredzaps[].[].purpose"cache" | "session" | "agent_memory" | "rate_limiter" | "queue" | "feature_flag" | "audit_log"requiredzaps[].[].enginestringrequiredzaps[].[].statusstringrequiredzaps[].[].created_atstringrequiredzaps[].[].featuresstring[]requiredcountintegerrequired
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/zaps/zaps" \
-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('zaps_listZaps'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_listZaps",
"arguments": {}
}
}Create a Zap
POST/v1/zaps/zaps
Needs zaps:write on an org API key and an Idempotency-Key; Sandbox.
Parameters
Idempotency-Keyheader · stringrequiredStable key; reuse it to replay instead of acting twice
Request body application/json
namestringrequiredpattern
^[a-z0-9][a-z0-9-]{0,62}$purposestring | nullcache (default), session, agent_memory, rate_limiter, queue, feature_flag or audit_log
Responses
- 201OK
Response fields
statusstringrequiredzapobjectrequiredzap.namestringrequiredzap.purpose"cache" | "session" | "agent_memory" | "rate_limiter" | "queue" | "feature_flag" | "audit_log"requiredzap.enginestringrequiredzap.statusstringrequiredzap.created_atstringrequiredzap.featuresstring[]required
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:write(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/zaps/zaps" \
-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('zaps_createZap', {
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": "zaps_createZap",
"arguments": {
"body": {
"name": "string"
},
"idempotency_key": "<a stable key per change>"
}
}
}Get a Zap
GET/v1/zaps/zaps/{name}
Needs zaps:read (or zaps:write) on an org API key; Sandbox.
Parameters
namepath · stringrequiredZap name
Responses
- 200OK
Response fields
statusstringrequiredzapobjectrequiredzap.namestringrequiredzap.purpose"cache" | "session" | "agent_memory" | "rate_limiter" | "queue" | "feature_flag" | "audit_log"requiredzap.enginestringrequiredzap.statusstringrequiredzap.created_atstringrequiredzap.featuresstring[]required
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/zaps/zaps/$NAME" \
-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('zaps_getZap', {
name: '<name>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_getZap",
"arguments": {
"name": "<name>"
}
}
}Delete a Zap
DELETE/v1/zaps/zaps/{name}
Needs zaps:write on an org API key and an Idempotency-Key; Sandbox.
Parameters
namepath · stringrequiredZap name
Idempotency-Keyheader · stringrequiredStable key; reuse it to replay instead of acting twice
Responses
- 200OK
Response fields
statusstringmessagestring
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:write(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/zaps/zaps/$NAME" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY"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('zaps_deleteZap', {
name: '<name>',
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_deleteZap",
"arguments": {
"name": "<name>",
"idempotency_key": "<a stable key per change>"
}
}
}List Zap purposes
GET/v1/zaps/zaps/purposes
Needs zaps:read (or zaps:write) on an org API key; Sandbox.
Responses
- 200OK
Response fields
A JSON object.
- 400Invalid body, a command outside the admitted set, or a write without an Idempotency-Key
- 401Missing or invalid org API key
- 403The key lacks
zaps:read(SCOPE_MISSING), or its selection is missing or expired - 409The key's selected environment is not Sandbox (ENVIRONMENT_NOT_AVAILABLE)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/zaps/zaps/purposes" \
-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('zaps_listZapPurposes'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "zaps_listZapPurposes",
"arguments": {}
}
}L1fe AI Inc. · Built from Genesis 0.3.1 and the live gateway on 2026-10-25. Support