Marketing
Get a signup form
Returns a signup form and its configuration.
GET
/
marketing
/
forms
/
{id}
Get a signup form
curl --request GET \
--url https://api.jetemail.com/marketing/forms/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.jetemail.com/marketing/forms/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.jetemail.com/marketing/forms/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jetemail.com/marketing/forms/{id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jetemail.com/marketing/forms/{id}"
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))
}HttpResponse<String> response = Unirest.get("https://api.jetemail.com/marketing/forms/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jetemail.com/marketing/forms/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"form": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_id": "form_oCiNpdGJPDhgV4kFa6t1jeoF",
"name": "Website newsletter",
"status": "active",
"audience_id": "<string>",
"audience_name": "<string>",
"fields": [
{
"name": "email",
"label": "Email address",
"type": "email",
"required": true,
"placeholder": "you@example.com"
}
],
"settings": {
"heading": "Stay in the loop",
"description": "Get product news and updates delivered to your inbox.",
"buttonLabel": "Subscribe",
"successMessage": "You're subscribed. Thanks for joining!",
"errorMessage": "Something went wrong. Please try again.",
"requireConsent": false,
"consentLabel": "I agree to receive marketing emails. I can unsubscribe at any time.",
"redirectUrl": "<string>",
"backgroundColor": "#ffffff",
"textColor": "#111827",
"inputColor": "#ffffff",
"buttonColor": "#111827",
"buttonTextColor": "#ffffff",
"borderColor": "#d1d5db",
"fontFamily": "Arial, sans-serif",
"borderRadius": 8,
"hideBranding": true,
"optInMode": "single",
"pendingMessage": "<string>",
"confirmationFromName": "<string>",
"confirmationFromEmail": "jsmith@example.com",
"confirmationSubject": "<string>",
"confirmationMessage": "<string>",
"confirmationButtonLabel": "<string>",
"confirmationRedirectUrl": "<string>",
"autoProtection": true
},
"turnstile_enabled": 0,
"turnstile_site_key": "<string>",
"turnstile_configured": true,
"subscriber_count": 123,
"opt_in_mode": "single",
"recent_attempt_count": 123,
"recent_blocked_count": 123,
"pending_confirmation_count": 123,
"form_url": "https://api.jetemail.com/forms/form_oCiNpdGJPDhgV4kFa6t1jeoF",
"created_at": 123,
"updated_at": 123
}
}⌘I
Get a signup form
curl --request GET \
--url https://api.jetemail.com/marketing/forms/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.jetemail.com/marketing/forms/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.jetemail.com/marketing/forms/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jetemail.com/marketing/forms/{id}",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jetemail.com/marketing/forms/{id}"
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))
}HttpResponse<String> response = Unirest.get("https://api.jetemail.com/marketing/forms/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jetemail.com/marketing/forms/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"form": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_id": "form_oCiNpdGJPDhgV4kFa6t1jeoF",
"name": "Website newsletter",
"status": "active",
"audience_id": "<string>",
"audience_name": "<string>",
"fields": [
{
"name": "email",
"label": "Email address",
"type": "email",
"required": true,
"placeholder": "you@example.com"
}
],
"settings": {
"heading": "Stay in the loop",
"description": "Get product news and updates delivered to your inbox.",
"buttonLabel": "Subscribe",
"successMessage": "You're subscribed. Thanks for joining!",
"errorMessage": "Something went wrong. Please try again.",
"requireConsent": false,
"consentLabel": "I agree to receive marketing emails. I can unsubscribe at any time.",
"redirectUrl": "<string>",
"backgroundColor": "#ffffff",
"textColor": "#111827",
"inputColor": "#ffffff",
"buttonColor": "#111827",
"buttonTextColor": "#ffffff",
"borderColor": "#d1d5db",
"fontFamily": "Arial, sans-serif",
"borderRadius": 8,
"hideBranding": true,
"optInMode": "single",
"pendingMessage": "<string>",
"confirmationFromName": "<string>",
"confirmationFromEmail": "jsmith@example.com",
"confirmationSubject": "<string>",
"confirmationMessage": "<string>",
"confirmationButtonLabel": "<string>",
"confirmationRedirectUrl": "<string>",
"autoProtection": true
},
"turnstile_enabled": 0,
"turnstile_site_key": "<string>",
"turnstile_configured": true,
"subscriber_count": 123,
"opt_in_mode": "single",
"recent_attempt_count": 123,
"recent_blocked_count": 123,
"pending_confirmation_count": 123,
"form_url": "https://api.jetemail.com/forms/form_oCiNpdGJPDhgV4kFa6t1jeoF",
"created_at": 123,
"updated_at": 123
}
}