Referência da API REST

Todos os endpoints da API REST do CortexPlus, gerados a partir da especificação OpenAPI publicada. As descrições dos campos vêm direto da spec, em inglês.

URL base e autenticação

Todos os endpoints ficam em https://api.cortexplus.io e recebem e devolvem JSON. Os corpos são limitados a 1 MB, exceto uploads de áudio e imagem.

Envie a sua chave como Authorization: Bearer cortex_.... Crie uma em Chaves de API. Os endpoints marcados como sem autenticação servem para criar conta ou entrar.

Requisição autenticada
curl -sS https://api.cortexplus.io/v1/auth/me \
  -H 'authorization: Bearer cortex_...'

Conta e login

POST /v1/signup Sem autenticação

Create a CortexPlus account.

Create an account or begin signing in. CortexPlus sends an authentication key by email; use the connect operation with that key next.

Corpo da requisição application/json

NomeTipoDescrição
email *string (email)Email address for the CortexPlus account.
name string
client stringName of the AI platform requesting the connection.

Respostas

202 Successful response.

NomeTipoDescrição
sent *boolean
expiresInMinutes *integer
POST /v1/connect Sem autenticação

Connect a CortexPlus account.

Redeem the authentication key received by email. Save the returned apiKey in the connector configuration.

Corpo da requisição application/json

NomeTipoDescrição
key *stringAuthentication key received by email.
client stringName of the AI platform requesting the connection.

Respostas

200 Successful response.

NomeTipoDescrição
apiKey *string
email *string
name *string
POST /v1/auth/register Sem autenticação

Register an account and start a device session.

Create a CortexPlus account and issue a device token for this app install.

Corpo da requisição application/json

NomeTipoDescrição
email *string (email)
name string
password *string8–∞ chars
deviceName string
platform string

Respostas

201 Successful response.

NomeTipoDescrição
deviceToken *stringDevice credential (cxd_…); use it as the bearer token.
user *object
POST /v1/auth/login Sem autenticação

Log in and start a device session.

Log in with email and password and issue a device token for this app install.

Corpo da requisição application/json

NomeTipoDescrição
email *string (email)
password *string
deviceName string
platform string

Respostas

200 Successful response.

NomeTipoDescrição
deviceToken *stringDevice credential (cxd_…); use it as the bearer token.
user *object
POST /v1/auth/key Sem autenticação

Request an email authentication key.

Send an authentication key to the account email address.

Corpo da requisição application/json

NomeTipoDescrição
email *string (email)

Respostas

202 Successful response.

NomeTipoDescrição
sent *boolean
expiresInMinutes *integer
POST /v1/auth/key/redeem Sem autenticação

Redeem an email authentication key.

Redeem the authentication key received by email and issue a device token for this app install.

Corpo da requisição application/json

NomeTipoDescrição
key *stringAuthentication key received by email.
deviceName string
platform string

Respostas

200 Successful response.

NomeTipoDescrição
deviceToken *stringDevice credential (cxd_…); use it as the bearer token.
user *object
GET /v1/auth/me Chave Bearer

Get the current account.

Return the account behind the presented credential.

Respostas

200 Successful response.

PATCH /v1/auth/me Chave Bearer

Update the current account profile.

Update the account display name and/or language, timezone and geolocation settings.

Corpo da requisição application/json

NomeTipoDescrição
name string1–100 chars
settings object
settings.language "pt-BR" | "en" | "es"
settings.timezone string1–∞ chars
settings.geolocation booleanRecord location sent with memory captures. · default true

Respostas

200 Successful response.

POST /v1/auth/password Chave Bearer

Set or change the account password.

Set a password on a passwordless account, or change it when currentPassword is provided. Other device tokens are revoked.

Corpo da requisição application/json

NomeTipoDescrição
newPassword *string8–∞ chars
currentPassword stringRequired when the account already has a password.

Respostas

204 Password updated.

