REST API

Save and delete documents of hundreds or thousands of pages from your own scripts. No AI involved.

Instead of adding a PDF, a spreadsheet or a report one at a time by hand, a script does the whole run: you extract the text and split it yourself, and send the result.

What you save here is identical to anything saved through a connected AI — same store, and your AI recalls it the same way.

There is no read API. Search and retrieval stay with MCP and your dashboard.

Getting started

  1. Create a key in the REST API card on your account page. Its name is recorded as the origin of everything saved with it — Import script, pdf-importer, whatever you'll recognise later.
  2. The key is shown once, right after you create it. Copy it then; it can't be displayed again.
  3. Create as many keys as you like and delete any of them at any time.

Authentication

Base URLhttps://contextick.ai
Authorization: Bearer api_xxxxxxxx

Only keys that start with api_ work here. An MCP key or an OAuth token gets 401 on this API, and a REST API key gets 401 on the MCP endpoint — the two surfaces are separate so you can revoke one without touching the other.

Endpoints

POST /api/v1/notes

Saves one item.

Body

FieldTypeRequiredLimit
titlestring120 characters — longer is trimmed
summarystring300 characters — longer is trimmed
contentstring16,000 characters — longer is rejected

All three must be non-empty; a blank one is refused rather than filled in by guesswork.

Request

curl -X POST https://contextick.ai/api/v1/notes \
  -H "Authorization: Bearer api_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"title":"Q3 report","summary":"Revenue and headcount for Q3.","content":"…"}'

Response 201

{ "id": 42, "saved_items": 118, "stored_bytes": 1048576 }

saved_items and stored_bytes are your totals after the save. If they couldn't be read, the fields are absent rather than zero.

The origin recorded on the item is the key's name. It can't be set from the request.

DELETE /api/v1/notes/{id}

Deletes one item.

Request

curl -X DELETE https://contextick.ai/api/v1/notes/42 \
  -H "Authorization: Bearer api_xxxxxxxx"

POST /api/v1/notes/delete

Deletes several at once.

Body

FieldTypeRequiredLimit
idsnumber[]50 ids per call — more is rejected

This is the way to undo a bulk import.

Request

curl -X POST https://contextick.ai/api/v1/notes/delete \
  -H "Authorization: Bearer api_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"ids":[42,43]}'

Delete response 200

{ "deleted": [42], "not_found": [43], "saved_items": 117, "stored_bytes": 1040000 }

Both deletes answer with the same shape. An id that isn't there is reported in not_found, not treated as an error. Deleting is permanent and can't be undone.

Split long documents yourself

The content limit is 16,000 characters per save. Nothing is split for you — anything longer is refused with content_too_long. Cut the document into coherent parts and save each one, giving every part its own title and summary: you know the file name and the section headings, which makes those parts far easier to recall later.

Errors

Every failure uses one shape:

{ "error": { "code": "quota_exceeded", "message": "…" } }

Branch on code. The message is prose for a human reader and may change at any time.

400 Fix the request and retry empty_titleempty_summaryempty_contentcontent_too_longtoo_many_idsinvalid_bodyinvalid_id
401 Check the api_ key unauthorized
402 Settle the billing state — recall keeps working meanwhile payment_past_duesubscription_pausedsubscription_canceledrefund_pending
429 Retry the same request shortly embedding_rate_limited
507 Free up space or move to a larger plan — don't retry as-is quota_exceeded
503 500 Temporary or server-side — retry shortly

Good to know