Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Orcha Directory sync API
version: 1.0.0
description: 'Token-authenticated REST API for AI agents: files, folders, memories, retrieval, filesystem-shaped access, ingestion, directory sync, structured databases, and feedback. Authenticate with an `orca_` API token created on the Tokens page; the token is scoped to one workspace and to `read`/`write`/`delete` permissions capped at the owner''s live workspace role. Every request counts against per-token minute/hour/day rate-limit windows reported in `X-RateLimit-*` headers.'
contact:
name: Orcha
url: https://tryorcha.com
servers:
- url: https://app.tryorcha.com
description: Production
security:
- bearerAuth: []
tags:
- name: Directory sync
description: Manifest-based directory synchronization
paths:
/api/v1/sync/preview:
post:
operationId: previewSync
tags:
- Directory sync
summary: Preview a directory sync
description: 'Creates a run in ready state without writing content and returns it with a `wouldPrune` list. Requires a workspace-wide token; folder-scoped tokens are rejected.
Permission required: `write`.'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SyncPreviewRequest'
responses:
'201':
description: Preview run
content:
application/json:
schema:
$ref: '#/components/schemas/SyncRun'
'400':
description: Invalid request body or parameters; `errors` carries the validation issues
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing, invalid, expired, or deactivated API token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Token lacks the required permission or the resource is outside its scope
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: A per-token rate-limit window is exhausted; see the Retry-After header
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/sync/{runId}:
parameters:
- name: runId
in: path
required: true
description: Sync run ID
schema:
type: string
get:
operationId: getSyncRun
tags:
- Directory sync
summary: Get sync run status
description: 'Get sync run status
Permission required: `read`.'
responses:
'200':
description: Sync run
content:
application/json:
schema:
$ref: '#/components/schemas/SyncRun'
'401':
description: Missing, invalid, expired, or deactivated API token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Token lacks the required permission or the resource is outside its scope
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Resource not found in the token's workspace
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: A per-token rate-limit window is exhausted; see the Retry-After header
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
operationId: deleteSyncRun
tags:
- Directory sync
summary: Delete a sync run
description: 'Removes the run and its stored manifest snapshot; synced content is untouched, but deleting a completed run forfeits its rollback. Busy runs return 409.
Permission required: `write`.'
responses:
'204':
description: Run deleted
'401':
description: Missing, invalid, expired, or deactivated API token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Token lacks the required permission or the resource is outside its scope
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Resource not found in the token's workspace
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Run is busy
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: A per-token rate-limit window is exhausted; see the Retry-After header
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/sync/{runId}/start:
parameters:
- name: runId
in: path
required: true
description: Sync run ID
schema:
type: string
post:
operationId: startSyncRun
tags:
- Directory sync
summary: Start a sync run
description: 'Re-checks plan limits, then queues the run. Returns 403 with `error: "LIMIT_EXCEEDED"` when the run exceeds plan limits, or 409 when the run is not startable.
Permission required: `write`.'
responses:
'202':
description: Run queued
content:
application/json:
schema:
$ref: '#/components/schemas/SyncRun'
'401':
description: Missing, invalid, expired, or deactivated API token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Token lacks the required permission or the resource is outside its scope
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Resource not found in the token's workspace
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: Run is not in a startable state
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: A per-token rate-limit window is exhausted; see the Retry-After header
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
SyncPreviewRequest:
type: object
required:
- name
- documents
properties:
name:
type: string
description: Durable sync identity; later runs with the same name reconcile against earlier ones
conflictPolicy:
type: string
enum:
- update
- skip
- duplicate
default: update
description: update applies local changes but never overwrites a file edited in Orcha since the last sync, flagging a conflict instead
prune:
type: boolean
description: Move previously synced files absent from this manifest to trash
documents:
type: array
maxItems: 5000
items:
$ref: '#/components/schemas/SyncDocument'
description: Up to 5,000 documents and 24 MB of content per run
additionalProperties: true
Error:
type: object
description: Standard error body. `errors` appears on validation failures; `code` appears when the failing operation exposes a machine-readable cause.
required:
- message
properties:
message:
type: string
code:
type: string
errors:
type: array
description: Validation issues (Zod issue objects)
items:
type: object
additionalProperties: true
SyncRun:
type: object
properties:
id:
type: string
status:
type: string
enum:
- ready
- queued
- running
- completed
- completed_with_warnings
- failed
- cancelled
- rolled_back
counters:
type: object
properties:
created:
type: integer
updated:
type: integer
skipped:
type: integer
conflicts:
type: integer
pruned:
type: integer
additionalProperties: true
wouldPrune:
type: array
description: 'Preview only: previously synced files and folders absent from this manifest that a prune pass would move to trash'
items:
type: object
additionalProperties: true
warnings:
type: array
items:
type: object
additionalProperties: true
additionalProperties: true
SyncDocument:
type: object
required:
- path
- content
properties:
path:
type: string
description: Relative path; absolute paths, .. segments, and control characters are rejected
content:
type: string
description: Up to 5 MB per document
tags:
type: array
items:
type: string
additionalProperties: false
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Orcha API token, prefixed `orca_`. Shown once at creation; only a hashed verifier is stored.