GET /v1/auth/devices Chave Bearer

List devices.

List the account’s active device tokens.

Respostas

200 Successful response.

NomeTipoDescrição
items *object[]
currentDeviceId *string | nullId of the calling device when authenticated with a device token.
DELETE /v1/auth/devices/{id} Chave Bearer

Revoke a device.

Revoke a device token. Use the id current to revoke the device making this call (sign out).

Parâmetros

NomeTipoDescrição
id *string · pathDevice id, or the literal current.

Respostas

204 Device revoked.

Memórias

POST /v1/search Chave Bearer

Search memory.

Search the user’s CortexPlus memory.

Corpo da requisição application/json

NomeTipoDescrição
query *stringText to search for in memory.
limit integer1–50, default 10

Respostas

200 Successful response.

NomeTipoDescrição
results *object[]
results[].id *string
results[].title *string
results[].url *string (uri)
results[].text string
POST /v1/recall Chave Bearer

Recall context.

Build context from the user’s CortexPlus memory.

Corpo da requisição application/json

NomeTipoDescrição
query *stringQuestion to answer from memory.
limit integer1–50, default 10
depth integer0–3, default 1
maxChars integer500–20000, default 6000

Respostas

200 Successful response.

NomeTipoDescrição
text *string
matches *integer
GET /v1/memories/{id} Chave Bearer

Get a memory.

Retrieve one CortexPlus memory by id.

Parâmetros

NomeTipoDescrição
id *string · pathMemory id.

Respostas

200 Successful response.

NomeTipoDescrição
id *string
title *string
text *string
url *string (uri)
metadata object
metadata.type string
metadata.tags string[]
metadata.createdAt string
metadata.updatedAt string
metadata.client string | null
metadata.status string | null
metadata.memory object
PATCH /v1/memories/{id} Chave Bearer

Update a memory.

Update a memory and return the full node.

Parâmetros

NomeTipoDescrição
id *string · pathMemory id.

Corpo da requisição application/json

NomeTipoDescrição
title string
content string
type string
tags string[]
attributes object

Respostas

200 Successful response.

DELETE /v1/memories/{id} Chave Bearer

Delete a memory.

Delete one CortexPlus memory by id.

Parâmetros

NomeTipoDescrição
id *string · pathMemory id.

Respostas

204 Memory deleted.

POST /v1/remember Chave Bearer

Remember a note.

Store a note in the user’s CortexPlus memory.

Corpo da requisição application/json

NomeTipoDescrição
content *stringNote content to store.
title string
tags string[]
type stringdefault "note"

Respostas

201 Successful response.

NomeTipoDescrição
id *string
title string
POST /v1/uploads Chave Bearer

Create an audio upload.

Create a signed upload URL for an audio memory.

Corpo da requisição application/json

NomeTipoDescrição
name *stringName of the audio file.
contentType *stringMIME type of the audio file.

Respostas

200 Successful response.

NomeTipoDescrição
key *string
uploadUrl *string (uri)
expiresIn *integer
GET /v1/memories Chave Bearer

List memories.

List the account’s memories ordered by last update, or search them semantically with q. Returns full nodes.

Parâmetros

NomeTipoDescrição
limit integer · query1–100, default 30
offset integer · query≥ 0, default 0
type string · query
tag string[] · queryRepeatable tag filter.
client string · query
q string · querySemantic search query.
mode "semantic" | "text" · querydefault "semantic"

Respostas

200 Successful response.

NomeTipoDescrição
items *object[]
limit integer
offset integer
POST /v1/memories Chave Bearer

Save a memory.

Classify and save text from a note, task, or reminder. Binary audio is sent to storage and transcribed asynchronously; binary images are described and OCRed asynchronously.

Parâmetros

