Neuron Tasks API

Scheduled, goal-directed autonomous bot tasks — a natural-language instruction run on a schedule (cron/interval/once/manual) via an agentic tool-loop, with run history and AI drafting

GitHub OpenAPI

Operations 8

GET /tasks/bot/{botId} List a bot's tasks #
POST /tasks/bot/{botId} Create a task for a bot #
PUT /tasks/{id} Update a task (partial) #
DELETE /tasks/{id} Delete a task (soft delete; stops it running) #
POST /tasks/{id}/toggle Pause/resume a task #
POST /tasks/{id}/run Run a task now (queues an immediate run) #
GET /tasks/{id}/runs Get a task's run history (paginated) #
POST /tasks/bot/{botId}/ai-draft Draft a task from a natural-language description (does not create it) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/neuron-ng:neuron-ng-tasks-api"
All apis
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.

Get an API 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 Specification

neuron-ng-tasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Neuron Tasks API
  version: 1.0.0
  description: 'API reference for Neuron — the AI-powered WhatsApp chatbot platform.


    Neuron lets you build intelligent chatbots with tool integrations, knowledge bases, and human-in-the-loop monitoring.


    ## Authentication


    Most endpoints require a JWT bearer token obtained from `POST /auth/login`.


    Bot API endpoints use API keys prefixed with `nrn_`.


    The **Social API** (`/social`) is organization-scoped — authenticate with an **account token** (`nrn_acc_`, from Dashboard → Settings → Account Tokens). Bot API keys are also accepted for backward compatibility but are legacy for this API.


    ## Response Format


    All responses follow the envelope: `{ success: boolean, data?: any, error?: { message, code } }`'
servers:
- url: /api/v1
  description: API v1
tags:
- name: Tasks
  description: Scheduled, goal-directed autonomous bot tasks — a natural-language instruction run on a schedule (cron/interval/once/manual) via an agentic tool-loop, with run history and AI drafting
paths:
  /tasks/bot/{botId}:
    get:
      tags:
      - Tasks
      summary: List a bot's tasks
      security:
      - BearerAuth: []
      parameters:
      - name: botId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/BotTask'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getTasksBotByBotId
      x-operation-id-source: derived
    post:
      tags:
      - Tasks
      summary: Create a task for a bot
      security:
      - BearerAuth: []
      parameters:
      - name: botId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - title
              - instruction
              - scheduleKind
              properties:
                title:
                  type: string
                instruction:
                  type: string
                  description: Self-contained natural-language directive the bot executes. Preserve any exact message copy verbatim.
                scheduleKind:
                  type: string
                  enum:
                  - cron
                  - interval
                  - once
                  - manual
                schedule:
                  type: object
                  description: 'cron: {time:''HH:MM'', days?:[0-6]}; interval: {everyMinutes}; once: {runAt:ISO}; manual: {}'
                timezone:
                  type: string
                  description: IANA tz (default UTC)
                enabled:
                  type: boolean
                config:
                  type: object
                  properties:
                    channelId:
                      type: string
                      format: uuid
                    maxActions:
                      type: integer
                    noRepeatDays:
                      type: integer
                    requiresApproval:
                      type: boolean
                    approvalPhone:
                      type: string
                    dryRun:
                      type: boolean
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/BotTask'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postTasksBotByBotId
      x-operation-id-source: derived
  /tasks/{id}:
    put:
      tags:
      - Tasks
      summary: Update a task (partial)
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                instruction:
                  type: string
                scheduleKind:
                  type: string
                  enum:
                  - cron
                  - interval
                  - once
                  - manual
                schedule:
                  type: object
                timezone:
                  type: string
                enabled:
                  type: boolean
                config:
                  type: object
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/BotTask'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: putTasksById
      x-operation-id-source: derived
    delete:
      tags:
      - Tasks
      summary: Delete a task (soft delete; stops it running)
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: deleteTasksById
      x-operation-id-source: derived
  /tasks/{id}/toggle:
    post:
      tags:
      - Tasks
      summary: Pause/resume a task
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/BotTask'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postTasksByIdToggle
      x-operation-id-source: derived
  /tasks/{id}/run:
    post:
      tags:
      - Tasks
      summary: Run a task now (queues an immediate run)
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      responses:
        '202':
          description: Run queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      queued:
                        type: boolean
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postTasksByIdRun
      x-operation-id-source: derived
  /tasks/{id}/runs:
    get:
      tags:
      - Tasks
      summary: Get a task's run history (paginated)
      security:
      - BearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      - name: page
        in: query
        schema:
          type: string
        description: Page number
      - name: limit
        in: query
        schema:
          type: string
        description: Items per page (max 100)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    '200':
                      description: Paginated list
                      content:
                        application/json:
                          schema:
                            type: object
                            properties:
                              success:
                                type: boolean
                                example: true
                              data:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      $ref: '#/components/schemas/BotTaskRun'
                                  total:
                                    type: integer
                                  page:
                                    type: integer
                                  limit:
                                    type: integer
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getTasksByIdRuns
      x-operation-id-source: derived
  /tasks/bot/{botId}/ai-draft:
    post:
      tags:
      - Tasks
      summary: Draft a task from a natural-language description (does not create it)
      security:
      - BearerAuth: []
      parameters:
      - name: botId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: ''
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - prompt
              properties:
                prompt:
                  type: string
                timezone:
                  type: string
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    description: 'Structured task draft: { title, instruction, scheduleKind, schedule, timezone, config? }'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postTasksBotByBotIdAiDraft
      x-operation-id-source: derived
