SynqedDocs
API referenceDocuments

Create or update a document

Pushes text into the brain. Documents are keyed by (`source`, `external_id`): pushing the same pair again updates the existing document in place, so syncing is safe to repeat. The text is encrypted at rest and indexed for search within seconds.

POST
/documents

Pushes text into the brain. Documents are keyed by (source, external_id): pushing the same pair again updates the existing document in place, so syncing is safe to repeat. The text is encrypted at rest and indexed for search within seconds.

Authorization

bearerAuth
headerAuthorizationBearer <sk_live_<region>_<secret>>

Header Parameters

Idempotency-Key?string

Unique key (≤ 255 chars) that makes retries of this request safe for 24 hours.

Lengthlength <= 255

Request Body

application/json
  1. body
source*string

Label for the system this text comes from, e.g. notion, hubspot, zendesk.

Match^[a-z0-9][a-z0-9_.-]{0,63}$
external_id*string

The record's id in that system. Re-pushing the same (source, external_id) updates it.

Length1 <= length <= 256
title*string
Length1 <= length <= 500
body*string

Plain text or Markdown, up to 200,000 characters.

Lengthlength <= 200000
url?|

Link back to the original (http or https).

metadata?

Up to 50 flat key/value pairs (strings ≤ 1000 chars, numbers, booleans).

visibility?|

Who can see what you write. Defaults to the key's own data access; it can narrow that, never widen it.

Response Body

Success

application/json
  1. response
object*string
id*string
status*string
Value in"created""updated"
Example Request
curl -X POST 'https://api.synqed.dev/v1/documents' \  -H 'Content-Type: application/json' \  -d '{  "source": "string",  "external_id": "string",  "title": "string",  "body": "string"}'
Example Response
{  "object": "document_upsert",  "id": "string",  "status": "created"}