Skip to content
aYOUne
← CRM API

Documents

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

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": {
    "_id": "65e0b092121b7d48fe1583ed",
    "tags": [],
    "editor": "6045f4d25704710012485569",
    "team": [],
    "allowedFor": [],
    "watchers": [],
    "contributors": [],
    "consumerContributors": [],
    "isDraft": true,
    "createdBy": "6045f4d25704710012485569",
    "versions": [],
    "comments": [],
    "createdAt": "2024-02-29T16:28:02.974Z",
    "updatedAt": "2024-02-29T16:28:02.974Z",
    "shortID": "WTDJKDB",
    "shares": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://crm-api.ayoune.app/documents/65e0b092121b7d48fe1583ed",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      },
      {
        "rel": "Projects",
        "title": "MODEL_PROJECT",
        "href": "https://api.ayoune.app/pm/projects",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pm.projects"
      },
      {
        "rel": "SyncFolders",
        "title": "MODEL_SYNCFOLDER",
        "href": "https://api.ayoune.app/sync/syncfolders",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sync.folders"
      },
      {
        "rel": "SyncDevices",
        "title": "MODEL_SYNCDEVICE",
        "href": "https://api.ayoune.app/sync/syncdevices",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sync.devices"
      },
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      }
    ],
    "debugId": "6adec86d22f3608d07632575",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_DOCUMENT",
        "href": "https://api.ayoune.app/crm/documents/65e0b092121b7d48fe1583ed/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_DOCUMENT",
        "href": "https://api.ayoune.app/crm/documents/65e0b092121b7d48fe1583ed",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.79.1",
      "core": "2026.388.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9881",
      "reset": "1792988732",
      "resetDate": "Mon Oct 26 2026"
    },
    "responseTime": 1009.748947,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also