curl --request POST \
--url https://api.mercemur.com/api/v1/marketing-forms/{formId}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.mercemur.com/api/v1/marketing-forms/{formId}/activate', 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/{formId}/activate"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/marketing-forms/{formId}/activate"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/{formId}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}Activate a signup form
curl --request POST \
--url https://api.mercemur.com/api/v1/marketing-forms/{formId}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '{}'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({})
};
fetch('https://api.mercemur.com/api/v1/marketing-forms/{formId}/activate', 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/{formId}/activate"
payload = {}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/marketing-forms/{formId}/activate"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/{formId}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>"
}
}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.
Headers
A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.
Path Parameters
Body
Takes no parameters, and an empty body is expected. THE FORM IS IN FRONT OF SHOPPERS ON THE NEXT STOREFRONT REQUEST, with whatever consent wording it currently carries, and every submission taken from that moment quotes that wording as evidence. Read the form first if you did not write it. A ROUTE rather than a status field on the replace, so that a bug in a replace body cannot ALSO rewrite the consent block in the same call: this touches status and nothing else.
Response
Success
Show child attributes
Show child attributes
