Use Cortex in your code
Key-authenticated REST endpoints for scripts, servers, and integrations.
Authentication
Every request carries your key on the Authorization header. Keys start with ntvz_ and only ever see the clients your account can access.
curl https://cortex.nativz.io/api/v1/clients -H "Authorization: Bearer ntvz_xxx"
API access is enabled by your Nativz team. If you can't create a key, contact your account manager.
Get your API keyTopic search 2
Queue topic research for a client. The search lands in the Cortex app for a teammate to run; results are reviewed there.
POST/api/v1/searchQueue a topic search for a client
API key (Bearer token via Authorization header)
Request body
client_id - Client UUID (required) query - Search query string (required) search_mode - 'quick' | 'deep' (default 'quick')
Response
{{ search: { id, query, status, search_mode, created_at } }}HOW TO USE
Queue a topic search for a client
curl -X POST https://cortex.nativz.io/api/v1/search \ -H "Authorization: Bearer ntvz_xxx" \ -H "Content-Type: application/json" \ -d '{"client_id":"1f2e3d4c-5b6a-7c8d-9e0f-1a2b3c4d5e6f","query":"sustainable coffee trends","search_mode":"deep"}'
COMMON MISTAKES
This endpoint only creates the record in "pending" status; a teammate runs the research from the Cortex app. Do not expect topics in the POST response. Completed research is reviewed in the Cortex app; there is no v1 endpoint that returns results.
client_id must be a UUID. Sending a slug returns 400. Resolve the slug via GET /api/v1/clients/:id first and use the returned client.id.
GET/api/v1/searchUsage hint (use POST to queue a search)
API key (Bearer token via Authorization header)
Response
405 Method Not Allowed
{{ error: 'Use POST to trigger a search' }}HOW TO USE
Example request
curl https://cortex.nativz.io/api/v1/search \ -H "Authorization: Bearer ntvz_xxx"
COMMON MISTAKES
GET on this path is not a list endpoint; it returns 405 with a usage hint. To start a search, use POST /api/v1/search. Completed research is reviewed in the Cortex app.
Clients 2
List and fetch the clients your key can access to find a client_id for searches and posts.
GET/api/v1/clientsList the clients your key can access
API key (Bearer token via Authorization header)
Response
{{ clients: Client[] }}HOW TO USE
List every client
curl https://cortex.nativz.io/api/v1/clients -H "Authorization: Bearer ntvz_xxx"
COMMON MISTAKES
Do not call this on a tight loop to "watch" for new clients. The limit is 30 requests/min per key; you will hit 429 with a Retry-After header. Cache the list and refetch only when you actually onboard a client.
GET/api/v1/clients/:idFetch one client by UUID or slug
API key (Bearer token via Authorization header)
Query params
id - Client UUID or slug
Response
{{ client: Client, contacts: Contact[] }}HOW TO USE
Fetch a client by slug
curl https://cortex.nativz.io/api/v1/clients/acme-coffee \ -H "Authorization: Bearer ntvz_xxx"
Fetch a client by UUID
curl https://cortex.nativz.io/api/v1/clients/1f2e3d4c-5b6a-7c8d-9e0f-1a2b3c4d5e6f \ -H "Authorization: Bearer ntvz_xxx"
COMMON MISTAKES
The path segment accepts either a UUID or a slug, not a client name. Passing "Acme Coffee" returns 404. Slugify it ("acme-coffee") or use the UUID from GET /api/v1/clients.
Posts 2
List and fetch scheduled posts for a client.
GET/api/v1/postsList scheduled posts for a client
API key (Bearer token via Authorization header)
Query params
client_id - Client UUID (required) status - Filter by post status: 'draft' | 'scheduled' | 'published' (optional)
Response
{{ posts: ScheduledPost[] }}HOW TO USE
List scheduled posts for a client
curl "https://cortex.nativz.io/api/v1/posts?client_id=1f2e3d4c-5b6a-7c8d-9e0f-1a2b3c4d5e6f&status=scheduled" \ -H "Authorization: Bearer ntvz_xxx"
COMMON MISTAKES
client_id is required and must be a UUID. Calling GET /api/v1/posts with no client_id returns 400, and a slug returns "Invalid client_id format". Resolve the slug to a UUID first.
GET/api/v1/posts/:idFetch one post with platform and media details
API key (Bearer token via Authorization header)
Query params
id - Scheduled post UUID
Response
{{ post: ScheduledPost & { scheduled_post_platforms, scheduled_post_media } }}HOW TO USE
Fetch one post with platform + media detail
curl https://cortex.nativz.io/api/v1/posts/3c4d5e6f-7a8b-9c0d-1e2f-3a4b5c6d7e8f \ -H "Authorization: Bearer ntvz_xxx"
COMMON MISTAKES
The id is the scheduled_post UUID, not a client_id. To find a post's id, list with GET /api/v1/posts?client_id=... first; passing a client_id here returns 404.