← Configuration API
MailTypes
Singular: MailType — Base URL: https://config-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 | /mailtypes |
List with filters/pagination | config.mailtypes.view |
| GET | /mailtypes/:id |
Single record | config.mailtypes.view |
| POST | /mailtypes |
Create new record | config.mailtypes.new |
| PUT | /mailtypes |
Update record | config.mailtypes.edit |
| DELETE | /mailtypes/:id |
Delete record | config.mailtypes.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.config.mailTypes.find().limit(10).exec();
// Single record
const one = await ay.config.mailTypes.findById('OBJECT_ID').exec();
// Create
const created = await ay.config.mailTypes.create({ name: 'Foo' });