curl --request GET \
--url https://api.mercemur.com/api/v1/marketing-forms \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mercemur.com/api/v1/marketing-forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/marketing-forms"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/marketing-forms"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/marketing-forms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"consent": {
"email": {
"double_opt_in": true,
"mode": "<string>",
"pre_checked": true,
"required": true,
"text": "<string>"
},
"sms": {
"double_opt_in": true,
"mode": "<string>",
"pre_checked": true,
"required": true,
"text": "<string>"
}
},
"created_at": "<string>",
"fields": [
{
"key": "<string>",
"label": "<string>",
"options": [
"<unknown>"
],
"placeholder": "<string>",
"required": true,
"type": "<string>"
}
],
"id": "<string>",
"name": "<string>",
"status": "<string>",
"success": {
"message": "<string>",
"redirect_url": "<string>",
"reveal_coupon": true
},
"targeting": {
"device": "<string>",
"exclude_urls": [
{
"op": "<string>",
"value": "<string>"
}
],
"frequency": {
"after_dismiss": {
"days": 123,
"unit": "<string>"
},
"after_submit": {
"days": 123,
"unit": "<string>"
}
},
"include_urls": [
{
"op": "<string>",
"value": "<string>"
}
],
"priority": 123,
"trigger": {
"delay_seconds": 123,
"idle_seconds": 123,
"kind": "<string>",
"scroll_percent": 123
}
},
"type": "<string>",
"updated_at": "<string>"
}
],
"page": {
"has_more": true,
"next_cursor": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}List marketing forms
The store’s signup forms and pop-ups: where each renders, what it asks, and the consent block it shows. ?status=active is the set the storefront is actually serving right now. honeypot_key IS NOT PUBLISHED on any route in this family. It is the hidden field a real shopper never fills and a bot must leave empty, so it is the whole of the spam defence; a client that could read it could submit past it on every form in the store.
curl --request GET \
--url https://api.mercemur.com/api/v1/marketing-forms \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mercemur.com/api/v1/marketing-forms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/marketing-forms"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/marketing-forms"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/marketing-forms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"consent": {
"email": {
"double_opt_in": true,
"mode": "<string>",
"pre_checked": true,
"required": true,
"text": "<string>"
},
"sms": {
"double_opt_in": true,
"mode": "<string>",
"pre_checked": true,
"required": true,
"text": "<string>"
}
},
"created_at": "<string>",
"fields": [
{
"key": "<string>",
"label": "<string>",
"options": [
"<unknown>"
],
"placeholder": "<string>",
"required": true,
"type": "<string>"
}
],
"id": "<string>",
"name": "<string>",
"status": "<string>",
"success": {
"message": "<string>",
"redirect_url": "<string>",
"reveal_coupon": true
},
"targeting": {
"device": "<string>",
"exclude_urls": [
{
"op": "<string>",
"value": "<string>"
}
],
"frequency": {
"after_dismiss": {
"days": 123,
"unit": "<string>"
},
"after_submit": {
"days": 123,
"unit": "<string>"
}
},
"include_urls": [
{
"op": "<string>",
"value": "<string>"
}
],
"priority": 123,
"trigger": {
"delay_seconds": 123,
"idle_seconds": 123,
"kind": "<string>",
"scroll_percent": 123
}
},
"type": "<string>",
"updated_at": "<string>"
}
],
"page": {
"has_more": true,
"next_cursor": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Query Parameters
Filter by lifecycle state. Omit it to receive all three. ONLY active forms are served to shoppers, so ?status=active is how you ask what the storefront is showing right now, and it is the v1 replacement for the storefront's own form feed. An unrecognised value is a 400 rather than an empty page: a client filtering on "live" would otherwise conclude the store runs no signup forms at all.
draft, active, paused Forms touched at or after this RFC3339 instant, for reconciling incrementally instead of re-reading every form on every run. It composes with status. Supplying it CHANGES THE ORDER of this endpoint: the default walk descends created_at, and this one climbs updated_at, because that is the only ordering in which a keyset walk over a mutable column cannot skip a row. A form changed mid-walk moves forward past your position and is returned again, so the walk is AT LEAST ONCE. WHAT A MISS COSTS HERE IS A FORM ON A PAGE THE MERCHANT TOOK DOWN: status decides whether the storefront renders the form at all, so a client that missed a pause keeps embedding one that was retired and keeps collecting addresses through it. A cursor from one ordering is refused by the other.
Rows per page. Out of range is a 400 rather than a silent clamp, so a client asking for more than 100 learns it did not get it.
1 <= x <= 100The next_cursor from the previous page. Opaque: decode nothing from it and construct nothing by hand, since its encoding is not part of this contract. Omit it to read the first page.