Documentation Index
Fetch the complete documentation index at: https://docs.auvy.ai/llms.txt
Use this file to discover all available pages before exploring further.
Reflexes API
Reflexes are reusable tool collections attached to neurons. They can be sensory or effector, and they are typically composed from one or more integrations.
List Reflexes
Get a list of reflexes with optional filtering.
Query Parameters
| Parameter | Type | Description |
|---|
type | string | Filter by type: sensory or effector |
search | string | Search by name or description |
limit | number | Maximum number of results (default: 20) |
offset | number | Offset for pagination |
sortBy | string | Sort field: created_at, updated_at, name |
sortDirection | string | Sort direction: asc or desc |
Example Request
const reflexes = await auvy.reflexes.list({
type: 'sensory'
})
curl https://api.auvy.ai/v1/reflexes?type=sensory \
-H "Authorization: Bearer YOUR_API_KEY"
Get Reflex
Get a single reflex by ID.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Reflex UUID |
Response
Returns the reflex object directly.
Create Reflex
Create a new reflex. A reflex must define integration-backed tools, internal behavior, or a server-backed implementation.
Request Body
| Field | Type | Required | Description |
|---|
name | string | Yes | Reflex name |
type | string | Yes | sensory or effector |
description | string | No | Reflex description |
tools | array | No | Array of { integration_id: string, tools: string[] } |
metadata | object | No | For internal/server-based reflexes |
is_active | boolean | No | Active status (default: true) |
scope | string | Yes | core, workspace, or brain (set brain_id when scope is brain) |
Reflex Types
- Sensory - Provide input to neurons (webhooks, API calls)
- Effector - Execute actions based on neuron output (send email, update database)
Example Request
const reflex = await auvy.reflexes.create({
name: 'My Reflex',
description: 'A sample reflex',
type: 'sensory',
tools: [
{
integration_id: 'integration-uuid',
tools: ['tool1', 'tool2']
}
],
is_active: true
})
curl -X POST https://api.auvy.ai/v1/reflexes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Reflex",
"description": "A sample reflex",
"type": "sensory",
"tools": [
{
"integration_id": "integration-uuid",
"tools": ["tool1", "tool2"]
}
],
"is_active": true
}'
Update Reflex
Update an existing reflex.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Reflex UUID |
Request Body
All fields optional:
| Field | Type | Description |
|---|
name | string | Reflex name (min 1 char) |
description | string | Reflex description |
tools | array | Array of {integration_id: string, tools: string[]} |
metadata | object | Reflex metadata |
is_active | boolean | Active status |
scope | string | workspace or core |
Delete Reflex
Delete a reflex.
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Reflex UUID |
Response
Reflex Connections
Reflex-specific connection routes exist for dashboard flows that connect the integrations used by a reflex. Those JWT-only dashboard flows are intentionally outside this API-key-focused docs set.
Initiate Connection
Start a connection flow for the integrations required by a reflex.
POST /v1/reflexes/:id/connect
Alternative endpoint:
POST /v1/reflexes/:id/connections/initiate
Path Parameters
| Parameter | Type | Description |
|---|
id | string | Reflex UUID |
Request Body
| Field | Type | Required | Description |
|---|
callbackUrl | string | No | Optional callback URL for OAuth redirect |
Response
{
"redirectUrl": "https://oauth-provider.com/authorize?...",
"connectionRequestId": "request-uuid"
}
Handle OAuth Callback
Complete a previously initiated reflex connection flow.
GET /v1/reflexes/:id/callback
Query Parameters
| Parameter | Type | Required | Description |
|---|
connectionRequestId | string | Yes | Connection request ID from initiate endpoint |
request_id | string | No | Alternative parameter name for connectionRequestId |
Response
{
"connectedAccountId": "account-uuid",
"success": true
}
Get Connection Status
Check if a reflex has an active connection.
GET /v1/reflexes/:id/connection
Response
{
"connectedAccountId": "account-uuid",
"connected": true
}
Check Connection Status
Get detailed status for the integrations required by a reflex.
GET /v1/reflexes/:id/connections/check
Response
Returns a ReflexConnectionStatus object with connection details for each integration required by the reflex.
Batch Get Connections
Get the currently selected account for multiple reflexes at once.
POST /v1/reflexes/connections/batch
Request Body
| Field | Type | Required | Description |
|---|
reflexIds | array | Yes | Array of reflex UUIDs (max 100) |
Response
{
"connections": [
{
"reflexId": "reflex-uuid",
"connectedAccountId": "account-uuid",
"connected": true
}
]
}
Batch Check Connections
Check detailed connection status for multiple reflexes.
POST /v1/reflexes/connections/check-batch
Request Body
| Field | Type | Required | Description |
|---|
reflexIds | array | No | Array of reflex UUIDs (max 100). If omitted, checks all reflexes. |
Response
{
"statuses": [
{
"reflexId": "reflex-uuid",
"status": { /* ReflexConnectionStatus object */ }
}
]
}
Disconnect Reflex
Disconnect a reflex from its integrations.
DELETE /v1/reflexes/:id/connection
Response