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.
Returns the site's custom forms, newest first unless a sort is given.
Needs a site admin token.
Returns a list of CustomForm objects.
curl -X GET 'http://smartman.bg/custom_forms?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
[
{
"obj": {},
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}
]Returns one custom form, found by its ID.
Needs a site admin token.
The ID of the custom form.
Returns the CustomForm object.
curl -X GET 'http://smartman.bg/custom_forms/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"obj": {},
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Update CustomForm by id.
Needs a site admin token.
The ID of the custom form.
Returns the CustomForm object.
curl -X PATCH 'http://smartman.bg/custom_forms/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"obj": {},
"_id": "6543210fedcba98765432100",
"updatedAt": "2026-11-04T12:00:00.000Z",
"createdAt": "2026-11-04T12:00:00.000Z"
}Delete CustomForm record by id.
Needs a site admin token.
The ID of the custom form.
Returns an empty answer on success.
curl -X DELETE 'http://smartman.bg/custom_forms/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Returns the site's forms, newest first unless a sort is given.
Needs a site admin token.
Returns a list of Form objects.
curl -X GET 'http://smartman.bg/forms?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
[
{
"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 new form.
Needs a reCAPTCHA token from the site form.
The form's body.
An email address.
Returns the Form object.
curl -X POST 'http://smartman.bg/forms?ionic=true' \
-H 'Content-Type: application/json' \
-d '{ "body": "...", "email": "..." }'{
"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"
}Returns one form, found by its ID.
Needs a site admin token.
The ID of the form.
Returns the Form object.
curl -X GET 'http://smartman.bg/forms/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"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 Form by id.
Needs a site admin token.
The ID of the form.
Returns the Form object.
curl -X PATCH 'http://smartman.bg/forms/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"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 Form record by id.
Needs a site admin token.
The ID of the form.
Returns an empty answer on success.
curl -X DELETE 'http://smartman.bg/forms/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Returns the site's leads, newest first unless a sort is given.
Needs a site admin token.
Returns a list of Lead objects.
curl -X GET 'http://smartman.bg/leads?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
[
{
"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"
]
}
]Creates a lead from the fields sent.
Public - no token needed.
The lead's owner id.
The lead's split.
An email address.
The lead's phone number.
The lead's organization name.
The lead's firstname.
The lead's lastname.
The lead's address.
The lead's city.
The lead's state.
The lead's country.
The lead's zip code.
The lead's tax identification number.
The lead's notes.
The tickets - the ID of a ticket.
The lead's products.
The lead's programs.
The donations - the ID of a donation.
The lead's newsletter.
The lead's name.
The lead's age.
The lead's products obj.
The lead's programs obj.
The lead's value.
The lead's donations str.
Returns the Lead object.
curl -X POST 'http://smartman.bg/leads?ionic=true' \
-H 'Content-Type: application/json' \
-d '{ "owner_id": "...", "split": "...", "email": "...", "phone_number": "...", "organization_name": "..." }'{
"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"
]
}Returns one lead, found by its ID.
Public - no token needed.
The ID of the lead.
Returns the Lead object.
curl -X GET 'http://smartman.bg/leads/{id}?ionic=true'{
"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"
]
}Changes the fields sent; the others stay as they are.
Needs a site admin token.
The ID of the lead.
Returns the Lead object.
curl -X PATCH 'http://smartman.bg/leads/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"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"
]
}Deletes the lead. This cannot be undone.
Needs a site admin token.
The ID of the lead.
Returns an empty answer on success.
curl -X DELETE 'http://smartman.bg/leads/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Returns the site's newsletter contacts, newest first unless a sort is given.
Needs the token of a signed-in user.
Returns a list of NewsletterContact objects.
curl -X GET 'http://smartman.bg/newsletter_contacts?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
[
{
"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 new newsletter_contact.
Needs a reCAPTCHA token from the site form.
The newsletter contact's name.
An email address.
The newsletter contact's age.
The newsletter contact's city.
Returns the NewsletterContact object.
curl -X POST 'http://smartman.bg/newsletter_contacts?ionic=true' \
-H 'Content-Type: application/json' \
-d '{ "name": "...", "email": "...", "age": "...", "city": "..." }'{
"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"
}Returns one newsletter contact, found by its ID.
Needs the token of a signed-in user.
The ID of the newsletter contact.
Returns the NewsletterContact object.
curl -X GET 'http://smartman.bg/newsletter_contacts/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"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 NewsletterContact by id.
Needs the token of a signed-in user.
The ID of the newsletter contact.
Returns the NewsletterContact object.
curl -X PATCH 'http://smartman.bg/newsletter_contacts/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"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 NewsletterContact record by id.
Needs the token of a signed-in user.
The ID of the newsletter contact.
Returns an empty answer on success.
curl -X DELETE 'http://smartman.bg/newsletter_contacts/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Download price quote pdf.
Public - no token needed.
The ID of the download price quote.
The download price quote's translate.
The download price quote's filename.
curl -X GET 'http://smartman.bg/download-price-quote/{id}/{translate}/{filename}?ionic=true'Returns the price quote.
Needs a site admin token.
Returns the PriceQuote object.
curl -X GET 'http://smartman.bg/price-quote?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"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 new price quote.
Needs a site admin token.
The price quote's send.
Returns the PriceQuote object.
curl -X POST 'http://smartman.bg/price-quote?ionic=true' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{ "send": "..." }'{
"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"
}
}Returns one price quote, found by its ID.
Needs a site admin token.
The ID of the price quote.
Returns the PriceQuote object.
curl -X GET 'http://smartman.bg/price-quote/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"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 PriceQuote record by id.
Needs a site admin token.
The ID of the price quote.
Returns an empty answer on success.
curl -X DELETE 'http://smartman.bg/price-quote/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'Returns the unsubscribe.
Works without a token; with a user token the answer is personal.
curl -X GET 'http://smartman.bg/unsubscribe?ionic=true'
Returns the unsubscribed.
Needs a site admin token.
Returns the Unsubscribed object.
curl -X GET 'http://smartman.bg/unsubscribed-list?ionic=true' \ -H 'Authorization: Bearer <TOKEN>'
{
"email": "jane@example.com",
"_id": "6543210fedcba98765432100"
}Create new unsubscribed.
Public - no token needed.
An email address.
Returns the Unsubscribed object.
curl -X POST 'http://smartman.bg/unsubscribed-list?ionic=true' \
-H 'Content-Type: application/json' \
-d '{ "email": "..." }'{
"email": "jane@example.com",
"_id": "6543210fedcba98765432100"
}Returns one unsubscribed, found by its ID.
Needs a site admin token.
The ID of the unsubscribed.
Returns the Unsubscribed object.
curl -X GET 'http://smartman.bg/unsubscribed-list/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"email": "jane@example.com",
"_id": "6543210fedcba98765432100"
}Update Unsubscribed by id.
Needs a site admin token.
The ID of the unsubscribed.
Returns the Unsubscribed object.
curl -X PATCH 'http://smartman.bg/unsubscribed-list/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'{
"email": "jane@example.com",
"_id": "6543210fedcba98765432100"
}Delete Unsubscribed record by id.
Needs a site admin token.
The ID of the unsubscribed.
Returns an empty answer on success.
curl -X DELETE 'http://smartman.bg/unsubscribed-list/{id}?ionic=true' \
-H 'Authorization: Bearer <TOKEN>'