Naturali Assistant API
Link and revoke the channel identities allowed to operate your naturali account through the Naturali Assistant.
Link and revoke the channel identities allowed to operate your naturali account through the Naturali Assistant.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/naturali-ai:naturali-ai-assistant-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: naturali.ai Assistant API
version: 1.0.0
description: The naturali.ai API. This document is the merge of every per-resource spec under openapi/v1/ — the single wire contract for all v1 endpoints.
contact:
name: naturali.ai
url: https://naturali.ai
servers:
- url: https://api.naturali.ai
description: Host of your naturali.ai deployment; every path carries the /v1 prefix.
security:
- bearerAuth: []
- oauth2:
- mcp:access
tags:
- name: Assistant
description: Link and revoke the channel identities allowed to operate your naturali account through the Naturali Assistant.
paths:
/v1/assistant/grants:
get:
tags:
- Assistant
summary: List linked identities
description: Lists the caller's assistant grants — one per channel identity that may operate their account. Grants belong to the account, so this is the caller's own set regardless of which projects they own.
operationId: listAssistantGrants
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
responses:
'200':
description: A page of grants.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Page'
- properties:
data:
type: array
items:
$ref: '#/components/schemas/AssistantGrant'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/AccountWideOnly'
/v1/assistant/grants/{grant_id}:
parameters:
- $ref: '#/components/parameters/GrantId'
delete:
tags:
- Assistant
summary: Revoke a linked identity
description: Revokes the grant, disabling the Assistant for that identity. The grant is resolved on every inbound message, so the next one from that identity is refused before the agent is invoked — revocation is immediate, not eventual. Work the grant started (a paused generation) calls no tool on its next step. The identity is free to link again afterwards.
operationId: revokeAssistantGrant
responses:
'204':
description: Grant revoked.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/AccountWideOnly'
'404':
$ref: '#/components/responses/NotFound'
'502':
$ref: '#/components/responses/GrantRevocationUnavailable'
/v1/assistant/link:
get:
tags:
- Assistant
summary: Resolve a pending link
description: 'Resolves a link token **without consuming it**, so the confirmation screen can name the identity being linked ("@user on Discord") before anyone commits to it. Naming it is what makes a link pasted into the wrong hands fail the human check as well as the server-side binding.
Reading is deliberately separate from redeeming: a single-use nonce must not be burned by a link preview, a URL scanner or a browser prefetch.'
operationId: previewAssistantLink
parameters:
- $ref: '#/components/parameters/LinkToken'
responses:
'200':
description: The identity this token would link, and what it would be allowed to do.
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantLinkPreview'
'400':
description: 'The token is unknown, expired, or already redeemed (`invalid_token` / `expired_token`). Getting a fresh one means messaging the Assistant again.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/AccountWideOnly'
post:
tags:
- Assistant
summary: Redeem a link token
description: 'Redeems a link token and creates the grant, binding the channel identity the token carries to the authenticated account. The identity is read from the token server-side — nothing in this request can point the link at a different one.
The token is the idempotency key: it is single-use, so a replay of this request fails rather than creating a second grant.'
operationId: redeemAssistantLink
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantLinkRedeem'
responses:
'201':
description: Grant created. The Assistant answers that identity from the next message on.
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantGrant'
'400':
description: 'The token is missing, unknown, expired, or already redeemed (`invalid_token` / `expired_token`).
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/AccountWideOnly'
'409':
description: 'The identity is already linked to an account (`identity_already_linked`). One channel identity operates one naturali account: re-pointing it means revoking the existing grant first, which is explicit and auditable rather than silent.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v1/assistant/context:
get:
tags:
- Assistant
summary: Read the turn's context
description: 'What the Assistant turn this call runs in was sent with: the app page the person had open and the pages they added to the message, each with the resource ids its path names. The Assistant calls it when a message points at the screen ("this playbook") or at what was added. Any other caller reads `path: null` and no pages.'
operationId: getAssistantContext
responses:
'200':
description: The turn's context.
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantTurnContext'
'401':
$ref: '#/components/responses/Unauthorized'
/v1/assistant/sessions:
get:
tags:
- Assistant
summary: List your conversations
description: Your conversations with the Assistant in the app, newest first. Each is a session of its own; a conversation on Discord or WhatsApp is not listed here.
operationId: listAssistantSessions
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
responses:
'200':
description: A page of sessions.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Page'
- properties:
data:
type: array
items:
$ref: '#/components/schemas/AssistantSession'
'400':
description: '`limit` or `cursor` is invalid.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ConversationForbidden'
'502':
$ref: '#/components/responses/TurnUnavailable'
'503':
$ref: '#/components/responses/AssistantUnavailable'
post:
tags:
- Assistant
summary: Start a conversation
description: Opens a new, empty conversation with the Assistant. It costs nothing until a message is sent, and it does not expire.
operationId: createAssistantSession
responses:
'201':
description: The new session.
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantSession'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ConversationForbidden'
'502':
$ref: '#/components/responses/TurnUnavailable'
'503':
$ref: '#/components/responses/AssistantUnavailable'
/v1/assistant/sessions/{session_id}:
parameters:
- $ref: '#/components/parameters/AssistantSessionId'
patch:
tags:
- Assistant
summary: Rename a conversation
description: Sets the name the conversation is listed by. A name given before the first message is kept.
operationId: renameAssistantSession
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
minLength: 1
maxLength: 60
description: Trimmed before it is stored.
example: Relatório diário
responses:
'200':
description: The renamed session.
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantSession'
'400':
description: '`name` is missing, blank or longer than 60 characters.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ConversationForbidden'
'404':
$ref: '#/components/responses/NotFound'
'502':
$ref: '#/components/responses/TurnUnavailable'
'503':
$ref: '#/components/responses/AssistantUnavailable'
delete:
tags:
- Assistant
summary: Delete a conversation
description: Deletes one of your conversations and its messages. What its turns cost stays on your usage.
operationId: deleteAssistantSession
responses:
'204':
description: The conversation is deleted.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ConversationForbidden'
'404':
$ref: '#/components/responses/NotFound'
'502':
$ref: '#/components/responses/TurnUnavailable'
'503':
$ref: '#/components/responses/AssistantUnavailable'
/v1/assistant/sessions/{session_id}/messages:
parameters:
- $ref: '#/components/parameters/AssistantSessionId'
get:
tags:
- Assistant
summary: Read a conversation
description: A page of one conversation, oldest first unless `order=desc`. The list leaves out tool-only turns, so a page can hold fewer than `limit` and still have a `next_cursor`.
operationId: listAssistantSessionMessages
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
- name: order
in: query
required: false
description: '`desc` reads the conversation from its newest message.'
schema:
type: string
enum:
- asc
- desc
default: asc
responses:
'200':
description: The conversation.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Page'
- properties:
data:
type: array
items:
$ref: '#/components/schemas/AssistantMessage'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ConversationForbidden'
'404':
$ref: '#/components/responses/NotFound'
'502':
$ref: '#/components/responses/TurnUnavailable'
'503':
$ref: '#/components/responses/AssistantUnavailable'
post:
tags:
- Assistant
summary: Message the Assistant
description: 'Runs one turn as your account and answers with the messages it added: yours, then the Assistant''s reply. The turn is paid from your credit and refused before it runs when the balance is below zero.'
operationId: sendAssistantSessionMessage
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantMessageCreate'
responses:
'201':
description: The messages this turn added, oldest first.
content:
application/json:
schema:
$ref: '#/components/schemas/AssistantTurnMessages'
'400':
description: '`content` is missing or blank, or `context` is not an app path.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
description: 'Your credit balance is below zero (`insufficient_credit`). Top up to message the Assistant again.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
$ref: '#/components/responses/ConversationForbidden'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: 'The session is closed or expired (`session_closed`). Start a new conversation to continue.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'502':
$ref: '#/components/responses/TurnUnavailable'
'503':
$ref: '#/components/responses/AssistantUnavailable'
components:
schemas:
AssistantTurnMessages:
type: object
description: The messages one turn added — yours, then the Assistant's reply.
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/AssistantMessage'
AssistantTurnContext:
type: object
description: The context of the Assistant turn the call runs in.
required:
- path
- attached
- pages
properties:
path:
type:
- string
- 'null'
description: 'The app path the turn''s message was sent from; `null` outside a turn, or for a turn sent from no page.
'
example: /projects/proj_V1StGXR8Z5jdHi6B/playbooks/pbk_2x7Qd9LmN4cV/cases
attached:
type: array
description: The app pages the person added to the turn's message; empty outside a turn.
items:
type: string
example:
- /projects/proj_V1StGXR8Z5jdHi6B
pages:
type: array
description: 'The page open, then each added page, with the resource ids its path names. Empty outside a turn.
'
items:
$ref: '#/components/schemas/AssistantContextPage'
AssistantLinkRedeem:
type: object
required:
- token
properties:
token:
type: string
description: The single-use token from the link the Assistant sent on the channel.
example: alt_9f8e7d6c5b4a39281706
ErrorResponse:
type: object
required:
- error
properties:
error:
type: object
description: Structured error. Every error response uses this shape, so `code` can be read without first checking the type of `error`.
required:
- code
- message
properties:
code:
type: string
description: 'Machine-readable error code: lower_snake for an error naturali raises (`access_denied`), UPPER_SNAKE for one the runtime reports (`RESOURCE_NOT_FOUND`).'
example: access_denied
message:
type: string
description: Human-readable explanation.
example: Your role in this project does not carry this action.
details:
type: object
additionalProperties: true
description: Structured context for an error naturali raises, such as the `resource` and `limit` of a `plan_limit_reached`.
meta:
type: object
description: Structured context for an error the runtime reports.
AssistantContextPage:
type: object
description: One app page of the turn's context.
required:
- path
- source
- ids
properties:
path:
type: string
example: /projects/proj_V1StGXR8Z5jdHi6B/playbooks/pbk_2x7Qd9LmN4cV/cases
source:
type: string
enum:
- page
- attached
description: '`page` for the page open, `attached` for one the person added.'
ids:
type: object
description: The resource ids the path names; a key is absent when the path names none.
additionalProperties: false
properties:
project_id:
type: string
example: proj_V1StGXR8Z5jdHi6B
playbook_id:
type: string
example: pbk_2x7Qd9LmN4cV
channel_id:
type: string
AssistantPageContext:
type: object
description: 'Where in the app the message was sent from, and the pages the person added to it. The turn can read both back with `GET /v1/assistant/context`, so "this playbook" means the one on screen. Only paths travel; what the pages show, the Assistant reads from the API itself.
'
additionalProperties: false
properties:
path:
type: string
minLength: 1
maxLength: 512
pattern: ^/(?!/)
description: The app page beside the conversation, starting with `/`; never a URL.
example: /projects/proj_V1StGXR8Z5jdHi6B/playbooks/pbk_2x7Qd9LmN4cV/cases
attached:
type: array
maxItems: 10
description: App pages the person added to this message; a repeated one counts once.
items:
type: string
minLength: 1
maxLength: 512
pattern: ^/(?!/)
example:
- /projects/proj_V1StGXR8Z5jdHi6B
AssistantMessage:
type: object
required:
- id
- role
- content
properties:
id:
type: string
example: doc_V1StGXR8Z5jdHi6B
role:
type: string
enum:
- user
- assistant
example: assistant
content:
type: string
example: You have two projects.
AssistantSession:
type: object
description: One conversation with the Assistant in the app.
required:
- id
- name
- status
- created_at
- last_activity_at
properties:
id:
type: string
example: sess_V1StGXR8Z5jdHi6B
name:
type:
- string
- 'null'
description: 'The name given to the conversation, else its first message cut to 60 characters; null until either.
'
example: liste quantos agentes eu tenho no projeto sandbox
status:
type: string
enum:
- open
- closed
- expired
description: Only an `open` session takes messages.
example: open
created_at:
type: string
format: date-time
example: '2026-10-07T12:00:00.000Z'
last_activity_at:
type:
- string
- 'null'
format: date-time
description: When the session last took a message; null until the first.
example: '2026-10-07T12:05:00.000Z'
AssistantMessageCreate:
type: object
required:
- content
additionalProperties: false
properties:
content:
type: string
minLength: 1
example: List my projects.
context:
$ref: '#/components/schemas/AssistantPageContext'
Page:
type: object
description: One page of a list. Rows inserted or removed between two calls neither repeat nor skip a row on the next page.
required:
- data
- next_cursor
properties:
data:
type: array
description: This page's items, in the list's order.
items: {}
next_cursor:
type:
- string
- 'null'
description: Pass as `cursor` to fetch the next page; `null` on the last page.
AssistantGrant:
type: object
description: 'One channel identity authorized to operate one naturali account through the Assistant.
'
properties:
id:
type: string
description: Public grant ID (agr_ prefix).
example: agr_V1StGXR8Z5jdHi6B
channel:
$ref: '#/components/schemas/AssistantChannel'
identifier:
type: string
description: 'The channel identity as an address identifier (`discord:dm:<user_id>`, `whatsapp:dm:<phone>`), the one grammar channels use on the wire. One identity operates one account.
'
example: discord:dm:112233445566778899
display_name:
type:
- string
- 'null'
description: 'The identity as its channel reported it, when it reported one — what a person recognizes instead of an opaque id. Null when the channel offers nothing better than the identifier.
'
example: ana
scopes:
type: array
description: 'What the Assistant may do on the account. Deliberately coarse: the consent for a specific dangerous action is asked for when it happens, through the approval queue, rather than pre-granted here. A link grants `read`.
'
items:
$ref: '#/components/schemas/AssistantScope'
example:
- read
status:
type: string
enum:
- active
- revoked
description: Whether the Assistant currently answers this identity.
example: active
last_used_at:
type:
- string
- 'null'
format: date-time
description: When the Assistant last acted under this grant; null if never.
example: '2026-07-17T09:12:00.000Z'
created_at:
type: string
format: date-time
example: '2026-07-17T00:00:00.000Z'
required:
- id
- channel
- identifier
- display_name
- scopes
- status
- last_used_at
- created_at
AssistantLinkPreview:
type: object
description: 'What a pending link would do, resolved from its token without consuming it.
'
properties:
channel:
$ref: '#/components/schemas/AssistantChannel'
identifier:
type: string
description: The channel identity this token would link, as an address identifier.
example: discord:dm:112233445566778899
display_name:
type:
- string
- 'null'
description: The identity as its channel reported it, for the confirmation screen.
example: ana
scopes:
type: array
items:
$ref: '#/components/schemas/AssistantScope'
description: What redeeming this token would allow.
example:
- read
expires_at:
type: string
format: date-time
description: When the token stops being redeemable. Links are short-lived by design.
example: '2026-07-17T00:10:00.000Z'
required:
- channel
- identifier
- display_name
- scopes
- expires_at
AssistantScope:
type: string
enum:
- read
- manage
description: '`read` lists and inspects projects, agents, channels, knowledge and usage. `manage` additionally mutates, still subject to the approval queue for destructive operations. A link currently grants `read`.
'
example: read
AssistantChannel:
type: string
enum:
- discord
- whatsapp
- slack
description: 'The channel the linked identity lives on. The app is never a value here: a signed-in web session already *is* the identity, so it needs no grant.
'
example: discord
responses:
Unauthorized:
description: Missing or invalid credentials.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
NotFound:
description: The resource does not exist (existence is not leaked).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
AssistantUnavailable:
description: 'This deployment serves no Assistant conversation (`assistant_unavailable`).
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
GrantRevocationUnavailable:
description: '`upstream_unavailable`: the runtime did not record the revocation, so the grant stays active. Retry.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
TurnUnavailable:
description: The turn could not be run or read (`upstream_unavailable`).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ConversationForbidden:
description: 'The credential cannot hold the account''s conversation (`access_denied`): it is confined to one project, or it is the Assistant''s own turn credential.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
AccountWideOnly:
description: '`access_denied`: the credential is confined to one project. Account routes need an account-wide credential.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
parameters:
LinkToken:
name: token
in: query
required: true
description: The single-use token from the link the Assistant sent on the channel.
schema:
type: string
example: alt_9f8e7d6c5b4a39281706
Cursor:
name: cursor
in: query
required: false
description: The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.
schema:
type: string
Limit:
name: limit
in: query
required: false
description: Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
schema:
type: integer
minimum: 1
maximum: 100
default: 50
AssistantSessionId:
name: session_id
in: path
required: true
description: Assistant session ID, as listed.
schema:
type: string
example: sess_V1StGXR8Z5jdHi6B
GrantId:
name: grant_id
in: path
required: true
description: Grant public ID (agr_ prefix).
schema:
type: string
example: agr_V1StGXR8Z5jdHi6B
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A naturali API key (nat_sk_…) or a session JWT.
oauth2:
type: oauth2
description: 'A connected app''s OAuth access token, issued by this API''s authorization server (discovery: /.well-known/oauth-authorization-server). Its one scope carries every operation, confined to the projects the user chose when approving the app.'
flows:
authorizationCode:
authorizationUrl: https://api.naturali.ai/authorize
tokenUrl: https://api.naturali.ai/token
refreshUrl: https://api.naturali.ai/token
scopes:
mcp:access: Every operation this API serves, on the projects the grant covers.