Skip to main content

Receptors API

Receptors are the only public entry points for invoking neurons or pathways. Each neuron, pathway, or completion synapse has one receptor with a unique slug. An in-code receptor gateway validates and transforms invoke requests before execution. User stories (receptor-only):
  • List invokable receptors → GET /v1/receptors
  • Get one by slug or ID → GET /v1/receptors/:workspace_slug/:slug or GET /v1/receptors/by-id/:id
  • Invoke (sync or stream) → POST /v1/receptors/:workspace_slug/:slug/invoke
  • Share (create/get/revoke/rotate) → POST|GET|DELETE|POST /v1/receptors/:workspace_slug/:slug/share and related
There is no synapse execute or synapse CRUD; use receptors and neurons/pathways.
Creating a neuron via POST /v1/neurons automatically creates a receptor. Invoke only via POST /v1/receptors/:workspace_slug/:slug/invoke.

List Receptors

List receptors for the authenticated workspace.
Brain scope required. Include the X-Brain-Id header or configure getBrainId in the public client.
GET /v1/receptors

Headers

HeaderTypeDescription
X-Brain-Idstring (UUID)Required. Brain ID for scoping

Query Parameters

ParameterTypeDescription
target_typestringFilter by target: neuron, pathway, or completion
limitnumberMaximum results (default: 20)
offsetnumberPagination offset
sortBystringSort field
sortDirectionstringasc or desc

Get Receptor

Get a single receptor by slug (with workspace) or by ID.
GET /v1/receptors/:workspace_slug/:slug
GET /v1/receptors/by-id/:id

Path Parameters

ParameterTypeDescription
workspace_slugstringWorkspace slug (e.g. my-workspace)
slugstringReceptor slug (e.g. my-neuron)
idstringReceptor UUID (use /v1/receptors/by-id/:id; no workspace in path)

Response (List and Get)

Receptor objects include is_active. For receptors that target a neuron or pathway, is_active reflects the target’s is_active (from the neurons or pathways table). For completion receptors, is_active is stored on the receptor row and can be updated via PATCH.

Update Receptor

Update active channels, receptor config, and (for completion receptors) active status. For neuron or pathway targets, is_active updates the target neuron or pathway.
PATCH /v1/receptors/:workspace_slug/:slug

Request Body

FieldTypeDescription
active_channelsstring[]e.g. ["http", "cron"]
configobjectReceptor config (e.g. conditions)
is_activebooleanOptional. For completion receptors: update receptor row. For neuron/pathway targets: update the target’s is_active.

Invoke (Receptor-First)

Invoke the neuron or pathway behind the receptor. Requires API key or JWT. Body shape depends on target type (neuron vs pathway).
POST /v1/receptors/:workspace_slug/:slug/invoke

Path Parameters

ParameterTypeDescription
workspace_slugstringWorkspace slug
slugstringReceptor slug

Request Body

FieldTypeDescription
dataobjectPayload for the target (e.g. message, messages, or job-specific fields)

Response

{
  "job_id": "uuid",
  "status": "pending"
}
Poll job status or consume the token stream via the jobs API.

Example

const result = await auvy.receptors.invoke('my-workspace', 'feedback-analyzer', {
  data: { message: 'Analyze this feedback.' }
})
console.log(result.job_id, result.status)