API ReferenceView as MarkdownOpenAPI

Marketing & notifications

View as Markdown

Reaching the site's users: push notifications, newsletters, automations and QR codes.

Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.

28 endpoints in 7 parts: Advertisment, Alert, Automation, Connected Account, Instagram, Push Notification, Push Token.

Create an ad

Creates an ad. Answers 201 with no body.

Admin token

Needs a site admin token.

Status codes

201 400 401 500

POST/ads
curl -X POST 'http://hristovtintdetailng.com/ads?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "media": "6543210fedcba98765432100",
  "alt": "example",
  "link": "example-item",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve an ad

One ad. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the ad.

Status codes

200 401 404 500

GET/ads/:id
curl -X GET 'http://hristovtintdetailng.com/ads/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "media": "6543210fedcba98765432100",
  "alt": "example",
  "link": "example-item",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update an ad

Updates an ad. Answers the ad.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the ad.

Status codes

200 400 401 500

PATCH/ads/:id
curl -X PATCH 'http://hristovtintdetailng.com/ads/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "media": "6543210fedcba98765432100",
  "alt": "example",
  "link": "example-item",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete an ad

Deletes an ad. Answers the deleted record, or 404. Records that point to it are not changed.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the ad.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/ads/:id
curl -X DELETE 'http://hristovtintdetailng.com/ads/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all alerts

The alerts. Answers an array of every record.

Admin token

Needs a site admin token.

Returns

Returns a list of Alert objects.

Status codes

200 401 500

GET/alerts
curl -X GET 'http://hristovtintdetailng.com/alerts?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "type": "example",
    "heading": "Example",
    "message": "example",
    "meta_id": "6543210fedcba98765432100",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create an alert

Creates an alert. Answers 201 with no body.

Admin token

Needs a site admin token.

Status codes

201 400 401 500

POST/alerts
curl -X POST 'http://hristovtintdetailng.com/alerts?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve an alert

One alert. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the alert.

Returns

Returns the Alert object.

Status codes

200 401 404 500

GET/alerts/:id
curl -X GET 'http://hristovtintdetailng.com/alerts/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "type": "example",
  "heading": "Example",
  "message": "example",
  "meta_id": "6543210fedcba98765432100",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

List all automations

The automations. Answers an array of every record.

Admin token

Needs a site admin token.

Returns

Returns a list of Automation objects.

Status codes

200 401 500

GET/automations
curl -X GET 'http://hristovtintdetailng.com/automations?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "title": "Example",
    "webhook_url": "example-item",
    "event_type": "example",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create an automation

Creates an automation (a webhook called on an event). Answers 201 with no body.

Admin token

Needs a site admin token.

Returns

Returns the Automation object.

Status codes

201 400 401 500

POST/automations
curl -X POST 'http://hristovtintdetailng.com/automations?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "title": "Example",
  "webhook_url": "example-item",
  "event_type": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve an automation

One automation. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the automation.

Returns

Returns the Automation object.

Status codes

200 401 404 500

GET/automations/:id
curl -X GET 'http://hristovtintdetailng.com/automations/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "title": "Example",
  "webhook_url": "example-item",
  "event_type": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update an automation

Updates an automation. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the automation.

Returns

Returns the Automation object.

Status codes

200 400 401 404 500

PATCH/automations/:id
curl -X PATCH 'http://hristovtintdetailng.com/automations/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "title": "Example",
  "webhook_url": "example-item",
  "event_type": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete an automation

Deletes an automation. Answers the deleted record, or 404. Records that point to it are not changed.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the automation.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/automations/:id
curl -X DELETE 'http://hristovtintdetailng.com/automations/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all models

An example entry of a model and its schema, to map an automation's fields. The newest entry, with its references filled in, shows what an automation's payload looks like.

Admin token

Needs a site admin token.

Path parameters
modelstringRequired

The model's model.

Status codes

200 401 500

GET/get-model/:model
curl -X GET 'http://hristovtintdetailng.com/get-model/{model}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all connected accounts

Accounts the signed-in user manages. Answers { connectedAccounts, accounts_that_authorized_me }.

User token

Needs the token of a signed-in user.

Returns

Returns a list of ConnectedAccount objects.

Status codes

200 401 500

