aYOUne
← Hub API

Polls

Singular: Poll — Base URL: https://hub-api.ayoune.app — Access: CRUD

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": {
    "_id": "65e0729c04cae14f9ada1eca",
    "closed": false,
    "createdBy": "6045f4d25704710012485569",
    "answers": [],
    "comments": [],
    "createdAt": "2024-02-29T12:03:40.970Z",
    "updatedAt": "2024-02-29T12:03:40.970Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://hub-api.ayoune.app/polls/65e0729c04cae14f9ada1eca",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Projects",
        "title": "MODEL_PROJECT",
        "href": "https://api.ayoune.app/pm/projects",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pm.projects"
      }
    ],
    "debugId": "6a62e0562b20d6ae273bf601",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_POLL",
        "href": "https://api.ayoune.app/hub/polls/65e0729c04cae14f9ada1eca/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_POLL",
        "href": "https://api.ayoune.app/hub/polls/65e0729c04cae14f9ada1eca/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.11.3",
      "core": "2026.257.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2390",
      "reset": "1784868426",
      "resetDate": "Fri Jul 24 2026"
    },
    "responseTime": 44.341122,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also