components:
  schemas:
    BotTaskRun:
      type: object
      properties:
        id:
          type: string
          format: uuid
        taskId:
          type: string
          format: uuid
        botId:
          type: string
          format: uuid
        orgId:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - running
          - completed
          - failed
          - skipped
          - awaiting_approval
        trigger:
          type: string
          enum:
          - schedule
          - manual
          - bot
        summary:
          type:
          - string
          - 'null'
          description: AI-written recap of what the run did
        steps:
          type: array
          items:
            type: object
          description: 'Ordered tool-call log: [{round, tool, args, result, ms}]'
        stats:
          type: object
          properties:
            actionsTaken:
              type: integer
            messagesSent:
              type: integer
            contactsProcessed:
              type: integer
            tokensUsed:
              type: integer
        error:
          type:
          - string
          - 'null'
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type:
          - string
          - 'null'
          format: date-time
    BotTask:
      type: object
      properties:
        id:
          type: string
          format: uuid
        orgId:
          type: string
          format: uuid
        botId:
          type: string
          format: uuid
        title:
          type: string
        instruction:
          type: string
        scheduleKind:
          type: string
          enum:
          - cron
          - interval
          - once
          - manual
        schedule:
          type: object
          description: 'cron: {time:''HH:MM'', days?:number[] (0=Sun..6=Sat, empty=every day)}; interval: {everyMinutes:number}; once: {runAt:ISO8601}; manual: {}'
        timezone:
          type: string
          description: IANA timezone, e.g. Africa/Lagos
        enabled:
          type: boolean
        source:
          type: string
          enum:
          - user
          - bot
          description: '''bot'' = the bot created this task for itself'
        config:
          type: object
          properties:
            channelId:
              type: string
              format: uuid
            maxActions:
              type: integer
            noRepeatDays:
              type: integer
            requiresApproval:
              type: boolean
            approvalPhone:
              type: string
            dryRun:
              type: boolean
        state:
          type: object
        lastRunAt:
          type:
          - string
          - 'null'
          format: date-time
        nextRunAt:
          type:
          - string
          - 'null'
          format: date-time
        runCount:
          type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token from POST /auth/login
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Bot API key (nrn_xxx) from bot API keys management
    AccountTokenAuth:
      type: http
      scheme: bearer
      description: Account token (nrn_acc_xxx) from Dashboard > Settings > Account Tokens