← Automation API
ApprovalRequests
Singular: ApprovalRequest — Base URL: https://automation-api.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": {
"_id": "6acf1de669829e3b920ba8c8",
"externalKey": "knowledge-source:6acf1de0e4a348febb9877c1",
"resourceType": "KnowledgeSource",
"_requestedBy": "5a76d07e2d8b3270ff6df587",
"_resource": "6acf1de0e4a348febb9877c1",
"createdAt": "2026-10-14T06:15:02.451Z",
"currentStage": 0,
"description": "Das Dokument scheint sich auf einen spezifischen Wartungsvertrag zu beziehen, der für die Unternehmensbereiche nicht relevant ist. Bitte reichen Sie Dokumente ein, die sich auf die Kernkompetenzen oder Dienstleistungen des Unternehmens beziehen.",
"requestType": "custom",
"requestedAt": "2026-10-14T06:15:02.449Z",
"resourceContext": {
"curationStatus": "quarantined",
"reason": "doubtful-verdict",
"fit": {
"score": 0,
"verdict": "reject",
"reason": "Das Dokument scheint sich auf einen spezifischen Wartungsvertrag zu beziehen, der für die Unternehmensbereiche nicht relevant ist. Bitte reichen Sie Dokumente ein, die sich auf die Kernkompetenzen oder Dienstleistungen des Unternehmens beziehen.",
"_suggestedLibraries": [],
"suggestedDepartmentKeys": [],
"evaluatedAt": "2026-10-14T06:15:00.823Z",
"method": "llm:gpt-4o-mini-2024-07-18"
},
"library": {
"_id": "6a156ab832cbff4a8f662eb3",
"name": "Stenografie"
},
"libraryOrigin": "classification",
"libraryOriginLabel": "Vorschlag der Klassifikation (Ähnlichkeitssuche über die Einbettungen). Der Fit-Bewerter hat KEINE Bibliothek zugeordnet.",
"duplicateOf": null,
"approverSource": "tenant-admin",
"deepLink": "/ai/knowledgesources/6acf1de0e4a348febb9877c1"
},
"shares": [],
"stages": [
{
"order": 0,
"label": "Kurator-Freigabe",
"_eligibleApprovers": [
"6045f4d25704710012485569",
"5ee06fc3860473001cfb290e",
"6abffbdf964b6234ed8779c8"
],
"minApprovers": 1,
"status": "pending",
"_id": "6acf1de6fd55c20b629789c2",
"decisions": [],
"shares": []
}
],
"status": "pending",
"title": "Wissensquelle in Quarantäne prüfen: [abnahme] Notiz.txt",
"updatedAt": "2026-10-14T06:15:02.451Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://automation-api.ayoune.app/approvalrequests/6acf1de669829e3b920ba8c8",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "AutomationExecutions",
"title": "MODEL_AUTOMATIONEXECUTION",
"href": "https://api.ayoune.app/automation/automationexecutions",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "automation.automationexecutions"
}
],
"debugId": "6adec41f55ec8076337d56d1",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_APPROVALREQUEST",
"href": "https://api.ayoune.app/automation/approvalrequests/6acf1de669829e3b920ba8c8/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_APPROVALREQUEST",
"href": "https://api.ayoune.app/automation/approvalrequests/6acf1de669829e3b920ba8c8",
"method": "delete",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.23.0",
"core": "2026.388.0"
},
"rateLimit": {
"limit": "10000",
"remaining": "9766",
"reset": "1792987591",
"resetDate": "Mon Oct 26 2026"
},
"responseTime": 277.351882,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /approvalrequests |
List with filters/pagination | automation.approvalrequests.view |
| GET | /approvalrequests/:id |
Single record | automation.approvalrequests.view |
| POST | /approvalrequests |
Create new record | automation.approvalrequests.new |
| PUT | /approvalrequests |
Update record | automation.approvalrequests.edit |
| DELETE | /approvalrequests/:id |
Delete record | automation.approvalrequests.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.automation.approvalRequests.find().limit(10).exec();
// Single record
const one = await ay.automation.approvalRequests.findById('OBJECT_ID').exec();
// Create
const created = await ay.automation.approvalRequests.create({ name: 'Foo' });