API ReferenceView as MarkdownOpenAPI

Leads & forms

View as Markdown

Leads are the enquiries visitors send - contact forms, custom forms and lead forms on pages - with where they came from.

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.

30 endpoints in 6 parts: Custom Form, Form, Lead, Newsletter Contact, Price Quote, Unsubscribed.

List all custom forms

The custom forms. Answers an array of every record.

Admin token

Needs a site admin token.

Returns

Returns a list of CustomForm objects.

Status codes

200 401 500

GET/custom_forms
curl -X GET 'http://smartman.max-media.io/custom_forms?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "obj": {},
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Retrieve a custom form

One custom form. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the custom form.

Returns

Returns the CustomForm object.

Status codes

200 401 404 500

GET/custom_forms/:id
curl -X GET 'http://smartman.max-media.io/custom_forms/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "obj": {},
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a custom form

Updates a custom form. 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 custom form.

Returns

Returns the CustomForm object.

Status codes

200 400 401 404 500

PATCH/custom_forms/:id
curl -X PATCH 'http://smartman.max-media.io/custom_forms/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "obj": {},
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete a custom form

Deletes a custom form. 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 custom form.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/custom_forms/:id
curl -X DELETE 'http://smartman.max-media.io/custom_forms/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all forms

Form submissions. Answers an array of every record.

Admin token

Needs a site admin token.

Returns

Returns a list of Form objects.

Status codes

200 401 500

