← communication API
OptInRecords
Singular: OptInRecord — Base URL: https://communication-api.ayoune.app — Access: CRUD
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.
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /optinrecords |
List with filters/pagination | voice.optinrecords.view |
| GET | /optinrecords/:id |
Single record | voice.optinrecords.view |
| POST | /optinrecords |
Create new record | voice.optinrecords.new |
| PUT | /optinrecords |
Update record | voice.optinrecords.edit |
| DELETE | /optinrecords/:id |
Delete record | voice.optinrecords.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.communication.optInRecords.find().limit(10).exec();
// Single record
const one = await ay.communication.optInRecords.findById('OBJECT_ID').exec();
// Create
const created = await ay.communication.optInRecords.create({ name: 'Foo' });