Skip to Content
Keko
API reference

Majors

Your majors

GET
/v1/majors

Authorization

bearer
headerAuthorizationBearer <token>

Response Body

OK

application/json
  1. response
majors*array<>
Example Request
curl -X GET 'https://engine.keko.run/v1/majors'
Example Response
{  "majors": [    {      "id": "string",      "name": "string",      "portrait": {        "ant": "builder",        "background": "sand"      },      "projectPaths": [        "string"      ],      "device": "string",      "model": {        "provider": "string",        "id": "string"      },      "maxCrew": 0,      "createdAt": 0,      "archived": true,      "pinned": true,      "state": "setting-up",      "statusLine": "string",      "lastActivityAt": 0,      "cost": 0,      "needsYou": true,      "question": "string",      "rules": [        {          "id": "string",          "kind": "allow",          "text": "string",          "label": "string"        }      ],      "notes": "string",      "upNext": [        {          "id": "string",          "projectPath": "string",          "title": "string",          "instructions": "string",          "addedAt": 0,          "addedBy": "major"        }      ],      "userId": "string",      "unread": true    }  ]}
POST
/v1/majors

Authorization

bearer
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
name*string
Length1 <= length
portrait?|
Defaultnull
deviceId?string
projectPaths*array<string>
Items1 <= items
model*
firstMessage*string
Length1 <= length
maxCrew?integer
Range0 < value <= 9007199254740991

Response Body

OK

application/json
  1. response
major*
Example Request
curl -X POST 'https://engine.keko.run/v1/majors' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "projectPaths": [    "string"  ],  "model": {    "provider": "string",    "id": "string"  },  "firstMessage": "string"}'
Example Response
{  "major": {    "id": "string",    "name": "string",    "portrait": {      "ant": "builder",      "background": "sand"    },    "projectPaths": [      "string"    ],    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "maxCrew": 0,    "createdAt": 0,    "archived": true,    "pinned": true,    "state": "setting-up",    "statusLine": "string",    "lastActivityAt": 0,    "cost": 0,    "needsYou": true,    "question": "string",    "rules": [      {        "id": "string",        "kind": "allow",        "text": "string",        "label": "string"      }    ],    "notes": "string",    "upNext": [      {        "id": "string",        "projectPath": "string",        "title": "string",        "instructions": "string",        "addedAt": 0,        "addedBy": "major"      }    ],    "userId": "string",    "unread": true  }}

One major