GET/forms
curl -X GET 'http://smartman.max-media.io/forms?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "name": "Example",
    "email": "jane@example.com",
    "subject": "example",
    "body": "Text shown on the site.",
    "medias": [],
    "additional": [
      {
        "title": "Example",
        "option": "example",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a form

Creates a form submission. Multipart with up to 5 files (medias), behind reCAPTCHA. Emails the business; a sender who ticks newsletter (with name and email) is signed up. A website form is sent back to the page it came from.

reCAPTCHA

Needs a reCAPTCHA token from the site form.

Parameters
bodystring

Body of text.

emailstring

An email address.

Returns

Returns the Form object.

Status codes

200 400 500

POST/forms
curl -X POST 'http://smartman.max-media.io/forms?ionic=true' \
  -H 'Content-Type: application/json' \
  -d '{ "body": "...", "email": "..." }'
Response
{
  "name": "Example",
  "email": "jane@example.com",
  "subject": "example",
  "body": "Text shown on the site.",
  "medias": [],
  "additional": [
    {
      "title": "Example",
      "option": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a form

One form submission. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the form.

Returns

Returns the Form object.

Status codes

200 401 404 500

GET/forms/:id
curl -X GET 'http://smartman.max-media.io/forms/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "email": "jane@example.com",
  "subject": "example",
  "body": "Text shown on the site.",
  "medias": [],
  "additional": [
    {
      "title": "Example",
      "option": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a form

Updates a form submission. 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 form.

Returns

Returns the Form object.

Status codes

200 400 401 404 500

PATCH/forms/:id
curl -X PATCH 'http://smartman.max-media.io/forms/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "email": "jane@example.com",
  "subject": "example",
  "body": "Text shown on the site.",
  "medias": [],
  "additional": [
    {
      "title": "Example",
      "option": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete a form

Deletes a form submission. 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 form.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/forms/:id
curl -X DELETE 'http://smartman.max-media.io/forms/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all leads

The customers. Answers an array of every record.

Admin token

Needs a site admin token.

Returns

Returns a list of Lead objects.

Status codes

200 401 500

GET/leads
curl -X GET 'http://smartman.max-media.io/leads?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "seq": 0,
    "organization_name": "Example",
    "firstname": "Example",
    "lastname": "Example",
    "email": "jane@example.com",
    "phone_number": "+359 888 123 456",
    "address": "example",
    "city": "example",
    "state": "example",
    "country": "example",
    "zip_code": "example",
    "tax_identification_number": "example",
    "vat_id": "example",
    "notes": "Text shown on the site.",
    "products": [
      "example"
    ],
    "products_obj": [
      {
        "product_id": "6543210fedcba98765432100",
        "name": "Example",
        "options": "example",
        "price": 49.9,
        "quantity": 1,
        "_id": "6543210fedcba98765432100"
      }
    ],
    "programs": [
      "example"
    ],
    "programs_obj": [
      {
        "program_id": "6543210fedcba98765432100",
        "title": "Example",
        "price": 49.9,
        "_id": "6543210fedcba98765432100"
      }
    ],
    "tickets": [
      "6543210fedcba98765432101"
    ],
    "donations": [
      "6543210fedcba98765432101"
    ],
    "donations_obj": [
      {
        "donation_id": "6543210fedcba98765432100",
        "name": "Example",
        "options": "example",
        "price": 49.9,
        "quantity": 1,
        "_id": "6543210fedcba98765432100"
      }
    ],
    "lifetime_value": 0,
    "last_order_value": 49.9,
    "services": [
      "6543210fedcba98765432101"
    ]
  }
]

Create a lead

Creates or updates a customer from a checkout or form, signing them up to the newsletter when asked. Matched by email, then by phone number, so a returning customer is updated rather than duplicated. Reads no token.

Public

Public - no token needed.

Parameters
owner_idstring

The lead's owner id.

splitstring

The lead's split.

emailstring

An email address.

phone_numberstring

Customer's phone number.

organization_namestring

Customer's company name.

firstnamestring

Customer's first name.

lastnamestring

Customer's last name.

addressstring

Customer's address.

citystring

Customer's city.

statestring

Customer's state or region.

countrystring

Customer's country.

zip_codestring

Customer's postal code.

tax_identification_numberstring

Customer's tax number.

notesstring

Notes kept on the customer.

ticketsobjectid[]

Ticket ids.

productsstring[]

Product ids the customer bought.

programsstring[]

Program ids the customer bought.

donationsobjectid[]

Donation ids.

newsletterstring

The lead's newsletter.

namestring

The lead's name.

agestring

The lead's age.

products_objobject[]

The products bought, as they were when ordered.

programs_objobject[]

The programs bought, as they were when ordered.

valuestring

The lead's value.

donations_strstring

The lead's donations str.

Returns

Returns the Lead object.

Status codes

200 400 500 503

POST/leads
curl -X POST 'http://smartman.max-media.io/leads?ionic=true' \
  -H 'Content-Type: application/json' \
  -d '{ "owner_id": "...", "split": "...", "email": "...", "phone_number": "...", "organization_name": "..." }'
Response
{
  "seq": 0,
  "organization_name": "Example",
  "firstname": "Example",
  "lastname": "Example",
  "email": "jane@example.com",
  "phone_number": "+359 888 123 456",
  "address": "example",
  "city": "example",
  "state": "example",
  "country": "example",
  "zip_code": "example",
  "tax_identification_number": "example",
  "vat_id": "example",
  "notes": "Text shown on the site.",
  "products": [
    "example"
  ],
  "products_obj": [
    {
      "product_id": "6543210fedcba98765432100",
      "name": "Example",
      "options": "example",
      "price": 49.9,
      "quantity": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "programs": [
    "example"
  ],
  "programs_obj": [
    {
      "program_id": "6543210fedcba98765432100",
      "title": "Example",
      "price": 49.9,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "tickets": [
    "6543210fedcba98765432101"
  ],
  "donations": [
    "6543210fedcba98765432101"
  ],
  "donations_obj": [
    {
      "donation_id": "6543210fedcba98765432100",
      "name": "Example",
      "options": "example",
      "price": 49.9,
      "quantity": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "lifetime_value": 0,
  "last_order_value": 49.9,
  "services": [
    "6543210fedcba98765432101"
  ]
}

Retrieve a lead

One customer. 404 when there is no such record.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the lead.

Returns

Returns the Lead object.

Status codes

200 404 500

GET/leads/:id
curl -X GET 'http://smartman.max-media.io/leads/{id}?ionic=true'
Response
{
  "seq": 0,
  "organization_name": "Example",
  "firstname": "Example",
  "lastname": "Example",
  "email": "jane@example.com",
  "phone_number": "+359 888 123 456",
  "address": "example",
  "city": "example",
  "state": "example",
  "country": "example",
  "zip_code": "example",
  "tax_identification_number": "example",
  "vat_id": "example",
  "notes": "Text shown on the site.",
  "products": [
    "example"
  ],
  "products_obj": [
    {
      "product_id": "6543210fedcba98765432100",
      "name": "Example",
      "options": "example",
      "price": 49.9,
      "quantity": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "programs": [
    "example"
  ],
  "programs_obj": [
    {
      "program_id": "6543210fedcba98765432100",
      "title": "Example",
      "price": 49.9,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "tickets": [
    "6543210fedcba98765432101"
  ],
  "donations": [
    "6543210fedcba98765432101"
  ],
  "donations_obj": [
    {
      "donation_id": "6543210fedcba98765432100",
      "name": "Example",
      "options": "example",
      "price": 49.9,
      "quantity": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "lifetime_value": 0,
  "last_order_value": 49.9,
  "services": [
    "6543210fedcba98765432101"
  ]
}

Update a lead

Updates a customer. 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 lead.

Returns

Returns the Lead object.

Status codes

200 400 401 404 500

PATCH/leads/:id
curl -X PATCH 'http://smartman.max-media.io/leads/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "seq": 0,
  "organization_name": "Example",
  "firstname": "Example",
  "lastname": "Example",
  "email": "jane@example.com",
  "phone_number": "+359 888 123 456",
  "address": "example",
  "city": "example",
  "state": "example",
  "country": "example",
  "zip_code": "example",
  "tax_identification_number": "example",
  "vat_id": "example",
  "notes": "Text shown on the site.",
  "products": [
    "example"
  ],
  "products_obj": [
    {
      "product_id": "6543210fedcba98765432100",
      "name": "Example",
      "options": "example",
      "price": 49.9,
      "quantity": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "programs": [
    "example"
  ],
  "programs_obj": [
    {
      "program_id": "6543210fedcba98765432100",
      "title": "Example",
      "price": 49.9,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "tickets": [
    "6543210fedcba98765432101"
  ],
  "donations": [
    "6543210fedcba98765432101"
  ],
  "donations_obj": [
    {
      "donation_id": "6543210fedcba98765432100",
      "name": "Example",
      "options": "example",
      "price": 49.9,
      "quantity": 1,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "lifetime_value": 0,
  "last_order_value": 49.9,
  "services": [
    "6543210fedcba98765432101"
  ]
}

Delete a lead

Deletes a customer. 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 lead.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/leads/:id
curl -X DELETE 'http://smartman.max-media.io/leads/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

List all newsletter contacts

Newsletter subscribers. Answers an array of every record.

User token

Needs the token of a signed-in user.

Returns

Returns a list of NewsletterContact objects.

Status codes

200 401 500

GET/newsletter_contacts
curl -X GET 'http://smartman.max-media.io/newsletter_contacts?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "name": "Example",
    "age": 1,
    "email": "jane@example.com",
    "city": "example",
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z"
  }
]

Create a newsletter contact

Creates a newsletter subscriber. Behind reCAPTCHA. Answers 200, or 200 { already_subscribed: true }; a new subscriber gets the welcome email.

reCAPTCHA

Needs a reCAPTCHA token from the site form.

Parameters
namestring

Subscriber's name.

emailstring

An email address.

agenumber

Subscriber's age.

citystring

Subscriber's city.

Returns

Returns the NewsletterContact object.

Status codes

200 400 500

POST/newsletter_contacts
curl -X POST 'http://smartman.max-media.io/newsletter_contacts?ionic=true' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "...", "email": "...", "age": "...", "city": "..." }'
Response
{
  "name": "Example",
  "age": 1,
  "email": "jane@example.com",
  "city": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Retrieve a newsletter contact

One newsletter subscriber. 404 when there is no such record.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the newsletter contact.

Returns

Returns the NewsletterContact object.

Status codes

200 401 404 500

GET/newsletter_contacts/:id
curl -X GET 'http://smartman.max-media.io/newsletter_contacts/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "age": 1,
  "email": "jane@example.com",
  "city": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Update a newsletter contact

Updates a newsletter subscriber. 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 newsletter contact.

Returns

Returns the NewsletterContact object.

Status codes

200 400 401 404 500

PATCH/newsletter_contacts/:id
curl -X PATCH 'http://smartman.max-media.io/newsletter_contacts/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "name": "Example",
  "age": 1,
  "email": "jane@example.com",
  "city": "example",
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z"
}

Delete a newsletter contact

Deletes a newsletter subscriber. Answers the deleted record, or 404. Records that point to it are not changed.

User token

Needs the token of a signed-in user.

Path parameters
idstringRequired

The ID of the newsletter contact.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/newsletter_contacts/:id
curl -X DELETE 'http://smartman.max-media.io/newsletter_contacts/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a download price quote

Download price quote pdf. Answers the PDF; translate picks the second language. Reads no token.

Public

Public - no token needed.

Path parameters
idstringRequired

The ID of the download price quote.

translatestringRequired

The download price quote's translate.

filenamestringRequired

The download price quote's filename.

Status codes

200 400 500

GET/download-price-quote/:id/:translate/:filename
curl -X GET 'http://smartman.max-media.io/download-price-quote/{id}/{translate}/{filename}?ionic=true'

Retrieve the price quote

The price quotes. Answers an array.

Admin token

Needs a site admin token.

Returns

Returns the PriceQuote object.

Status codes

200 401 500

GET/price-quote
curl -X GET 'http://smartman.max-media.io/price-quote?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "customer_name": "Example",
  "customer_address": "example",
  "customer_postal_code": "example",
  "customer_city": "example",
  "customer_country": "example",
  "customer_phone": "+359 888 123 456",
  "customer_email": "jane@example.com",
  "customer_tax_id": "example",
  "customer_vat_id": "example",
  "customer_responsible_official": "example",
  "customer_organization_name": "Example",
  "billing_customer_address": "example",
  "billing_customer_postal_code": "example",
  "billing_customer_city": "example",
  "billing_customer_country": "example",
  "billing_customer_phone": "+359 888 123 456",
  "subtotal": 49.9,
  "amount": 49.9,
  "day_of_issue": "example",
  "number": 1,
  "foreign": false,
  "home_tax": 0,
  "foreign_tax": 0,
  "items": [
    {
      "id": "example",
      "name": "Example",
      "qty": 1,
      "unit_price": 49.9,
      "discount": 1,
      "amount": 49.9,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "invoice_settings": {
    "number": 0,
    "price_quote_number": "example",
    "bic": "example",
    "swift": "example",
    "tax_id": "example",
    "vat_id": "example",
    "logo": "example",
    "business_name": "Example",
    "business_name_translated": "Example",
    "responsible_official": "example",
    "responsible_official_translated": "example",
    "business_email": "jane@example.com"
  }
}

Create a price quote

Creates a price quote. Numbered from the invoice settings and emailed to the customer when asked. Answers 201 { id }.

Admin token

Needs a site admin token.

Parameters
sendstring

The price quote's send.

Returns

Returns the PriceQuote object.

Status codes

201 400 401 500

POST/price-quote
curl -X POST 'http://smartman.max-media.io/price-quote?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "send": "..." }'
Response
{
  "customer_name": "Example",
  "customer_address": "example",
  "customer_postal_code": "example",
  "customer_city": "example",
  "customer_country": "example",
  "customer_phone": "+359 888 123 456",
  "customer_email": "jane@example.com",
  "customer_tax_id": "example",
  "customer_vat_id": "example",
  "customer_responsible_official": "example",
  "customer_organization_name": "Example",
  "billing_customer_address": "example",
  "billing_customer_postal_code": "example",
  "billing_customer_city": "example",
  "billing_customer_country": "example",
  "billing_customer_phone": "+359 888 123 456",
  "subtotal": 49.9,
  "amount": 49.9,
  "day_of_issue": "example",
  "number": 1,
  "foreign": false,
  "home_tax": 0,
  "foreign_tax": 0,
  "items": [
    {
      "id": "example",
      "name": "Example",
      "qty": 1,
      "unit_price": 49.9,
      "discount": 1,
      "amount": 49.9,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "invoice_settings": {
    "number": 0,
    "price_quote_number": "example",
    "bic": "example",
    "swift": "example",
    "tax_id": "example",
    "vat_id": "example",
    "logo": "example",
    "business_name": "Example",
    "business_name_translated": "Example",
    "responsible_official": "example",
    "responsible_official_translated": "example",
    "business_email": "jane@example.com"
  }
}

Retrieve a price quote

One price quote. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the price quote.

Returns

Returns the PriceQuote object.

Status codes

200 401 404 500

GET/price-quote/:id
curl -X GET 'http://smartman.max-media.io/price-quote/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "customer_name": "Example",
  "customer_address": "example",
  "customer_postal_code": "example",
  "customer_city": "example",
  "customer_country": "example",
  "customer_phone": "+359 888 123 456",
  "customer_email": "jane@example.com",
  "customer_tax_id": "example",
  "customer_vat_id": "example",
  "customer_responsible_official": "example",
  "customer_organization_name": "Example",
  "billing_customer_address": "example",
  "billing_customer_postal_code": "example",
  "billing_customer_city": "example",
  "billing_customer_country": "example",
  "billing_customer_phone": "+359 888 123 456",
  "subtotal": 49.9,
  "amount": 49.9,
  "day_of_issue": "example",
  "number": 1,
  "foreign": false,
  "home_tax": 0,
  "foreign_tax": 0,
  "items": [
    {
      "id": "example",
      "name": "Example",
      "qty": 1,
      "unit_price": 49.9,
      "discount": 1,
      "amount": 49.9,
      "_id": "6543210fedcba98765432100"
    }
  ],
  "invoice_settings": {
    "number": 0,
    "price_quote_number": "example",
    "bic": "example",
    "swift": "example",
    "tax_id": "example",
    "vat_id": "example",
    "logo": "example",
    "business_name": "Example",
    "business_name_translated": "Example",
    "responsible_official": "example",
    "responsible_official_translated": "example",
    "business_email": "jane@example.com"
  }
}

Delete a price quote

Deletes a price quote. 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 price quote.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/price-quote/:id
curl -X DELETE 'http://smartman.max-media.io/price-quote/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve the unsubscribe

The unsubscribe page. Opened from the link in emails.

Optional user

Works without a token; with a user token the answer is personal.

Status codes

200

GET/unsubscribe
curl -X GET 'http://smartman.max-media.io/unsubscribe?ionic=true'

Retrieve the unsubscribed

Emails that opted out. Answers an array of every record.

Admin token

Needs a site admin token.

Returns

Returns the Unsubscribed object.

Status codes

200 401 500

GET/unsubscribed-list
curl -X GET 'http://smartman.max-media.io/unsubscribed-list?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "email": "jane@example.com",
  "_id": "6543210fedcba98765432100"
}

Create an unsubscribed

Creates an opted-out email. Reads no token: the unsubscribe page calls it. 409 when the email has already opted out.

Public

Public - no token needed.

Parameters
emailstring

An email address.

Returns

Returns the Unsubscribed object.

Status codes

201 400 409 500

POST/unsubscribed-list
curl -X POST 'http://smartman.max-media.io/unsubscribed-list?ionic=true' \
  -H 'Content-Type: application/json' \
  -d '{ "email": "..." }'
Response
{
  "email": "jane@example.com",
  "_id": "6543210fedcba98765432100"
}

Retrieve an unsubscribed

One opted-out email. 404 when there is no such record.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the unsubscribed.

Returns

Returns the Unsubscribed object.

Status codes

200 401 404 500

GET/unsubscribed-list/:id
curl -X GET 'http://smartman.max-media.io/unsubscribed-list/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "email": "jane@example.com",
  "_id": "6543210fedcba98765432100"
}

Update an unsubscribed

Updates an opted-out email. 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 unsubscribed.

Returns

Returns the Unsubscribed object.

Status codes

200 400 401 404 500

PATCH/unsubscribed-list/:id
curl -X PATCH 'http://smartman.max-media.io/unsubscribed-list/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "email": "jane@example.com",
  "_id": "6543210fedcba98765432100"
}

Delete an unsubscribed

Deletes an opted-out email. 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 unsubscribed.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/unsubscribed-list/:id
curl -X DELETE 'http://smartman.max-media.io/unsubscribed-list/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
↑↓ Navigate↵ GoEsc Close