GET/connected-accounts
curl -X GET 'http://hristovtintdetailng.com/connected-accounts?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "on_behalf_of": "6543210fedcba98765432100",
    "user_account": "6543210fedcba98765432100",
    "status": "pending",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z",
    "is_authorized_to": {
      "create_posts": false,
      "send_messages": false,
      "answer_delete_comments": false,
      "access_engagements": false,
      "access_boosted_posts": false,
      "access_analytics": false,
      "alter_profile_settings": false
    }
  }
]

Retrieve a connected accounts on behalf of

The connection to an account the signed-in user manages, by that account. Answers the managed account. 404 when there is no connection.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the connected accounts on behalf of.

Status codes

200 401 404 500

GET/connected-accounts-by-on-behalf-of/:id
curl -X GET 'http://hristovtintdetailng.com/connected-accounts-by-on-behalf-of/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "on_behalf_of": "6543210fedcba98765432100",
  "user_account": "6543210fedcba98765432100",
  "status": "pending",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "is_authorized_to": {
    "create_posts": false,
    "send_messages": false,
    "answer_delete_comments": false,
    "access_engagements": false,
    "access_boosted_posts": false,
    "access_analytics": false,
    "alter_profile_settings": false
  }
}

Retrieve a connected accounts on behalf of

The connection that lets a user manage the signed-in user's account. 404 when there is no connection.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the connected accounts on behalf of.

Status codes

200 401 404 500

GET/connected-accounts-on-behalf-of/:id
curl -X GET 'http://hristovtintdetailng.com/connected-accounts-on-behalf-of/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "on_behalf_of": "6543210fedcba98765432100",
  "user_account": "6543210fedcba98765432100",
  "status": "pending",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "is_authorized_to": {
    "create_posts": false,
    "send_messages": false,
    "answer_delete_comments": false,
    "access_engagements": false,
    "access_boosted_posts": false,
    "access_analytics": false,
    "alter_profile_settings": false
  }
}

Change the status of a connected account

Accepts or refuses an account connection, and sets what it may do. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the connected account.

Returns

Returns the ConnectedAccount object.

Status codes

200 400 401 403 404 500

PATCH/connected-accounts-status/:id
curl -X PATCH 'http://hristovtintdetailng.com/connected-accounts-status/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "on_behalf_of": "6543210fedcba98765432100",
  "user_account": "6543210fedcba98765432100",
  "status": "pending",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "is_authorized_to": {
    "create_posts": false,
    "send_messages": false,
    "answer_delete_comments": false,
    "access_engagements": false,
    "access_boosted_posts": false,
    "access_analytics": false,
    "alter_profile_settings": false
  }
}

Retrieve a connected account

One account connection. 404 when there is no such connection.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the connected account.

Returns

Returns the ConnectedAccount object.

Status codes

200 401 404 500

GET/connected-accounts/:id
curl -X GET 'http://hristovtintdetailng.com/connected-accounts/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "on_behalf_of": "6543210fedcba98765432100",
  "user_account": "6543210fedcba98765432100",
  "status": "pending",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "is_authorized_to": {
    "create_posts": false,
    "send_messages": false,
    "answer_delete_comments": false,
    "access_engagements": false,
    "access_boosted_posts": false,
    "access_analytics": false,
    "alter_profile_settings": false
  }
}

Update a connected account

Updates an account connection. Fields outside the allowed list are silently ignored. Answers the updated record, or 404.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the connected account.

Returns

Returns the ConnectedAccount object.

Status codes

200 400 401 403 404 500

PATCH/connected-accounts/:id
curl -X PATCH 'http://hristovtintdetailng.com/connected-accounts/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "on_behalf_of": "6543210fedcba98765432100",
  "user_account": "6543210fedcba98765432100",
  "status": "pending",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "is_authorized_to": {
    "create_posts": false,
    "send_messages": false,
    "answer_delete_comments": false,
    "access_engagements": false,
    "access_boosted_posts": false,
    "access_analytics": false,
    "alter_profile_settings": false
  }
}

Delete a connected account

Deletes an account connection. Either side can end it. 403 "Unauthorized." for anyone else.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the connected account.

Returns

Returns an empty answer on success.

Status codes

200 401 403 404 500

DELETE/connected-accounts/:id
curl -X DELETE 'http://hristovtintdetailng.com/connected-accounts/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all connected accounts

Users who manage the signed-in user's account. Answers an array.

User token

Needs the token of a signed-in user.

Returns

Returns a list of ConnectedAccount objects.

Status codes

200 401 500

