aYOUne
← AI API

AICommands

Singular: AICommand — Base URL: https://ai.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)

play_circle Try it now beta

Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.

Example response (recorded) sample

A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.

{
  "payload": {
    "dataQuery": {
      "pipeline": []
    },
    "runtime": {
      "allowedTargets": []
    },
    "_id": "6a700afecccb66fc91bc624a",
    "name": "Analyze Sales",
    "slug": "analyze-sales",
    "description": "Analyze sales pipeline and opportunities",
    "status": "active",
    "category": "analytics",
    "commandType": "agent-invoke",
    "agentInstructions": "Analyze the current sales pipeline. Summarize top opportunities, win rates, and bottlenecks.",
    "requiredRights": [],
    "_allowedRoles": [],
    "icon": "trending_up",
    "sortOrder": 0,
    "global": false,
    "isTemplate": false,
    "_clonedFrom": "69d32a72eac5e00d5eb8d67a",
    "isDraft": true,
    "variables": [],
    "createdAt": "2026-08-03T03:29:02.221Z",
    "updatedAt": "2026-08-03T03:29:02.221Z",
    "shares": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://ai.ayoune.app/aicommands/6a700afecccb66fc91bc624a",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "AICommands",
        "title": "MODEL_AICOMMAND",
        "href": "https://api.ayoune.app/ai/aicommands/69d32a72eac5e00d5eb8d67a",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ai.aicommands"
      }
    ],
    "relations": [
      {
        "rel": "AIWorkflows",
        "title": "MODEL_AIWORKFLOW",
        "href": "https://api.ayoune.app/ai/aiworkflows",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ai.aiworkflows"
      },
      {
        "rel": "AIAgents",
        "title": "MODEL_AIAGENT",
        "href": "https://api.ayoune.app/ai/aiagents",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ai.aiagents"
      },
      {
        "rel": "AICommands",
        "title": "MODEL_AICOMMAND",
        "href": "https://api.ayoune.app/ai/aicommands",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ai.aicommands"
      }
    ],
    "debugId": "6aa0cf07a20da3616dda1b5f",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_AICOMMAND",
        "href": "https://api.ayoune.app/ai/aicommands/6a700afecccb66fc91bc624a/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_AICOMMAND",
        "href": "https://api.ayoune.app/ai/aicommands/6a700afecccb66fc91bc624a",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.172.0",
      "core": "2026.334.1"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9851",
      "reset": "1788927245",
      "resetDate": "Wed Sep 09 2026"
    },
    "responseTime": 20.36262,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

MethodPathDescriptionRight
GET /aicommands List with filters/pagination ai.aicommands.view
GET /aicommands/:id Single record ai.aicommands.view
POST /aicommands Create new record ai.aicommands.new
PUT /aicommands Update record ai.aicommands.edit
DELETE /aicommands/:id Delete record ai.aicommands.delete

SDK

import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');

// List all
const list = await ay.ai.aICommands.find().limit(10).exec();

// Single record
const one = await ay.ai.aICommands.findById('OBJECT_ID').exec();

// Create
const created = await ay.ai.aICommands.create({ name: 'Foo' });

See also