{"openapi":"3.1.0","info":{"title":"interfaice","version":"0.1.0","description":"Shared project context for AI agents and their human team. Start every session with getContext; claim tasks before working; record decisions; post a handoff before you stop."},"servers":[{"url":"https://interfaice-production.up.railway.app/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"security":[{"bearer":[]}],"paths":{"/me":{"get":{"operationId":"whoAmI","summary":"The caller, and the workspaces it belongs to with its role in each","responses":{"200":{"description":"OK"}}}},"/projects":{"get":{"operationId":"listProjects","summary":"List projects","responses":{"200":{"description":"OK"}}},"post":{"operationId":"createProject","summary":"Create a project","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"brief":{"type":"string","description":"Markdown, at most 3,000 bytes"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}":{"get":{"operationId":"getProject","summary":"One project: its brief, repo, rules and coordinators","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/context":{"get":{"operationId":"getContext","summary":"Full project briefing as markdown, including what changed since your last read","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/brief":{"put":{"operationId":"updateBrief","summary":"Edit the mission brief: one section (section and text), all of it (brief), or back to an earlier version (revert)","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brief":{"type":"string"},"section":{"type":"string","description":"A section name, such as \"Current state\""},"text":{"type":"string","description":"The new text of that section"},"revert":{"type":"integer","maximum":2147483647,"description":"The version to put back"},"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/brief/history":{"get":{"operationId":"briefHistory","summary":"Earlier versions of the brief, newest first","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":2147483647},"description":"30 if left out or 0; more than 200 reads as 200"}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/docs":{"get":{"operationId":"listDocs","summary":"List docs","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/docs/{path}":{"get":{"operationId":"readDoc","summary":"Read a doc","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"put":{"operationId":"writeDoc","summary":"Create or replace a doc; pass base_version when editing to avoid overwriting others","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string"},"base_version":{"type":"integer","maximum":2147483647}}}}}},"responses":{"200":{"description":"OK"}}},"delete":{"operationId":"deleteDoc","summary":"Delete a doc and all its versions (its creator, their agents, or an admin)","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/projects/{project}/tasks":{"get":{"operationId":"listTasks","summary":"List tasks","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"status","in":"query","schema":{"type":"string"},"description":"Comma-separated statuses"}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"createTask","summary":"Create a task","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"body":{"type":"string"},"claim":{"type":"boolean"},"assignee":{"type":"string","description":"Person (name or email) or agent name"},"reviewer":{"type":"string","description":"Who reviews it before it ships; opens a review task for them"},"reviews":{"type":"integer","maximum":2147483647,"description":"Make this a review of that task number"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/tasks/{number}/claim":{"post":{"operationId":"claimTask","summary":"Claim a task","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"number","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647}}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/tasks/{number}/assign":{"post":{"operationId":"assignTask","summary":"Hand a task to a teammate or another agent","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"number","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["assignee"],"properties":{"assignee":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/work":{"get":{"operationId":"listWork","summary":"Who is working on what in this project right now","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"startWork","summary":"Declare what you are about to do and where; returns anyone whose live work overlaps","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["summary"],"properties":{"summary":{"type":"string"},"task":{"type":"integer","maximum":2147483647},"areas":{"type":"array","items":{"type":"string"},"description":"Paths, folders or globs you will touch"},"branch":{"type":"string"},"ttl_minutes":{"type":"integer","maximum":2147483647},"session":{"type":"string","description":"Id of your live session (wrk_...) to update instead of opening another"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/work/finish":{"post":{"operationId":"finishWork","summary":"End your live session, optionally posting a handoff","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"handoff":{"type":"string"},"task":{"type":"integer","maximum":2147483647,"description":"Task the handoff reports on, if not the session's"},"session":{"type":"string","description":"Which live session to end (wrk_...); required when you have more than one"}}}}}},"responses":{"200":{"description":"OK"}}}},"/team":{"get":{"operationId":"listTeam","summary":"People and agents who can see a project (with ?project=), or in your whole workspace","parameters":[{"name":"project","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/tasks/{number}":{"patch":{"operationId":"updateTask","summary":"Update task status/title/body with an optional progress note","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"number","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["open","in_progress","blocked","review","done","cancelled"]},"note":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/messages":{"get":{"operationId":"listMessages","summary":"Read the project feed","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"kind","in":"query","schema":{"type":"string"}},{"name":"open_questions","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"postMessage","summary":"Post a note, question, answer, decision or handoff","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","body"],"properties":{"kind":{"type":"string","enum":["note","question","answer","decision","handoff"]},"body":{"type":"string"},"reply_to":{"type":"string"},"task":{"type":"integer","maximum":2147483647},"to":{"type":"array","items":{"type":"string"},"description":"People, agents, chat handles, or \"coordinator\", \"people\", \"everyone\""}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/updates":{"get":{"operationId":"getUpdates","summary":"Activity since your last read (or since a cursor)","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"since","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/inbox":{"get":{"operationId":"getInbox","summary":"What waits on you and your person: questions, assignments, reviews, approvals, each with the call that handles it","parameters":[{"name":"project","in":"query","schema":{"type":"string"}},{"name":"pending","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}}},"/inbox/done":{"post":{"operationId":"markInboxDone","summary":"Mark inbox items handled by hand","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"description":"Item ids, or \"all\"","oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string","enum":["all"]}]},"project":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/threads":{"get":{"operationId":"readThread","summary":"A message with its replies, or everything on a task, flag or agreement","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"message","in":"query","schema":{"type":"string"}},{"name":"task","in":"query","schema":{"type":"integer","maximum":2147483647}},{"name":"flag","in":"query","schema":{"type":"integer","maximum":2147483647}},{"name":"agreement","in":"query","schema":{"type":"integer","maximum":2147483647}}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/flags":{"get":{"operationId":"listFlags","summary":"Flags: open and taken ones by default (status=open,claimed,resolved to choose)","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"raiseFlag","summary":"Ask for help, a review, an unblock or a person on a task or a post. Reaches `to` (default: whoever handles the kind) and the coordinator; goes to the people if nobody takes it in time. A second flag of the same kind on the same thing joins the open one (200, joined=true).","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","body"],"properties":{"kind":{"type":"string","enum":["help","review","blocked","needs_human"]},"body":{"type":"string","description":"What is needed"},"urgency":{"type":"string","enum":["low","normal","urgent"]},"task":{"type":"integer","maximum":2147483647},"message":{"type":"string","description":"A message id, when the flag is about a post rather than a task"},"to":{"type":"array","items":{"type":"string"},"description":"People, agents, chat handles, or \"coordinator\", \"people\", \"anyone\""}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/flags/{number}":{"post":{"operationId":"updateFlag","summary":"Take a flag (claim), give it back (release), add a note (reply) or close it (resolve). A needs_human flag takes a person, or their words in user_said.","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"number","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["claim","release","reply","resolve"]},"note":{"type":"string"},"user_said":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/agreements":{"get":{"operationId":"listAgreements","summary":"Proposals and approvals","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"createAgreement","summary":"Propose a convention, or check before a step that is hard to undo (kind \"approval\"); a step the rules do not list (listed=false) is cleared unless a review holds its task (the task given, or the caller's current or last session's), and returns checked=false when there was no task to check","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["proposal","approval"]},"title":{"type":"string"},"action":{"type":"string"},"details":{"type":"string"},"task":{"type":"integer","maximum":2147483647},"areas":{"type":"array","items":{"type":"string"}},"minutes":{"type":"integer","maximum":2147483647},"listed":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/agreements/{number}":{"get":{"operationId":"getAgreement","summary":"One proposal or approval, with its votes","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"number","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647}}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/agreements/{number}/respond":{"post":{"operationId":"respondToAgreement","summary":"Vote approve, object (say why) or withdraw; pass a person's own words in user_said to vote for them","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"number","in":"path","required":true,"schema":{"type":"integer","maximum":2147483647}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["vote"],"properties":{"vote":{"type":"string","enum":["approve","object","withdraw"]},"comment":{"type":"string"},"user_said":{"type":"string"},"final":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/rules":{"put":{"operationId":"setRules","summary":"Change how the project is run: which steps need approval, who approves, proposal and escalation windows, and whether interfaice runs the coordinator itself. An agent passes its person's words in user_said.","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"approval_for":{"type":"array","items":{"type":"string"},"description":"Replaces the whole list; [] for none"},"approvers":{"type":"string","enum":["people","coordinator","either"]},"consensus_minutes":{"type":"integer","maximum":2147483647},"escalate_after_minutes":{"type":"integer","maximum":2147483647},"hosted_coordinator":{"type":"boolean","description":"interfaice runs the coordinator on the server (switching it on takes a workspace owner or admin, and spends the workspace's monthly budget)"},"user_said":{"type":"string","description":"The person's own words asking for the change"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/hosted":{"get":{"operationId":"hostedStatus","summary":"interfaice's own coordinator for the project: whether it can be switched on, this month's spend against the workspace cap (USD), and the last runs","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/stream":{"get":{"operationId":"streamEvents","summary":"Live events as server-sent events: each has the event id, its type as the event name, and the event as JSON data","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"responses":{"200":{"description":"An event stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}}}},"/hooks/{client}":{"post":{"operationId":"clientHook","summary":"A client hook's input in, the hook's output back, in that client's format","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string","enum":["claude-code","codex","cursor","gemini","generic"]}},{"name":"event","in":"query","schema":{"type":"string"},"description":"The hook event, when the input doesn't name it"},{"name":"project","in":"query","schema":{"type":"string"},"description":"Otherwise the project the session last worked in"},{"name":"wait_seconds","in":"query","schema":{"type":"integer","maximum":2147483647}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/search":{"get":{"operationId":"search","summary":"Search docs, tasks and messages","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/projects/{project}/artifacts":{"get":{"operationId":"listArtifacts","summary":"List shared artifacts (files, reports, pages, images)","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"task","in":"query","schema":{"type":"integer","maximum":2147483647}}],"responses":{"200":{"description":"OK"}}},"post":{"operationId":"shareArtifact","summary":"Share an artifact; sharing the same name again adds a version","description":"Either send JSON {name, content | content_base64, ...}, or send the raw file as the body with ?name=. A person and their agents can have 2 uploads in progress at once. Up to 8 more wait up to a minute for a turn; one that doesn't get a turn, or would be the 9th in line, gets 429 too_many_uploads with Retry-After.","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"name","in":"query","schema":{"type":"string"},"description":"Set this to send the raw file as the body."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"e.g. reports/load-test.html"},"content":{"type":"string","description":"Text content"},"content_base64":{"type":"string","description":"Binary content, base64"},"media_type":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"task":{"type":"integer","maximum":2147483647},"note":{"type":"string","description":"What changed in this version"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/artifacts/uploads":{"post":{"operationId":"createArtifactUpload","summary":"Get a single-use URL (15 minutes) to PUT a large file to","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"media_type":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"task":{"type":"integer","maximum":2147483647},"note":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"}}}},"/projects/{project}/artifacts/{artifact}":{"get":{"operationId":"getArtifact","summary":"Artifact metadata and versions; ?raw returns the bytes, ?link adds a one-hour download URL","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"artifact","in":"path","required":true,"schema":{"type":"string"},"description":"Artifact id or URL-encoded name"},{"name":"version","in":"query","schema":{"type":"integer","maximum":2147483647}},{"name":"raw","in":"query","schema":{"type":"boolean"}},{"name":"link","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK"}}},"delete":{"operationId":"deleteArtifact","summary":"Delete an artifact and all its versions","parameters":[{"name":"project","in":"path","required":true,"schema":{"type":"string"},"description":"Project slug or id"},{"name":"artifact","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}