NomeTipoDescrição
Idempotency-Key string · headerClient-generated idempotency key; overrides clientId in the request body or query. · 8–100 chars
clientId string · queryClient id fallback for JSON or binary captures; body clientId takes precedence for JSON, and Idempotency-Key takes precedence over both. · 8–100 chars
capturedAt string (date-time) · queryISO capture time fallback for JSON or binary captures; body capturedAt takes precedence for JSON.
lat number · queryCapture latitude for binary uploads; requires lon. · -90–90
lon number · queryCapture longitude for binary uploads; requires lat. · -180–180
accuracy number · queryOptional capture accuracy in meters for binary uploads. · ≥ 0

Corpo da requisição application/json, audio/*, image/*

Opção 1

NomeTipoDescrição
text *stringText to classify and save.
tags string[]
via string
location objectCapture coordinates recorded in attributes.location. The backend discards the value when the account geolocation setting is off.
location.lat *number-90–90
location.lon *number-180–180
location.accuracy number≥ 0
location.capturedAt string (date-time)
clientId string8–100 chars
capturedAt string (date-time)

Opção 2

NomeTipoDescrição
key *stringR2 object key from createUpload.
durationSeconds number≥ 0
contentType string
name string
tags string[]
via string
location objectCapture coordinates recorded in attributes.location. The backend discards the value when the account geolocation setting is off.
location.lat *number-90–90
location.lon *number-180–180
location.accuracy number≥ 0
location.capturedAt string (date-time)
clientId string8–100 chars
capturedAt string (date-time)

Opção 3

NomeTipoDescrição
audioBase64 *stringBase64-encoded audio file, up to 25 MB after decoding.
contentType stringAudio MIME type.
name string
durationSeconds number≥ 0
tags string[]
via string
location objectCapture coordinates recorded in attributes.location. The backend discards the value when the account geolocation setting is off.
location.lat *number-90–90
location.lon *number-180–180
location.accuracy number≥ 0
location.capturedAt string (date-time)
clientId string8–100 chars
capturedAt string (date-time)

Respostas

201 Successful response.

NomeTipoDescrição
id *string
clientId *string | null
duplicate *boolean
type *string
title *string
client *string | null
status *string | null
memory *string | null
review *string | null
resolved *boolean | null
url *string (uri)
GET /v1/tasks Chave Bearer

List tasks.

List open tasks and reminders from CortexPlus.

Parâmetros

NomeTipoDescrição
status string · queryTask status to filter by. · default "open"
client string · queryClient name or slug to filter by.
limit integer · queryMaximum number of tasks to return. · 1–50, default 20

Respostas

200 Successful response.

NomeTipoDescrição
tasks *object[]
tasks[].id *string
tasks[].title *string
tasks[].client *string | null
tasks[].status *string | null
tasks[].dueAt *string | null
tasks[].url *string (uri)

Chaves de API e uso

GET /v1/apikeys Chave Bearer

List API keys.

List the account’s API keys.

Respostas

200 Successful response.

NomeTipoDescrição
items *object[]
POST /v1/apikeys Chave Bearer

Create an API key.

Create an API key. The plaintext key is returned only in this response.

Corpo da requisição application/json

NomeTipoDescrição
label *string

Respostas

201 Successful response.

DELETE /v1/apikeys/{id} Chave Bearer

Revoke an API key.

Revoke one API key by id.

Parâmetros

NomeTipoDescrição
id *string · pathAPI key id.

Respostas

204 API key revoked.

GET /v1/usage Chave Bearer

Get usage summary.

Return the account’s usage counters and plan quotas.

Respostas

200 Successful response.

Quando algo dá errado

As falhas respondem com { "error": "..." } e um status correspondente: 401 sem chave, 403 quando a chave não pode escrever, 400 quando a requisição está malformada, 404 para um item desconhecido, 429 quando o limite do plano é atingido e 503 quando a memória está brevemente inacessível.

Atingir um limite nunca bloqueia a leitura — só pausa a indexação de novidades. Você pode aumentá-lo em Cobrança ou comparar planos na página de preços.