# Build with the REST API

Full OpenAPI 3.1 specification with in-browser try-it. Authenticate with a token and control the entire workspace over HTTP.

Get your API key [Jump to reference](/content/agents/api#api-reference/index.html)

## authenticate

```bash
curl https://app.ambiguous.ai/api/documents \
  -H "Authorization: Bearer $AMBIGUOUS_API_KEY" \ 
  -H "Content-Type: application/json"
```

## create a document

```bash
curl -X POST https://app.ambiguous.ai/api/docs \
  -H "Authorization: Bearer $AMBIGUOUS_API_KEY" \ 
  -H "Content-Type: application/json" \ 
  -d '{
    "title": "Q4 Revenue Plan",
    "content": "# Q4 Revenue Plan\n\nTargets and strategy for next quarter."
  }'

# → 201 Created
# → { "id": "doc_8xk2m", "title": "Q4 Revenue Plan", ... }
```

## Type a request and watch the response

Every endpoint returns typed JSON with consistent shapes. Request bodies are validated against OpenAPI 3.1 schemas. Responses include the resource ID, timestamps, and workspace context: everything your agent needs to chain the next call.

- Typed schemas/ OpenAPI 3.1 with full validation
- Consistent shapes/ Same envelope across all 18 modules
- Sub-50ms reads/ P95 latency on GET endpoints[production-metrics · 2026-05 · 30-day rolling]

## 18 modules served from one base URL

Every module exposes CRUD endpoints under `https://app.ambiguous.ai/api/`. Bearer token authentication on every request.

### Documents

- GET/api/documents
- POST/api/docs
- PATCH/api/documents/:id
- DELETE/api/documents/:id

### Sheets

- GET/api/sheets
- POST/api/sheets
- GET/api/sheets/:id/range
- PATCH/api/sheets/:id/cells

### Slides

- GET/api/slides
- POST/api/slides
- PATCH/api/slides/:id

### Canvas

- POST/api/canvas
- GET/api/canvas/:id/manifest
- POST/api/canvas/:id/elements
- PATCH/api/canvas/:id/elements/:elId

### Wiki

- GET/api/wiki/pages
- POST/api/wiki/pages
- PATCH/api/wiki/pages/:id

### Mail

- GET/api/mail/inbox
- POST/api/mail/send
- GET/api/mail/:id

### Chat

- GET/api/channels
- POST/api/channels/:id/messages
- GET/api/channels/:id

### CRM

- GET/api/crm/contacts
- POST/api/crm/deals
- PATCH/api/crm/deals/:id

### Tasks

- GET/api/tasks
- POST/api/tasks
- PATCH/api/tasks/:id/complete

### Calendar

- GET/api/calendar/events
- POST/api/calendar/events
- GET/api/calendar/availability

### Forms

- GET/api/forms
- POST/api/forms/:id/submit
- GET/api/forms/:id/responses

### Drive

- GET/api/drive/files
- POST/api/drive/upload
- DELETE/api/drive/files/:id

### Identity

- GET/api/users
- POST/api/auth/signup-agent
- GET/api/users/:id

### Admin

- GET/api/admin/users
- GET/api/admin/audit-log
- PATCH/api/admin/settings

### Assistant

- POST/api/assistant/chat
- GET/api/assistant/recent-activity

### Automations

- GET/api/automations
- POST/api/automations
- POST/api/automations/:id/trigger

### Search

- POST/api/search
- GET/api/search/suggestions

## send an email

```bash
curl -X POST https://app.ambiguous.ai/api/mail/send \
  -H "Authorization: Bearer $AMBIGUOUS_API_KEY" \ 
  -H "Content-Type: application/json" \ 
  -d '{
    "to": ["team@company.com"],
    "subject": "Weekly update",
    "body_markdown": "Here is this week progress report."
  }'

# → 200 OK
# → { "id": "msg_3kx9f", "status": "sent" }
```

## Full API reference

Browse every endpoint, read typed schemas, and test requests in-browser. Powered by Scalar and our OpenAPI 3.1 specification.

## AuthenticationRequired

Selected Auth Type: bearerAuth

|     |
| --- |
| JWT (humans) or API key with `ak_` prefix (agents). Both via `Authorization: Bearer <token>`.<br>More |

## Documents

Collaborative documents: create, read, edit, share, version, comment on and export Docs, plus the document family operations Sheets, Slides and Canvas share.

### Documents Operations

- get/api/documents/{id}/source-reader-snapshot
- get/api/documents
- post/api/docs
- post/api/documents/import
- get/api/documents/dictionary
- get/api/documents/settings/page-layout
- put/api/documents/settings/page-layout
- get/api/documents/shared-with-me
- get/api/documents/trash
- post/api/documents/completions

---

Server: https://app.ambiguous.ai

/api/health

## Send Request

ctrlControl

↵Enter

## Where to go from here
