{"openapi":"3.1.0","info":{"title":"Orbox API","version":"1.0.0","description":"Public REST API of Orbox. Every operation is scoped to the organization of the authenticating credential. The machine-readable OpenAPI 3.1 document is served publicly at `/api/v1/openapi.json`.\n\n# Calling the API\n\nSend `Authorization: Bearer <token>` with either a personal API token (Orbox Settings → API tokens) or an OAuth access token issued to a connected client. Both credential kinds have the same scopes, budgets and errors.\n\n- A request without a valid credential gets `401` with `WWW-Authenticate: Bearer resource_metadata=\"https://<host>/.well-known/oauth-protected-resource/api/v1\"`. That protected resource metadata names the OAuth authorization server a client signs in with.\n- A read-only token or grant gets `403` on every write. Writes are also refused with `403` `EXTERNAL_WRITES_DISABLED` while a deployment has external writes switched off.\n- Reads and writes spend per-user and per-organization budgets shared with MCP. An exhausted budget answers `429` with a `Retry-After` header in seconds; an unreachable authorization server answers `503` with `Retry-After`.\n- Every write takes a `requestId`: retry an uncertain write with the same value to get the recorded outcome back. Writes to an existing entity or draft take the `expectedRevision` from your last read; `409` `STALE_REVISION` means re-read and reconsider.\n- Errors have the body `{ \"error\": { \"code\", \"appCode\", \"message\", … } }`. Branch on `appCode`, which is stable across REST and MCP.\n\n# Versioning\n\n- The path carries the major version: `/api/v1`. Changes within `/v1` are additive only: new operations, new optional request fields, new response fields and new error `appCode`s. Ignore response fields you do not know, and handle an unknown `appCode` by its HTTP status.\n- Every other change is breaking (removing or renaming an operation or field, making an optional field required, changing a type, a default or a status code) and ships under a new path, `/api/v2`, alongside `/v1`.\n- `info.version` is `MAJOR.MINOR.PATCH`. MAJOR always equals the path version, MINOR increases with every additive change and PATCH with documentation-only fixes. Every version is listed in the changelog below.\n\n# Deprecation\n\n- A deprecated operation or field is marked `deprecated` in this document and announced in the changelog with the date of the announcement. It keeps working for at least 2 days after that date.\n- When `/v2` ships, `/v1` as a whole is deprecated under the same rule: it keeps working for at least 2 days after the announcement, and the date it stops is published here.\n- Calling the internal tRPC endpoint (`/api/trpc`) with an external credential is deprecated as of 2026-10-14. It keeps working for now, but this REST API and the MCP server are the public contract; such responses carry a `Deprecation` header.\n\n# Changelog\n\n- **1.0.0**: First published version: entity catalog reads, entity writes and relationships, process reads and lifecycle, step, flow and batch draft edits."},"servers":[{"url":"/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Catalog"},{"name":"Entities"},{"name":"Processes"}],"paths":{"/entity-types":{"get":{"operationId":"listEntityTypes","summary":"List the entity types of the organization catalog","tags":["Catalog"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"namePlural":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"isSystem":{"type":"boolean"}},"required":["id","slug","name","namePlural","description","icon","isSystem"]}}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/catalog":{"get":{"operationId":"getCatalog","summary":"Describe every entity type with its custom fields, datatypes, allowed values, required flags and relation targets","tags":["Catalog"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"namePlural":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"isSystem":{"type":"boolean"},"autoAlias":{"type":"boolean"},"fields":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"datatype":{"type":"string","enum":["text","textarea","url","select","number","date","checkbox","relation"]},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"required":{"type":"boolean"},"relationTargetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"relationTargetSlug":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","datatype","options","required","relationTargetId","relationTargetSlug"]}}},"required":["id","slug","name","namePlural","description","icon","isSystem","autoAlias","fields"]}}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/entities":{"get":{"operationId":"listEntities","summary":"Search and list entities, bounded and keyset-paginated by (name, id); retired and rejected entities are excluded unless requested via statuses","tags":["Entities"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},{"name":"typeSlug","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"search","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"statuses","in":"query","required":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["proposed","active","rejected","retired"]}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["proposed","active","rejected","retired"]},"revision":{"type":"string"}},"required":["id","typeSlug","name","status","revision"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"post":{"operationId":"proposeEntity","summary":"Propose a new entity as status=proposed (a human activates it in Orbox); relation fields in data take target entity ids and are written in the same request; the response has outcome created, or existing when an entity of this type already has this name (or a linkable alias), and lists missingRequired; requires a client-generated requestId","tags":["Entities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"typeSlug":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","maxLength":20000},"icon":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{}},"confirmNew":{"type":"boolean"}},"required":["requestId","typeSlug","name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","existing"]},"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["proposed","active","rejected","retired"]},"revision":{"type":"string"},"data":{"type":"object","additionalProperties":true},"missingRequired":{"type":"array","items":{"type":"string"}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["id","typeSlug","name","status","revision","missingRequired","requestId","replay"]}}}},"400":{"description":"Invalid input, or VALIDATION: unknown type, unsupported field or an invalid relation target; nothing was written","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: NEEDS_CONFIRMATION (the same name exists under another type, or a similar name exists; nothing was created; retry with a new requestId and confirmNew if it is genuinely different), or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/entities/{id}":{"get":{"operationId":"getEntity","summary":"Read one entity: fields, status, opaque revision, resolved references and relationships","tags":["Entities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"icon":{"anyOf":[{"type":"string"},{"type":"null"}]},"data":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["proposed","active","rejected","retired"]},"revision":{"type":"string"},"relations":{"type":"object","properties":{"outgoing":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"typeSlug":{"type":"string"},"property":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["proposed","active"]},"targetStatus":{"type":"string","enum":["proposed","active"]}},"required":["id","name","typeSlug","property","status","targetStatus"]}},"incoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"typeSlug":{"type":"string"},"property":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["proposed","active"]},"targetStatus":{"type":"string","enum":["proposed","active"]}},"required":["id","name","typeSlug","property","status","targetStatus"]}}},"required":["outgoing","incoming"]},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["entity","process"]},"name":{"type":"string"}},"required":["id","kind","name"]}}},"required":["id","typeSlug","name","body","icon","data","status","revision","relations","references"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"patch":{"operationId":"updateEntity","summary":"Apply targeted field updates: only supplied fields change, dataPatches merge into the existing data, a relation field in dataPatches replaces that field's relationships and one in dataRemovals clears them; requires requestId and the entity revision; the response lists missingRequired","tags":["Entities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"name":{"type":"string","minLength":1,"maxLength":300},"body":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"icon":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"dataPatches":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{}},"dataRemovals":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["requestId","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["proposed","active","rejected","retired"]},"revision":{"type":"string"},"data":{"type":"object","additionalProperties":true},"missingRequired":{"type":"array","items":{"type":"string"}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["id","typeSlug","name","status","revision","missingRequired","requestId","replay"]}}}},"400":{"description":"Invalid input, or VALIDATION: unsupported field or an invalid relation target; nothing was written","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization, or a relation field changed on a retired or rejected entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read the entity and reconsider), or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/entities/{id}/relations":{"get":{"operationId":"getEntityRelations","summary":"Read the incoming and outgoing relationships of one entity, each with its proposed/active status","tags":["Entities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"outgoing":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"typeSlug":{"type":"string"},"property":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["proposed","active"]},"targetStatus":{"type":"string","enum":["proposed","active"]}},"required":["id","name","typeSlug","property","status","targetStatus"]}},"incoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"typeSlug":{"type":"string"},"property":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["proposed","active"]},"targetStatus":{"type":"string","enum":["proposed","active"]}},"required":["id","name","typeSlug","property","status","targetStatus"]}}},"required":["outgoing","incoming"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"post":{"operationId":"addEntityRelation","summary":"Add one relationship from this entity (the source) to toId through a relation property of the source type; both endpoints must be proposed or active and keep their statuses; requires requestId and the source revision","tags":["Entities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"toId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"property":{"type":"string","minLength":1,"maxLength":200},"expectedRevision":{"type":"string","minLength":1,"maxLength":512}},"required":["requestId","toId","property","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"fromId":{"type":"string"},"toId":{"type":"string"},"property":{"type":"string"},"fromRevision":{"type":"string"},"toRevision":{"type":"string"},"edgeStatus":{"type":"string","const":"active"},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["fromId","toId","property","fromRevision","toRevision","edgeStatus","requestId","replay"]}}}},"400":{"description":"Invalid input, or VALIDATION: the property is not a relation field of the source type targeting the target type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source or target not found in the organization, or not linkable (retired or rejected)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read the entity and reconsider), or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/entities/batch":{"post":{"operationId":"proposeEntities","summary":"Propose up to 100 entities atomically; items may name each other in relation fields by ref; an item whose name (or a linkable alias) matches an existing entity of the same type returns outcome existing untouched; if any item fails nothing is written","tags":["Entities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"typeSlug":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","maxLength":20000},"icon":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"data":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{}},"confirmNew":{"type":"boolean"},"ref":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,39}$"}},"required":["typeSlug","name"]}}},"required":["requestId","items"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"replay":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"outcome":{"type":"string","enum":["created","existing"]},"revision":{"type":"string"},"missingRequired":{"type":"array","items":{"type":"string"}}},"required":["id","outcome","revision","missingRequired"]}}},"required":["requestId","replay","items"]}}}},"400":{"description":"Invalid input, or BATCH_ITEMS_FAILED listing every failing item (NEEDS_CONFIRMATION items carry sameNameOtherType and similar); nothing was written","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/entities/{id}/retire":{"post":{"operationId":"retireEntity","summary":"Retire an entity through the soft-delete behavior: a proposed entity becomes rejected, an active one retired; references are kept; requires requestId and the entity revision","tags":["Entities"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512}},"required":["requestId","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["proposed","active","rejected","retired"]},"revision":{"type":"string"},"data":{"type":"object","additionalProperties":true},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["id","typeSlug","name","status","revision","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization, or already retired or rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: ENTITY_IN_USE (a non-archived process still uses the entity; see blockingProcesses), STALE_REVISION, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/entities/{id}/relations/{property}/{toId}":{"delete":{"operationId":"removeEntityRelation","summary":"Remove one relationship, identified by source entity, relation property and target entity; the edge is tombstoned, nothing is permanently deleted; requestId and the source revision go in the query string","tags":["Entities"],"parameters":[{"name":"requestId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"toId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"property","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"expectedRevision","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"fromId":{"type":"string"},"toId":{"type":"string"},"property":{"type":"string"},"fromRevision":{"type":"string"},"toRevision":{"type":"string"},"removed":{"type":"boolean","const":true},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["fromId","toId","property","fromRevision","toRevision","removed","requestId","replay"]}}}},"400":{"description":"Invalid input, or VALIDATION: the property is not a relation field of the source type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Source or target not found in the organization, not linkable (retired or rejected), or no such relationship","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read the entity and reconsider), or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes":{"get":{"operationId":"listProcesses","summary":"Search or list processes in the organization catalog, archived excluded, keyset-paginated","tags":["Processes"],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"statuses","in":"query","required":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["draft","waiting_for_processing","processing","processing_failed","embedding","embedding_failed","active","rejected","retired"]}}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2000}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["draft","waiting_for_processing","processing","processing_failed","embedding","embedding_failed","active","rejected","retired"]},"statusLabel":{"type":"string"},"visibility":{"type":"string","enum":["private","public"]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentVersion":{"type":"number"},"workflowRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"}},"required":["id","name","slug","kind","status","statusLabel","visibility","ownerId","currentVersion","workflowRunId","revision"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["items","nextCursor"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"post":{"operationId":"createProcessDraft","summary":"Create a private process draft that never becomes active by itself; requires a client-generated requestId, and a retry with the same requestId replays the recorded outcome","tags":["Processes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":512}},"required":["requestId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}":{"get":{"operationId":"getProcess","summary":"Read the committed process: metadata, content sections, steps, flow, references and the committed revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"kind":{"type":"string"},"lifecycle":{"type":"object","properties":{"status":{"type":"string","enum":["draft","waiting_for_processing","processing","processing_failed","embedding","embedding_failed","active","rejected","retired"]},"statusLabel":{"type":"string"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"hasOpenDraft":{"type":"boolean"}},"required":["status","statusLabel","previousStatus","isActive","hasOpenDraft"]},"contentSource":{"type":"string","enum":["committed","unsubmitted"]},"visibility":{"type":"string","enum":["private","public"]},"ownerId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"escalationId":{"anyOf":[{"type":"string"},{"type":"null"}]},"header":{"type":"object","properties":{"ucel":{"anyOf":[{"type":"string"},{"type":"null"}]},"vstup":{"anyOf":[{"type":"string"},{"type":"null"}]},"vystup":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ucel","vstup","vystup"]},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewFrequency":{"anyOf":[{"type":"string"},{"type":"null"}]},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business impact; usually High, Medium or Low, but older records may hold free text"},"nextReview":{"anyOf":[{"type":"string"},{"type":"null"}]},"currentVersion":{"type":"number"},"workflowRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"assigneeIds":{"type":"array","items":{"type":"string"}},"toolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"assigneesUnknown":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"toolUnknown":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"sortOrder":{"type":"number"}},"required":["id","title","type","assigneeIds","toolId","sla","noTimeLimit","assigneesUnknown","slaUnknown","toolUnknown","status","body","bodySections","sortOrder"]}},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"referencedEntityIds":{"type":"array","items":{"type":"string"}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["entity","process"]},"name":{"type":"string"}},"required":["id","kind","name"]}},"revision":{"type":"string"}},"required":["id","name","slug","kind","lifecycle","contentSource","visibility","ownerId","teamId","escalationId","header","trigger","sla","noTimeLimit","domain","frequency","reviewFrequency","impact","nextReview","currentVersion","workflowRunId","body","bodySections","steps","connections","referencedEntityIds","references","revision"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft":{"get":{"operationId":"getProcessDraft","summary":"Read the open editable draft with its draft revision; null when a visible process has no open draft","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"contentSource":{"type":"string","const":"draft"},"isActive":{"type":"boolean","const":false},"status":{"type":"string","const":"draft"},"statusLabel":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"ucel":{"anyOf":[{"type":"string"},{"type":"null"}]},"vstup":{"anyOf":[{"type":"string"},{"type":"null"}]},"vystup":{"anyOf":[{"type":"string"},{"type":"null"}]},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewFrequency":{"anyOf":[{"type":"string"},{"type":"null"}]},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business impact; usually High, Medium or Low, but older records may hold free text"},"escalation":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"}},"required":["name","domain","ucel","vstup","vystup","frequency","reviewFrequency","impact","escalation","owner","team","trigger","sla"]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"assigneeIds":{"type":"array","items":{"type":"string"}},"toolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"assigneesUnknown":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"toolUnknown":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"sortOrder":{"type":"number"}},"required":["id","title","type","assigneeIds","toolId","sla","assigneesUnknown","slaUnknown","toolUnknown","status","bodySections","sortOrder"]}},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"phase":{"type":"string"},"referencedEntityIds":{"type":"array","items":{"type":"string"}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["entity","process"]},"name":{"type":"string"}},"required":["id","kind","name"]}},"revision":{"type":"string"}},"required":["processId","eveSessionId","contentSource","isActive","status","statusLabel","name","meta","bodySections","steps","connections","phase","referencedEntityIds","references","revision"]},{"type":"null"}]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"patch":{"operationId":"updateProcessDraft","summary":"Apply targeted metadata or content-section changes to the open draft; only supplied fields change; requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"meta":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"domain":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"ucel":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"vstup":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"vystup":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"ownerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"escalationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"trigger":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"sla":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"frequency":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"reviewFrequency":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"impact":{"anyOf":[{"type":"string","enum":["High","Medium","Low"]},{"type":"null"}]}}},"bodySections":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","maxLength":20000}}},"required":["requestId","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed, e.g. PROCESS_NOT_READY, NO_OPEN_DRAFT or a process in the wrong lifecycle status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/validate":{"post":{"operationId":"validateProcessDraft","summary":"Dry-run the submit gate on the open draft without changing it: blockers, non-blocking warnings and the current draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"revision":{"type":"string"},"ready":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"stepId":{"type":"string"},"connectionId":{"type":"string"}},"required":["code","message"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"stepId":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"required":["processId","revision","ready","blockers","warnings"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed, e.g. PROCESS_NOT_READY, NO_OPEN_DRAFT or a process in the wrong lifecycle status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/steps":{"post":{"operationId":"addProcessStep","summary":"Add one work step (start, task or end) to the open draft and mint its stable step id; requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"title":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["start","task","end"]},"assigneeIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"assigneesUnknown":{"type":"boolean"},"toolId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"toolUnknown":{"type":"boolean"},"sla":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"bodySections":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["Vstupy","Jak","Výstupy"]},"markdown":{"type":"string","maxLength":20000}},"required":["section","markdown"]}}},"required":["requestId","expectedRevision","title","kind"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"step":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"assigneeIds":{"type":"array","items":{"type":"string"}},"toolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"assigneesUnknown":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"toolUnknown":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"sortOrder":{"type":"number"}},"required":["id","title","type","assigneeIds","toolId","sla","assigneesUnknown","slaUnknown","toolUnknown","status","bodySections","sortOrder"]},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","step","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/steps/{stepId}":{"patch":{"operationId":"updateProcessStep","summary":"Targeted edit of one draft step: only supplied fields change, other steps and the flow are preserved; requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"title":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["start","task","end"]},"assigneeIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"assigneesUnknown":{"type":"boolean"},"toolId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"toolUnknown":{"type":"boolean"},"sla":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"bodySections":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["Vstupy","Jak","Výstupy"]},"markdown":{"type":"string","maxLength":20000}},"required":["section","markdown"]}}},"required":["requestId","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"step":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"assigneeIds":{"type":"array","items":{"type":"string"}},"toolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"assigneesUnknown":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"toolUnknown":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"sortOrder":{"type":"number"}},"required":["id","title","type","assigneeIds","toolId","sla","assigneesUnknown","slaUnknown","toolUnknown","status","bodySections","sortOrder"]},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","step","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"delete":{"operationId":"removeProcessStep","summary":"Remove one draft step: its connections are pruned and a split or join left with fewer than two branches is dropped; requestId and the draft revision go in the query string","tags":["Processes"],"parameters":[{"name":"requestId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"expectedRevision","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"removedStepId":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","removedStepId","connections","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/connections":{"post":{"operationId":"connectProcessSteps","summary":"Add a plain sequence connection fromStepId -> toStepId; an identical existing connection is left as is; requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"fromStepId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"toStepId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["requestId","expectedRevision","fromStepId","toStepId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","connections","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/connections/{fromStepId}/{toStepId}":{"delete":{"operationId":"disconnectProcessSteps","summary":"Remove the plain sequence connection fromStepId -> toStepId (no effect when it does not exist); branches and joins are untouched; requestId and the draft revision go in the query string","tags":["Processes"],"parameters":[{"name":"requestId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"expectedRevision","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"fromStepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"toStepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","connections","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/steps/{stepId}/branch":{"put":{"operationId":"setProcessBranch","summary":"Replace the single split out of this step with the given branches, each naming a toStepId with an optional label, condition and yes/no polarity; requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"type":{"type":"string","enum":["exclusive","parallel","inclusive","complex"]},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"branches":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"toStepId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"condition":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"polarity":{"anyOf":[{"type":"string","enum":["yes","no"]},{"type":"null"}]}},"required":["toStepId"]}}},"required":["requestId","expectedRevision","type","branches"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","connections","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"delete":{"operationId":"clearProcessBranch","summary":"Remove the single split out of this step, leaving its continuation to be re-wired; requestId and the draft revision go in the query string","tags":["Processes"],"parameters":[{"name":"requestId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"expectedRevision","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","connections","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/steps/{stepId}/join":{"put":{"operationId":"setProcessJoin","summary":"Replace the single join into this step with a parallel, inclusive or complex join of fromStepIds (complex joins take an optional threshold); requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"join":{"type":"string","enum":["parallel","inclusive","complex"]},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"threshold":{"type":"integer","minimum":1,"maximum":100},"fromStepIds":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["requestId","expectedRevision","join","fromStepIds"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","connections","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}},"delete":{"operationId":"clearProcessJoin","summary":"Remove the single join into this step, leaving its re-wiring to the caller; requestId and the draft revision go in the query string","tags":["Processes"],"parameters":[{"name":"requestId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"name":"expectedRevision","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","connections","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process or step not found in the organization or in the open draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/draft/batch":{"post":{"operationId":"batchEditProcessDraft","summary":"Apply up to 100 ordered draft edits (body up to 512 KB) atomically as one write; structure is validated on the final state only; add_step may declare a batch-local ref for later ops; the response carries refs, the full draft and validation findings; requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512},"ops":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"update_draft"},"meta":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":512},"domain":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"ucel":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"vstup":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"vystup":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"ownerId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"teamId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"escalationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"trigger":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"sla":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"frequency":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"reviewFrequency":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"impact":{"anyOf":[{"type":"string","enum":["High","Medium","Low"]},{"type":"null"}]}}},"bodySections":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":100},"additionalProperties":{"type":"string","maxLength":20000}}},"required":["op"]},{"type":"object","properties":{"op":{"type":"string","const":"add_step"},"ref":{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"},"title":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["start","task","end"]},"assigneeIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"assigneesUnknown":{"type":"boolean"},"toolId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"toolUnknown":{"type":"boolean"},"sla":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"bodySections":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["Vstupy","Jak","Výstupy"]},"markdown":{"type":"string","maxLength":20000}},"required":["section","markdown"]}}},"required":["op","title","kind"]},{"type":"object","properties":{"op":{"type":"string","const":"update_step"},"stepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]},"title":{"type":"string","minLength":1,"maxLength":512},"kind":{"type":"string","enum":["start","task","end"]},"assigneeIds":{"maxItems":50,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"assigneesUnknown":{"type":"boolean"},"toolId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"toolUnknown":{"type":"boolean"},"sla":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"bodySections":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"section":{"type":"string","enum":["Vstupy","Jak","Výstupy"]},"markdown":{"type":"string","maxLength":20000}},"required":["section","markdown"]}}},"required":["op","stepId"]},{"type":"object","properties":{"op":{"type":"string","const":"remove_step"},"stepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]}},"required":["op","stepId"]},{"type":"object","properties":{"op":{"type":"string","const":"connect_steps"},"fromStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]},"toStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]}},"required":["op","fromStepId","toStepId"]},{"type":"object","properties":{"op":{"type":"string","const":"disconnect_steps"},"fromStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]},"toStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]}},"required":["op","fromStepId","toStepId"]},{"type":"object","properties":{"op":{"type":"string","const":"set_branch"},"fromStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]},"type":{"type":"string","enum":["exclusive","parallel","inclusive","complex"]},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"branches":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"toStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"condition":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}]},"polarity":{"anyOf":[{"type":"string","enum":["yes","no"]},{"type":"null"}]}},"required":["toStepId"]}}},"required":["op","fromStepId","type","branches"]},{"type":"object","properties":{"op":{"type":"string","const":"clear_branch"},"fromStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]}},"required":["op","fromStepId"]},{"type":"object","properties":{"op":{"type":"string","const":"set_join"},"toStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]},"join":{"type":"string","enum":["parallel","inclusive","complex"]},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"threshold":{"type":"integer","minimum":1,"maximum":100},"fromStepIds":{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]}}},"required":["op","toStepId","join","fromStepIds"]},{"type":"object","properties":{"op":{"type":"string","const":"clear_join"},"toStepId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","maxLength":40,"description":"Batch-local step ref matching ^[a-z][a-z0-9_-]{0,39}$, declared by an earlier add_step"}]}},"required":["op","toStepId"]}]}}},"required":["requestId","expectedRevision","ops"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"replay":{"type":"boolean"},"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"refs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"draft":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"contentSource":{"type":"string","const":"draft"},"isActive":{"type":"boolean","const":false},"status":{"type":"string","const":"draft"},"statusLabel":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"meta":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}]},"ucel":{"anyOf":[{"type":"string"},{"type":"null"}]},"vstup":{"anyOf":[{"type":"string"},{"type":"null"}]},"vystup":{"anyOf":[{"type":"string"},{"type":"null"}]},"frequency":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewFrequency":{"anyOf":[{"type":"string"},{"type":"null"}]},"impact":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Business impact; usually High, Medium or Low, but older records may hold free text"},"escalation":{"anyOf":[{"type":"string"},{"type":"null"}]},"owner":{"anyOf":[{"type":"string"},{"type":"null"}]},"team":{"anyOf":[{"type":"string"},{"type":"null"}]},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"}},"required":["name","domain","ucel","vstup","vystup","frequency","reviewFrequency","impact","escalation","owner","team","trigger","sla"]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"assigneeIds":{"type":"array","items":{"type":"string"}},"toolId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sla":{"anyOf":[{"type":"string"},{"type":"null"}]},"noTimeLimit":{"type":"boolean"},"assigneesUnknown":{"type":"boolean"},"slaUnknown":{"type":"boolean"},"toolUnknown":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"bodySections":{"type":"object","additionalProperties":{"type":"string"}},"sortOrder":{"type":"number"}},"required":["id","title","type","assigneeIds","toolId","sla","assigneesUnknown","slaUnknown","toolUnknown","status","bodySections","sortOrder"]}},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fromStep":{"type":"string"},"toStep":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"condition":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"type":"number"}},"required":["id","fromStep","toStep","label","condition","branch","sortOrder"]}},"phase":{"type":"string"},"referencedEntityIds":{"type":"array","items":{"type":"string"}},"references":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["entity","process"]},"name":{"type":"string"}},"required":["id","kind","name"]}},"revision":{"type":"string"}},"required":["processId","eveSessionId","contentSource","isActive","status","statusLabel","name","meta","bodySections","steps","connections","phase","referencedEntityIds","references","revision"]},"validation":{"type":"object","properties":{"processId":{"type":"string"},"revision":{"type":"string"},"ready":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"stepId":{"type":"string"},"connectionId":{"type":"string"}},"required":["code","message"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"stepId":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"required":["processId","revision","ready","blockers","warnings"]}},"required":["requestId","replay","processId","eveSessionId","status","previousStatus","revision","refs","draft","validation"]}}}},"400":{"description":"Invalid input, or VALIDATION; a failing op is named by opIndex and opType (schema errors are reported before any op runs; a failure of the final structure carries no opIndex); nothing was written","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Process not found, or an op targets a step that does not exist (with opIndex and opType); nothing was written","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed: NO_OPEN_DRAFT, or a draft builder version that cannot be edited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/status":{"get":{"operationId":"getProcessStatus","summary":"Lifecycle and processing status of a process, for bounded polling until terminal is true","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["draft","waiting_for_processing","processing","processing_failed","embedding","embedding_failed","active","rejected","retired"]},"statusLabel":{"type":"string"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"isActive":{"type":"boolean"},"isDraft":{"type":"boolean"},"failed":{"type":"boolean"},"failureType":{"anyOf":[{"type":"string","enum":["draft","waiting_for_processing","processing","processing_failed","embedding","embedding_failed","active","rejected","retired"]},{"type":"null"}]},"workflowRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"terminal":{"type":"boolean"}},"required":["id","status","statusLabel","previousStatus","isActive","isDraft","failed","failureType","workflowRunId","terminal"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/reopen":{"post":{"operationId":"reopenProcess","summary":"Switch an active process back to a draft and open an edit session; the committed state is preserved; requires requestId and the committed revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512}},"required":["requestId","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"eveSessionId":{"type":"string"},"status":{"type":"string","const":"draft"},"previousStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","eveSessionId","status","previousStatus","revision","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed, e.g. PROCESS_NOT_READY, NO_OPEN_DRAFT or a process in the wrong lifecycle status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/submit":{"post":{"operationId":"submitProcess","summary":"Submit the open draft through the submission pipeline; the process is waiting_for_processing, not active, when this returns, so poll the status; requires requestId and the draft revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512}},"required":["requestId","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"status":{"type":"string","const":"waiting_for_processing"},"workflowRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"string"},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","status","workflowRunId","revision","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Precondition failed, e.g. PROCESS_NOT_READY, NO_OPEN_DRAFT or a process in the wrong lifecycle status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}},"/processes/{id}/archive":{"post":{"operationId":"archiveProcess","summary":"Archive an obsolete process as a soft delete that keeps its record, history and references; requires requestId and the committed revision","tags":["Processes"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"string","minLength":1,"maxLength":512}},"required":["requestId","expectedRevision"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"processId":{"type":"string"},"status":{"type":"string","const":"retired"},"archivedAt":{"type":"string"},"requestId":{"type":"string"},"replay":{"type":"boolean"}},"required":["processId","status","archivedAt","requestId","replay"]}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, invalid, expired or revoked credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"description":"Bearer challenge pointing at the OAuth protected resource metadata","schema":{"type":"string"}}}},"403":{"description":"The credential may not call this operation, or external writes are disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in the organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflict: STALE_REVISION (re-read and reconsider), PROCESS_BUSY, or a requestId reused with a different input or still in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The OAuth authorization server is unreachable; retry later","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Personal API token (Settings → API tokens) or OAuth access token"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","appCode","message"],"properties":{"code":{"type":"string","description":"tRPC error code, e.g. NOT_FOUND or TOO_MANY_REQUESTS"},"appCode":{"type":"string","description":"Stable application error code, identical across REST, tRPC and MCP"},"message":{"type":"string"},"retryAfterSeconds":{"type":"integer","description":"Present on TOO_MANY_REQUESTS"},"budget":{"type":"string","description":"The exhausted rate-limit budget, present on TOO_MANY_REQUESTS"},"revision":{"type":"string","description":"The current revision, present on STALE_REVISION"},"opIndex":{"type":"integer","description":"Present on a batch edit error: the index of the failing op"},"opType":{"type":"string","description":"Present on a batch edit error: the op type of the failing op"},"sameNameOtherType":{"type":"array","description":"Present on NEEDS_CONFIRMATION: entities with the same name under another type","items":{"type":"object","required":["id","typeSlug","name"],"properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}}}},"similar":{"type":"array","description":"Present on NEEDS_CONFIRMATION: entities with a similar name","items":{"type":"object","required":["id","typeSlug","name"],"properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"}}}},"items":{"type":"array","description":"Present on BATCH_ITEMS_FAILED: every failing item, ordered by index; nothing was written","items":{"type":"object","required":["index","appCode","message"],"properties":{"index":{"type":"integer"},"ref":{"type":"string"},"appCode":{"type":"string"},"message":{"type":"string"},"sameNameOtherType":{"type":"array","description":"An entity of this call carries batchIndex and no id","items":{"type":"object","required":["typeSlug","name"],"properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"batchIndex":{"type":"integer"}}}},"similar":{"type":"array","items":{"type":"object","required":["id","typeSlug","name"],"properties":{"id":{"type":"string"},"typeSlug":{"type":"string"},"name":{"type":"string"}}}}}}},"blockingProcesses":{"type":"array","description":"Present on ENTITY_IN_USE: the visible processes that still use the entity","items":{"type":"object","required":["processId","processName"],"properties":{"processId":{"type":"string"},"processName":{"type":"string"}}}},"hiddenBlockingProcessCount":{"type":"integer","description":"Present on ENTITY_IN_USE: blocking processes the caller cannot see"}},"additionalProperties":true}}}}}}