← AI API
AIHooks
Singular: AIHook — Base URL: https://ai.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)
Try it now
beta
Response (live)
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": {
"triggerOn": {
"tools": [],
"agents": [],
"events": []
},
"_id": "6a353bd55a44977e01d466dd",
"name": "Audit Logger",
"description": "Logs all AI operations for compliance audit trail",
"status": "active",
"hookType": "post-query",
"actionType": "log",
"onFailure": "allow",
"sortOrder": 99,
"global": false,
"isTemplate": false,
"validationRules": [],
"createdAt": "2026-06-19T12:53:41.391Z",
"updatedAt": "2026-06-19T12:53:41.391Z",
"shares": []
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://ai.ayoune.app/aihooks/6a353bd55a44977e01d466dd",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "UserFunctions",
"title": "MODEL_USERFUNCTION",
"href": "https://api.ayoune.app/config/userfunctions",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.userfunctions"
},
{
"rel": "AIHooks",
"title": "MODEL_AIHOOK",
"href": "https://api.ayoune.app/ai/aihooks",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "ai.aihooks"
}
],
"debugId": "6aa0cf0ba20da3616dda1d28",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_AIHOOK",
"href": "https://api.ayoune.app/ai/aihooks/6a353bd55a44977e01d466dd/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_AIHOOK",
"href": "https://api.ayoune.app/ai/aihooks/6a353bd55a44977e01d466dd",
"method": "delete",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.172.0",
"core": "2026.334.1"
},
"rateLimit": {
"limit": "10000",
"remaining": "9805",
"reset": "1788927245",
"resetDate": "Wed Sep 09 2026"
},
"responseTime": 54.896519,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /aihooks |
List with filters/pagination | ai.aihooks.view |
| GET | /aihooks/:id |
Single record | ai.aihooks.view |
| POST | /aihooks |
Create new record | ai.aihooks.new |
| PUT | /aihooks |
Update record | ai.aihooks.edit |
| DELETE | /aihooks/:id |
Delete record | ai.aihooks.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.ai.aIHooks.find().limit(10).exec();
// Single record
const one = await ay.ai.aIHooks.findById('OBJECT_ID').exec();
// Create
const created = await ay.ai.aIHooks.create({ name: 'Foo' });