GET/my-connected-accounts
curl -X GET 'http://hristovtintdetailng.com/my-connected-accounts?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "on_behalf_of": "6543210fedcba98765432100",
    "user_account": "6543210fedcba98765432100",
    "status": "pending",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z",
    "is_authorized_to": {
      "create_posts": false,
      "send_messages": false,
      "answer_delete_comments": false,
      "access_engagements": false,
      "access_boosted_posts": false,
      "access_analytics": false,
      "alter_profile_settings": false
    }
  }
]

Send an account connection request

Asks another user (email) for access to manage their account. Answers 201 with the pending connection; the other user accepts it with PATCH /connected-accounts-status/:id.

User token

Needs the token of a signed-in user.

Parameters
emailstring

An email address.

Status codes

201 400 401 500

POST/send-account-connection-request
curl -X POST 'http://hristovtintdetailng.com/send-account-connection-request?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "email": "..." }'
Response
{
  "name": "Example",
  "email": "jane@example.com",
  "avatar": "6543210fedcba98765432100",
  "social_avatar": "example",
  "isAdmin": false,
  "isStaff": false,
  "owner_id": "6543210fedcba98765432100",
  "organization_name": "Example",
  "firstname": "Example",
  "lastname": "Example",
  "phone_number": "+359 888 123 456",
  "address": "example",
  "city": "example",
  "state": "example",
  "country": "example",
  "zip_code": "example",
  "tax_identification_number": "example",
  "notes": "Text shown on the site.",
  "isConfirmed": false,
  "number_of_sales": 0,
  "stripe_id": "example",
  "paypal_id": "example",
  "access_level": 1,
  "validation_code": "example",
  "can_edit": {
    "site": false,
    "crm": false,
    "store": false,
    "payments": false,
    "staff": false
  },
  "ip_location": {
    "city": "example",
    "continent_name": "Example",
    "country_name": "Example",
    "country_subdivision": "example",
    "location_latitude": 0,
    "location_longitude": 0,
    "last_updated": "example"
  }
}

Retrieve the instagram

Pictures of a public Instagram profile (?profile). Answers { instaMedias, profilePic }. Reads no token.

Public

Public - no token needed.

Query parameters
profilestring

Only instagrams with this profile.

firststring

Only instagrams with this first.

Status codes

200 500

GET/get-instagram
curl -X GET 'http://hristovtintdetailng.com/get-instagram?ionic=true&profile=...&first=...'

Create a push notification

Creates a push notification. 412 when one was sent to the same audience in the last 48 hours. Answers 201.

Admin token

Needs a site admin token.

Parameters
titlestring

The notification's heading.

bodystring

The notification's text.

imagestring

Picture shown with it.

sendTostring

The push notification's send to.

typestring

Push, system, both.

urlstring

The push notification's URL slug, as in its address on the site.

Returns

Returns the PushNotification object.

Status codes

201 400 401 412 500

POST/push-notification
curl -X POST 'http://hristovtintdetailng.com/push-notification?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "title": "...", "body": "...", "image": "...", "sendTo": "...", "type": "..." }'
Response
{
  "title": "Example",
  "body": "Text shown on the site.",
  "image": "example",
  "send_to": "example",
  "type": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve the push notification info

Get a summary info of push notifications. Answers an array of every record.

Admin token

Needs a site admin token.

Status codes

200 401 500

GET/push-notification-info
curl -X GET 'http://hristovtintdetailng.com/push-notification-info?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "user": "example",
  "is_admin": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve the push notification

How long until another push notification may be sent to ?sendTo (one every 48 hours). Answers { text } for the admin to show.

Admin token

Needs a site admin token.

Query parameters
sendTostring

Only push notifications with this send to.

Returns

Returns the PushNotification object.

Status codes

200 401 500

GET/push-notification/timer
curl -X GET 'http://hristovtintdetailng.com/push-notification/timer?ionic=true&sendTo=...' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "title": "Example",
  "body": "Text shown on the site.",
  "image": "example",
  "send_to": "example",
  "type": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve the push token

Devices registered for push notifications. Answers an array of every record.

Admin token

Needs a site admin token.

Returns

Returns the PushToken object.

Status codes

200 401 500

GET/push-token
curl -X GET 'http://hristovtintdetailng.com/push-token?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "user": "example",
  "is_admin": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a push token

One registered device. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the push token.

Returns

Returns the PushToken object.

Status codes

200 401 404 500

GET/push-token/:id
curl -X GET 'http://hristovtintdetailng.com/push-token/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "user": "example",
  "is_admin": false,
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}
↑↓ Navigate↵ GoEsc Close