GET
/v1/majors/{majorId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

majorId*string

Response Body

OK

application/json
  1. response
major*
Example Request
curl -X GET 'https://engine.keko.run/v1/majors/string'
Example Response
{  "major": {    "id": "string",    "name": "string",    "portrait": {      "ant": "builder",      "background": "sand"    },    "projectPaths": [      "string"    ],    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "maxCrew": 0,    "createdAt": 0,    "archived": true,    "pinned": true,    "state": "setting-up",    "statusLine": "string",    "lastActivityAt": 0,    "cost": 0,    "needsYou": true,    "question": "string",    "rules": [      {        "id": "string",        "kind": "allow",        "text": "string",        "label": "string"      }    ],    "notes": "string",    "upNext": [      {        "id": "string",        "projectPath": "string",        "title": "string",        "instructions": "string",        "addedAt": 0,        "addedBy": "major"      }    ],    "userId": "string",    "unread": true  }}
PATCH
/v1/majors/{majorId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

majorId*string

Request Body

application/json
  1. body
name?string
portrait?|
Defaultnull
archived?boolean
pinned?boolean
maxCrew?integer
Range0 < value <= 9007199254740991
model?
projectPaths?array<string>

Response Body

OK

application/json
  1. response
major*
Example Request
curl -X PATCH 'https://engine.keko.run/v1/majors/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "major": {    "id": "string",    "name": "string",    "portrait": {      "ant": "builder",      "background": "sand"    },    "projectPaths": [      "string"    ],    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "maxCrew": 0,    "createdAt": 0,    "archived": true,    "pinned": true,    "state": "setting-up",    "statusLine": "string",    "lastActivityAt": 0,    "cost": 0,    "needsYou": true,    "question": "string",    "rules": [      {        "id": "string",        "kind": "allow",        "text": "string",        "label": "string"      }    ],    "notes": "string",    "upNext": [      {        "id": "string",        "projectPath": "string",        "title": "string",        "instructions": "string",        "addedAt": 0,        "addedBy": "major"      }    ],    "userId": "string",    "unread": true  }}
POST
/v1/majors/{majorId}/messages

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

majorId*string

Request Body

application/json
  1. body
text*string
Default""
mode?|null
requestId?string
allowSecret?boolean

Response Body

OK

application/json
  1. response
submissionId*string
Example Request
curl -X POST 'https://engine.keko.run/v1/majors/string/messages' \  -H 'Content-Type: application/json' \  -d '{  "text": ""}'
Example Response
{  "submissionId": "string"}

Its crew’s threads

GET
/v1/majors/{majorId}/crew

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

majorId*string

Response Body

OK

application/json
  1. response
threads*array<>
Example Request
curl -X GET 'https://engine.keko.run/v1/majors/string/crew'
Example Response
{  "threads": [    {      "id": "string",      "title": "string",      "projectPath": "string",      "worktreePath": "string",      "branch": "string",      "baseBranch": "string",      "device": "string",      "model": {        "provider": "string",        "id": "string"      },      "createdAt": 0,      "state": "setting-up",      "cost": 0,      "setup": {        "status": "running",        "problems": [          "string"        ]      },      "deviceName": "string",      "deviceOnline": true,      "machineId": "string",      "machineState": "creating",      "projectId": "string",      "needsYou": true,      "question": "string",      "statusLine": "string",      "waitingForDevice": {        "deviceId": "string",        "since": 0      },      "waitingForCloud": {        "message": "string",        "until": 0,        "firstMessage": "string",        "failed": "string",        "starting": true      },      "request": {        "callId": "string",        "title": "string",        "command": true,        "ask": {          "options": [            "string"          ]        }      },      "majorId": "string",      "userId": "string",      "unread": true    }  ]}
POST
/v1/majors/{majorId}/rules

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

majorId*string

Request Body

application/json
  1. body
text*string
Length1 <= length
kind?string
Value in"allow""ask""instruction"

Response Body

OK

application/json
  1. response
major*
Example Request
curl -X POST 'https://engine.keko.run/v1/majors/string/rules' \  -H 'Content-Type: application/json' \  -d '{  "text": "string"}'
Example Response
{  "major": {    "id": "string",    "name": "string",    "portrait": {      "ant": "builder",      "background": "sand"    },    "projectPaths": [      "string"    ],    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "maxCrew": 0,    "createdAt": 0,    "archived": true,    "pinned": true,    "state": "setting-up",    "statusLine": "string",    "lastActivityAt": 0,    "cost": 0,    "needsYou": true,    "question": "string",    "rules": [      {        "id": "string",        "kind": "allow",        "text": "string",        "label": "string"      }    ],    "notes": "string",    "upNext": [      {        "id": "string",        "projectPath": "string",        "title": "string",        "instructions": "string",        "addedAt": 0,        "addedBy": "major"      }    ],    "userId": "string",    "unread": true  }}

Removes a rule

DELETE
/v1/majors/{majorId}/rules/{ruleId}

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

majorId*string
ruleId*string

Response Body

OK

application/json
  1. response
major*
Example Request
curl -X DELETE 'https://engine.keko.run/v1/majors/string/rules/string'
Example Response
{  "major": {    "id": "string",    "name": "string",    "portrait": {      "ant": "builder",      "background": "sand"    },    "projectPaths": [      "string"    ],    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "maxCrew": 0,    "createdAt": 0,    "archived": true,    "pinned": true,    "state": "setting-up",    "statusLine": "string",    "lastActivityAt": 0,    "cost": 0,    "needsYou": true,    "question": "string",    "rules": [      {        "id": "string",        "kind": "allow",        "text": "string",        "label": "string"      }    ],    "notes": "string",    "upNext": [      {        "id": "string",        "projectPath": "string",        "title": "string",        "instructions": "string",        "addedAt": 0,        "addedBy": "major"      }    ],    "userId": "string",    "unread": true  }}

Replaces its notes

PUT
/v1/majors/{majorId}/notes

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

majorId*string

Request Body

application/json
  1. body
notes*string

Response Body

OK

application/json
  1. response
major*
Example Request
curl -X PUT 'https://engine.keko.run/v1/majors/string/notes' \  -H 'Content-Type: application/json' \  -d '{  "notes": "string"}'
Example Response
{  "major": {    "id": "string",    "name": "string",    "portrait": {      "ant": "builder",      "background": "sand"    },    "projectPaths": [      "string"    ],    "device": "string",    "model": {      "provider": "string",      "id": "string"    },    "maxCrew": 0,    "createdAt": 0,    "archived": true,    "pinned": true,    "state": "setting-up",    "statusLine": "string",    "lastActivityAt": 0,    "cost": 0,    "needsYou": true,    "question": "string",    "rules": [      {        "id": "string",        "kind": "allow",        "text": "string",        "label": "string"      }    ],    "notes": "string",    "upNext": [      {        "id": "string",        "projectPath": "string",        "title": "string",        "instructions": "string",        "addedAt": 0,        "addedBy": "major"      }    ],    "userId": "string",    "unread": true  }}