E-mails
Modèles, campagnes, automatisations et e-mails individuels aux contacts.
Valeurs des exemples
Saisissez-les une fois : tous les exemples de cette page les utilisent. La clé d’API reste sur cette page et n’est jamais enregistrée.
GET/v1/emails/automations
Liste les automatisations d’e-mail.
Lire/automationsEn cas de succès : 200.Permission : Lire.
Exemple
curl -X GET "https://api.firmado.app/v1/emails/automations" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/automations", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/automations",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/automations");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/automations")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/automations", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/automations"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/automations");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/automations
Crée une automatisation d’e-mail : ce qui la déclenche et le modèle qu’elle envoie.
Créer/automationsEn cas de succès : 201.Permission : Créer.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Oui | min length 1 · max length 120 |
kind | "marketing" | "transactional" | Non | default "marketing" |
trigger | object | Oui | |
trigger.type | "list.joined" | "contact.created" | "form.submitted" | "deal.accepted" | "invoice.paid" | "appointment.created" | Oui | |
trigger.listId | string (uuid) | null | Non | |
trigger.formId | string (uuid) | null | Non | |
delayMinutes | integer | Non | min 0 · max 43200 · default 0 |
templateId | string (uuid) | null | Non | default null |
domainId | string (uuid) | null | Non | |
fromName | string | null | Non | |
fromLocal | string | null | Non | |
replyTo | string (email) | null | Non |
Réponse
19 champs
| Champ | Type | Toujours présent |
|---|---|---|
activatedAt | null dans les exemples | Oui |
active | boolean | Oui |
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
delayMinutes | integer | Oui |
domainId | null dans les exemples | Oui |
fromLocal | null dans les exemples | Oui |
fromName | null dans les exemples | Oui |
id | string (uuid) | Oui |
kind | string | Oui |
name | string | Oui |
organizationId | string (uuid) | Oui |
replyTo | null dans les exemples | Oui |
templateId | string (uuid) | Oui |
trigger | object | Oui |
trigger.formId | null dans les exemples | Oui |
trigger.listId | string (uuid) | Oui |
trigger.type | string | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/automations" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"kind": "marketing",
"delayMinutes": 0
}'const res = await fetch("https://api.firmado.app/v1/emails/automations", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"kind": "marketing",
"delayMinutes": 0
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/automations",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
},
"kind": "marketing",
"delayMinutes": 0,
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/automations");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"kind": "marketing",
"delayMinutes": 0
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/automations")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"kind": "marketing",
"delayMinutes": 0
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"kind": "marketing",
"delayMinutes": 0
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/automations", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/automations"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"kind": "marketing",
"delayMinutes": 0
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/automations");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"kind": "marketing",
"delayMinutes": 0
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (201), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"active": true,
"kind": "…",
"trigger": {
"type": "…",
"formId": null,
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 1,
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"domainId": null,
"fromName": null,
"fromLocal": null,
"replyTo": null,
"activatedAt": null,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}DELETE/v1/emails/automations/{id}
Supprime une automatisation d’e-mail.
Supprimer/automations/{id}En cas de succès : 204.Permission : Supprimer.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Exemple
curl -X DELETE "https://api.firmado.app/v1/emails/automations/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/automations/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/emails/automations/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/automations/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/automations/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/emails/automations/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/automations/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/emails/automations/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();PATCH/v1/emails/automations/{id}
Modifie une automatisation d’e-mail.
Modifier/automations/{id}En cas de succès : 200.Permission : Modifier.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Non | min length 1 · max length 120 |
kind | "marketing" | "transactional" | Non | |
trigger | object | Non | |
trigger.type | "list.joined" | "contact.created" | "form.submitted" | "deal.accepted" | "invoice.paid" | "appointment.created" | Oui | |
trigger.listId | string (uuid) | null | Non | |
trigger.formId | string (uuid) | null | Non | |
delayMinutes | integer | Non | min 0 · max 43200 |
templateId | string (uuid) | null | Non | |
domainId | string (uuid) | null | Non | |
fromName | string | null | Non | |
fromLocal | string | null | Non | |
replyTo | string (email) | null | Non |
Exemple
curl -X PATCH "https://api.firmado.app/v1/emails/automations/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 0
}'const res = await fetch("https://api.firmado.app/v1/emails/automations/{id}", {
method: "PATCH",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 0
}),
})
const data = await res.json()import requests
res = requests.patch(
"https://api.firmado.app/v1/emails/automations/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
},
"delayMinutes": 0,
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/automations/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 0
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/automations/{id}")
req = Net::HTTP::Patch.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 0
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 0
}`)
req, _ := http.NewRequest("PATCH", "https://api.firmado.app/v1/emails/automations/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/automations/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 0
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.firmado.app/v1/emails/automations/{id}");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"kind": "marketing",
"trigger": {
"type": "list.joined",
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"formId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 0
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/automations/{id}/active
Active ou désactive une automatisation d’e-mail.
Modifier/automations/{id}/activeEn cas de succès : 200.Permission : Modifier.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
active | boolean | Oui |
Réponse
19 champs
| Champ | Type | Toujours présent |
|---|---|---|
activatedAt | string (date-time) | Oui |
active | boolean | Oui |
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
delayMinutes | integer | Oui |
domainId | null dans les exemples | Oui |
fromLocal | null dans les exemples | Oui |
fromName | null dans les exemples | Oui |
id | string (uuid) | Oui |
kind | string | Oui |
name | string | Oui |
organizationId | string (uuid) | Oui |
replyTo | null dans les exemples | Oui |
templateId | string (uuid) | Oui |
trigger | object | Oui |
trigger.formId | null dans les exemples | Oui |
trigger.listId | string (uuid) | Oui |
trigger.type | string | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/automations/{id}/active" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"active": true
}'const res = await fetch("https://api.firmado.app/v1/emails/automations/{id}/active", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"active": true
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/automations/{id}/active",
headers={"X-Api-Key": "fmd_..."},
json={
"active": True,
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/automations/{id}/active");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"active": true
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/automations/{id}/active")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"active": true
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"active": true
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/automations/{id}/active", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/automations/{id}/active"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"active": true
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/automations/{id}/active");
request.Content = new StringContent(""""
{
"active": true
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"active": true,
"kind": "…",
"trigger": {
"type": "…",
"formId": null,
"listId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
},
"delayMinutes": 1,
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"domainId": null,
"fromName": null,
"fromLocal": null,
"replyTo": null,
"activatedAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}GET/v1/emails/campaigns
Liste les campagnes d’e-mail.
Lire/campaignsEn cas de succès : 200.Permission : Lire.
Exemple
curl -X GET "https://api.firmado.app/v1/emails/campaigns" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/campaigns", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/campaigns",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/campaigns", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/campaigns");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/campaigns
Crée un brouillon de campagne : modèle, audience et objet.
Créer/campaignsEn cas de succès : 201.Permission : Créer.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Oui | min length 1 · max length 120 |
templateId | string (uuid) | null | Non | |
subject | string | Non | max length 300 · default "" |
preheader | string | Non | max length 300 · default "" |
audience | object | Non | |
audience.listIds | array of string (uuid) | Non | max items 50 |
audience.tagIds | array of string (uuid) | Non | max items 50 |
audience.excludeListIds | array of string (uuid) | Non | max items 50 |
domainId | string (uuid) | null | Non | |
fromName | string | null | Non | |
fromLocal | string | null | Non | |
replyTo | string (email) | null | Non |
Réponse
33 champs
| Champ | Type | Toujours présent |
|---|---|---|
audience | object | Oui |
audience.excludeListIds | array of any | Oui |
audience.listIds | array of string (uuid) | Oui |
audience.tagIds | array of any | Oui |
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
domainId | null dans les exemples | Oui |
error | null dans les exemples | Oui |
finishedAt | null dans les exemples | Oui |
fromLocal | null dans les exemples | Oui |
fromName | null dans les exemples | Oui |
id | string (uuid) | Oui |
name | string | Oui |
organizationId | string (uuid) | Oui |
preheader | string | Oui |
recipients | integer | Oui |
replyTo | null dans les exemples | Oui |
scheduledAt | null dans les exemples | Oui |
startedAt | null dans les exemples | Oui |
stats | object | Oui |
stats.bounced | integer | Oui |
stats.clicked | integer | Oui |
stats.complained | integer | Oui |
stats.delivered | integer | Oui |
stats.failed | integer | Oui |
stats.opened | integer | Oui |
stats.queued | integer | Oui |
stats.sent | integer | Oui |
stats.unsubscribed | integer | Oui |
status | string | Oui |
subject | string | Oui |
templateId | string (uuid) | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/campaigns" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": ""
}'const res = await fetch("https://api.firmado.app/v1/emails/campaigns", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": ""
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/campaigns",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": "",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": ""
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": ""
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": ""
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/campaigns", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": ""
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/campaigns");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "",
"preheader": ""
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (201), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"status": "…",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…",
"domainId": null,
"fromName": null,
"fromLocal": null,
"replyTo": null,
"audience": {
"tagIds": [],
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": []
},
"scheduledAt": null,
"startedAt": null,
"finishedAt": null,
"recipients": 1,
"error": null,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"stats": {
"queued": 1,
"sent": 1,
"delivered": 1,
"opened": 1,
"clicked": 1,
"bounced": 1,
"complained": 1,
"unsubscribed": 1,
"failed": 1
}
}DELETE/v1/emails/campaigns/{id}
Supprime une campagne ; une campagne en cours d’envoi doit d’abord être annulée.
Supprimer/campaigns/{id}En cas de succès : 204.Permission : Supprimer.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Exemple
curl -X DELETE "https://api.firmado.app/v1/emails/campaigns/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/campaigns/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/emails/campaigns/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/emails/campaigns/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/emails/campaigns/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/emails/campaigns/{id}
Renvoie une campagne avec ses chiffres.
Lire/campaigns/{id}En cas de succès : 200.Permission : Lire.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Réponse
33 champs
| Champ | Type | Toujours présent |
|---|---|---|
audience | object | Oui |
audience.excludeListIds | array of any | Oui |
audience.listIds | array of string (uuid) | Oui |
audience.tagIds | array of any | Oui |
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
domainId | string (uuid) | Oui |
error | null dans les exemples | Oui |
finishedAt | string | null (date-time) | Oui |
fromLocal | string | Oui |
fromName | string | Oui |
id | string (uuid) | Oui |
name | string | Oui |
organizationId | string (uuid) | Oui |
preheader | string | Oui |
recipients | integer | Oui |
replyTo | null dans les exemples | Oui |
scheduledAt | string | null (date-time) | Oui |
startedAt | string | null (date-time) | Oui |
stats | object | Oui |
stats.bounced | integer | Oui |
stats.clicked | integer | Oui |
stats.complained | integer | Oui |
stats.delivered | integer | Oui |
stats.failed | integer | Oui |
stats.opened | integer | Oui |
stats.queued | integer | Oui |
stats.sent | integer | Oui |
stats.unsubscribed | integer | Oui |
status | string | Oui |
subject | string | Oui |
templateId | string (uuid) | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X GET "https://api.firmado.app/v1/emails/campaigns/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/campaigns/{id}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/campaigns/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/{id}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/campaigns/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/{id}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/campaigns/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"status": "…",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…",
"domainId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"fromName": "Ana Lima",
"fromLocal": "…",
"replyTo": null,
"audience": {
"tagIds": [],
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": []
},
"scheduledAt": "2026-11-21T14:00:00.000Z",
"startedAt": "2026-11-21T14:00:00.000Z",
"finishedAt": "2026-11-21T14:00:00.000Z",
"recipients": 1,
"error": null,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"stats": {
"queued": 1,
"sent": 1,
"delivered": 1,
"opened": 1,
"clicked": 1,
"bounced": 1,
"complained": 1,
"unsubscribed": 1,
"failed": 1
}
}PATCH/v1/emails/campaigns/{id}
Modifie un brouillon de campagne.
Modifier/campaigns/{id}En cas de succès : 200.Permission : Modifier.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Non | min length 1 · max length 120 |
templateId | string (uuid) | null | Non | |
subject | string | Non | max length 300 |
preheader | string | Non | max length 300 |
audience | object | Non | |
audience.listIds | array of string (uuid) | Non | max items 50 |
audience.tagIds | array of string (uuid) | Non | max items 50 |
audience.excludeListIds | array of string (uuid) | Non | max items 50 |
domainId | string (uuid) | null | Non | |
fromName | string | null | Non | |
fromLocal | string | null | Non | |
replyTo | string (email) | null | Non |
Exemple
curl -X PATCH "https://api.firmado.app/v1/emails/campaigns/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…"
}'const res = await fetch("https://api.firmado.app/v1/emails/campaigns/{id}", {
method: "PATCH",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…"
}),
})
const data = await res.json()import requests
res = requests.patch(
"https://api.firmado.app/v1/emails/campaigns/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/{id}")
req = Net::HTTP::Patch.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…"
}`)
req, _ := http.NewRequest("PATCH", "https://api.firmado.app/v1/emails/campaigns/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.firmado.app/v1/emails/campaigns/{id}");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/campaigns/{id}/cancel
Annule une campagne programmée, ou arrête une campagne en cours d’envoi.
Modifier/campaigns/{id}/cancelEn cas de succès : 200.Permission : Modifier.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/campaigns/{id}/cancel" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/campaigns/{id}/cancel", {
method: "POST",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/campaigns/{id}/cancel",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/{id}/cancel");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/{id}/cancel")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/campaigns/{id}/cancel", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/{id}/cancel"))
.header("X-Api-Key", "fmd_...")
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/campaigns/{id}/cancel");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/campaigns/{id}/duplicate
Un nouveau brouillon avec le même contenu et la même audience.
Créer/campaigns/{id}/duplicateEn cas de succès : 201.Permission : Créer.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Oui | min length 1 · max length 120 |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/campaigns/{id}/duplicate" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima"
}'const res = await fetch("https://api.firmado.app/v1/emails/campaigns/{id}/duplicate", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/campaigns/{id}/duplicate",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/{id}/duplicate");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/{id}/duplicate")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/campaigns/{id}/duplicate", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/{id}/duplicate"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/campaigns/{id}/duplicate");
request.Content = new StringContent(""""
{
"name": "Ana Lima"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/emails/campaigns/{id}/recipients
Les destinataires d’une campagne, avec ce qu’il est advenu de chaque e-mail.
Lire/campaigns/{id}/recipientsEn cas de succès : 200.Permission : Lire.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Paramètres de requête
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
page | integer | Non | min 1 · default 1 |
status | string | Non | max length 20 |
Exemple
curl -X GET "https://api.firmado.app/v1/emails/campaigns/{id}/recipients" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/campaigns/{id}/recipients", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/campaigns/{id}/recipients",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/{id}/recipients");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/{id}/recipients")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/campaigns/{id}/recipients", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/{id}/recipients"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/campaigns/{id}/recipients");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/campaigns/{id}/schedule
Programme la campagne à une heure, ou l’envoie maintenant.
Modifier/campaigns/{id}/scheduleEn cas de succès : 200.Permission : Modifier.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
at | string (date-time) | null | Non |
Réponse
33 champs
| Champ | Type | Toujours présent |
|---|---|---|
audience | object | Oui |
audience.excludeListIds | array of any | Oui |
audience.listIds | array of string (uuid) | Oui |
audience.tagIds | array of any | Oui |
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
domainId | string (uuid) | Oui |
error | null dans les exemples | Oui |
finishedAt | string (date-time) | Oui |
fromLocal | string | Oui |
fromName | string | Oui |
id | string (uuid) | Oui |
name | string | Oui |
organizationId | string (uuid) | Oui |
preheader | string | Oui |
recipients | integer | Oui |
replyTo | null dans les exemples | Oui |
scheduledAt | string (date-time) | Oui |
startedAt | string (date-time) | Oui |
stats | object | Oui |
stats.bounced | integer | Oui |
stats.clicked | integer | Oui |
stats.complained | integer | Oui |
stats.delivered | integer | Oui |
stats.failed | integer | Oui |
stats.opened | integer | Oui |
stats.queued | integer | Oui |
stats.sent | integer | Oui |
stats.unsubscribed | integer | Oui |
status | string | Oui |
subject | string | Oui |
templateId | string (uuid) | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/campaigns/{id}/schedule" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"at": "2026-11-21T14:00:00.000Z"
}'const res = await fetch("https://api.firmado.app/v1/emails/campaigns/{id}/schedule", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"at": "2026-11-21T14:00:00.000Z"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/campaigns/{id}/schedule",
headers={"X-Api-Key": "fmd_..."},
json={
"at": "2026-11-21T14:00:00.000Z",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/{id}/schedule");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"at": "2026-11-21T14:00:00.000Z"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/{id}/schedule")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"at": "2026-11-21T14:00:00.000Z"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"at": "2026-11-21T14:00:00.000Z"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/campaigns/{id}/schedule", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/{id}/schedule"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"at": "2026-11-21T14:00:00.000Z"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/campaigns/{id}/schedule");
request.Content = new StringContent(""""
{
"at": "2026-11-21T14:00:00.000Z"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"status": "…",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"subject": "…",
"preheader": "…",
"domainId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"fromName": "Ana Lima",
"fromLocal": "…",
"replyTo": null,
"audience": {
"tagIds": [],
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": []
},
"scheduledAt": "2026-11-21T14:00:00.000Z",
"startedAt": "2026-11-21T14:00:00.000Z",
"finishedAt": "2026-11-21T14:00:00.000Z",
"recipients": 1,
"error": null,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"stats": {
"queued": 1,
"sent": 1,
"delivered": 1,
"opened": 1,
"clicked": 1,
"bounced": 1,
"complained": 1,
"unsubscribed": 1,
"failed": 1
}
}POST/v1/emails/campaigns/audience
Combien de contacts une audience atteint maintenant (avec consentement, adresse non bloquée).
Lire/campaigns/audienceEn cas de succès : 200.Permission : Lire.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
listIds | array of string (uuid) | Non | max items 50 |
tagIds | array of string (uuid) | Non | max items 50 |
excludeListIds | array of string (uuid) | Non | max items 50 |
Réponse
1 champ
| Champ | Type | Toujours présent |
|---|---|---|
recipients | integer | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/campaigns/audience" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
]
}'const res = await fetch("https://api.firmado.app/v1/emails/campaigns/audience", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
]
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/campaigns/audience",
headers={"X-Api-Key": "fmd_..."},
json={
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
],
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/campaigns/audience");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/campaigns/audience")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
]
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
]
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/campaigns/audience", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/campaigns/audience"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/campaigns/audience");
request.Content = new StringContent(""""
{
"listIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"tagIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
],
"excludeListIds": [
"3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
]
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"recipients": 1
}GET/v1/emails/catalog
Recherche les prestations, produits et formules qu’un bloc catalogue peut afficher.
Lire/catalogEn cas de succès : 200.Permission : Lire.
Paramètres de requête
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
q | string | Non | max length 200 |
kind | "service" | "product" | "package" | Non |
Réponse
14 champs
| Champ | Type | Toujours présent |
|---|---|---|
data | array of object | Oui |
data[].currency | string | Oui |
data[].description | string | Oui |
data[].id | string (uuid) | Oui |
data[].image | string (uri) | Oui |
data[].itemKind | string | Oui |
data[].kind | string | Oui |
data[].name | string | Oui |
data[].prices | object | Oui |
data[].prices.BRL | object | Oui |
data[].prices.BRL.original | null dans les exemples | Oui |
data[].prices.BRL.price | integer | Oui |
data[].thumbnail | string (uri) | Oui |
data[].url | string (uri) | Oui |
Exemple
curl -X GET "https://api.firmado.app/v1/emails/catalog" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/catalog", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/catalog",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/catalog");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/catalog")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/catalog", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/catalog"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/catalog");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"data": [
{
"kind": "…",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"itemKind": "…",
"name": "Ana Lima",
"description": "…",
"image": "https://example.com",
"thumbnail": "https://example.com",
"currency": "USD",
"prices": {},
"url": "https://example.com"
}
]
}POST/v1/emails/catalog/cards
Les cartes de certains articles du catalogue telles que les e-mails les affichent.
Lire/catalog/cardsEn cas de succès : 200.Permission : Lire.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
items | array of object | Oui | max items 50 |
items[].kind | "service" | "package" | Oui | |
items[].id | string (uuid) | Oui |
Réponse
14 champs
| Champ | Type | Toujours présent |
|---|---|---|
data | array of object | Oui |
data[].currency | string | Oui |
data[].description | string | Oui |
data[].id | string (uuid) | Oui |
data[].image | null dans les exemples | Oui |
data[].itemKind | null dans les exemples | Oui |
data[].kind | string | Oui |
data[].name | string | Oui |
data[].prices | object | Oui |
data[].prices.BRL | object | Oui |
data[].prices.BRL.original | integer | Oui |
data[].prices.BRL.price | integer | Oui |
data[].thumbnail | null dans les exemples | Oui |
data[].url | null dans les exemples | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/catalog/cards" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}'const res = await fetch("https://api.firmado.app/v1/emails/catalog/cards", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/catalog/cards",
headers={"X-Api-Key": "fmd_..."},
json={
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
},
],
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/catalog/cards");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/catalog/cards")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/catalog/cards", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/catalog/cards"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/catalog/cards");
request.Content = new StringContent(""""
{
"items": [
{
"kind": "service",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"data": [
{
"kind": "…",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"itemKind": null,
"name": "Ana Lima",
"description": "…",
"image": null,
"thumbnail": null,
"currency": "USD",
"prices": {},
"url": null
}
]
}POST/v1/emails/images
Envoie une image pour les e-mails dans la bibliothèque de fichiers.
Créer/imagesEn cas de succès : 201.Permission : Créer.
Corps : un formulaire multipart, avec le fichier dans `file`
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
file | string (binary) | Oui |
Réponse
12 champs
| Champ | Type | Toujours présent |
|---|---|---|
bytes | integer | Oui |
contentType | string | Oui |
createdAt | string (date-time) | Oui |
deletable | boolean | Oui |
group | string | Oui |
id | string (uuid) | Oui |
key | string | Oui |
name | string | Oui |
owner | null dans les exemples | Oui |
updatedAt | string (date-time) | Oui |
url | string (uri) | Oui |
usedIn | array of any | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/images" \
-H "X-Api-Key: fmd_..." \
-F "file=@./file.pdf"import { openAsBlob } from "node:fs"
const form = new FormData()
form.append("file", await openAsBlob("./file.pdf"), "file.pdf")
const res = await fetch("https://api.firmado.app/v1/emails/images", {
method: "POST",
headers: { "X-Api-Key": "fmd_..." },
body: form,
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/images",
headers={"X-Api-Key": "fmd_..."},
files={"file": open("file.pdf", "rb")},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/images");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
CURLOPT_POSTFIELDS => ["file" => new CURLFile("file.pdf")],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/images")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req.set_form([["file", File.open("file.pdf")]], "multipart/form-data")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)var buf bytes.Buffer
form := multipart.NewWriter(&buf)
part, _ := form.CreateFormFile("file", "file.pdf")
f, _ := os.Open("file.pdf")
io.Copy(part, f)
form.Close()
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/images", &buf)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", form.FormDataContentType())
res, err := http.DefaultClient.Do(req)// Multipart is simplest with OkHttp (com.squareup.okhttp3:okhttp)
var body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("file", "file.pdf", RequestBody.create(new File("file.pdf"), null))
.build();
var request = new Request.Builder()
.url("https://api.firmado.app/v1/emails/images")
.header("X-Api-Key", "fmd_...")
.method("POST", body)
.build();
var response = new OkHttpClient().newCall(request).execute();using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/images");
request.Content = new MultipartFormDataContent { { new StreamContent(File.OpenRead("file.pdf")), "file", "file.pdf" } };
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (201), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"key": "…",
"name": "Ana Lima",
"group": "…",
"contentType": "…",
"bytes": 1,
"url": "https://example.com",
"deletable": true,
"owner": null,
"usedIn": [],
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}POST/v1/emails/preview
Produit le HTML et le texte d’un document d’e-mail, éventuellement avec les valeurs d’un contact.
Lire/previewEn cas de succès : 200.Permission : Lire.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
document | object | Oui | |
document.version | 1 | Non | default 1 |
document.settings | object | Non | |
document.settings.backdropColor | string | Non | default "#f4f4f5" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.contentColor | string | Non | default "#ffffff" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.width | integer | Non | min 320 · max 900 · default 600 |
document.settings.fontFamily | string | Non | max length 60 · default "Arial" |
document.settings.headingFontFamily | string | Non | max length 60 · default "Arial" |
document.settings.fontSize | integer | Non | min 0 · max 40 · default 16 |
document.settings.lineHeight | number | Non | min 0.8 · max 3 · default 1.5 |
document.settings.textColor | string | Non | default "#1f2937" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.headingColor | string | Non | default "#111827" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.linkColor | string | Non | default "#2563eb" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.primaryColor | string | Non | default "#2563eb" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.onPrimaryColor | string | Non | default "#ffffff" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.radius | integer | Non | min 0 · max 40 · default 0 |
document.settings.outerPadding | integer | Non | min 0 · max 120 · default 24 |
document.header | object | Non | |
document.header.show | boolean | Non | default true |
document.header.placement | "inside" | "outside" | Non | default "outside" |
document.header.color | string | null | Non | default null |
document.header.linkColor | string | null | Non | default null |
document.header.backgroundColor | string | null | Non | default null |
document.header.fontSize | integer | Non | min 0 · max 24 · default 12 |
document.header.padding | object | Non | |
document.header.padding.top | integer | Oui | min 0 · max 200 |
document.header.padding.right | integer | Oui | min 0 · max 200 |
document.header.padding.bottom | integer | Oui | min 0 · max 200 |
document.header.padding.left | integer | Oui | min 0 · max 200 |
document.header.presetId | string | null | Non | default null |
document.header.custom | object | null | Non | default null |
document.header.custom.text | string | Non | max length 300 · default "" |
document.header.custom.linkLabel | string | Non | max length 60 · default "" |
document.footer | object | Non | |
document.footer.placement | "inside" | "outside" | Non | default "inside" |
document.footer.color | string | null | Non | default null |
document.footer.linkColor | string | null | Non | default null |
document.footer.backgroundColor | string | null | Non | default null |
document.footer.fontSize | integer | Non | min 0 · max 24 · default 12 |
document.footer.padding | object | Non | |
document.footer.padding.top | integer | Oui | min 0 · max 200 |
document.footer.padding.right | integer | Oui | min 0 · max 200 |
document.footer.padding.bottom | integer | Oui | min 0 · max 200 |
document.footer.padding.left | integer | Oui | min 0 · max 200 |
document.footer.align | "left" | "center" | "right" | Non | default "center" |
document.footer.presetId | string | null | Non | default null |
document.footer.custom | object | null | Non | default null |
document.footer.custom.html | string | Non | max length 50000 · default "" |
document.footer.custom.unsubscribeLabel | string | Oui | min length 1 · max length 100 |
document.footer.custom.showAddress | boolean | Non | default true |
document.rows | array of object | Oui | max items 100 |
document.rows[].id | string | Oui | min length 1 · max length 40 |
document.rows[].columns | array of object | Oui | min items 1 · max items 4 |
document.rows[].columns[].id | string | Oui | min length 1 · max length 40 |
document.rows[].columns[].blocks | array of object | Oui | max items 60 |
document.rows[].columns[].backgroundColor | string | null | Non | default null |
document.rows[].columns[].padding | object | Non | |
document.rows[].columns[].radius | integer | Non | min 0 · max 100 · default 0 |
document.rows[].columns[].verticalAlign | "top" | "middle" | "bottom" | Non | default "top" |
document.rows[].widths | array of number | Oui | min items 1 · max items 4 |
document.rows[].backgroundColor | string | null | Non | default null |
document.rows[].backgroundImage | string | Non | max length 2000 · default "" |
document.rows[].fullWidth | boolean | Non | default false |
document.rows[].padding | object | Non | |
document.rows[].padding.top | integer | Oui | min 0 · max 200 |
document.rows[].padding.right | integer | Oui | min 0 · max 200 |
document.rows[].padding.bottom | integer | Oui | min 0 · max 200 |
document.rows[].padding.left | integer | Oui | min 0 · max 200 |
document.rows[].radius | integer | Non | min 0 · max 100 · default 0 |
document.rows[].borderColor | string | null | Non | default null |
document.rows[].borderWidth | integer | Non | min 0 · max 10 · default 0 |
document.rows[].stackOnMobile | boolean | Non | default true |
document.rows[].hideOn | "mobile" | "desktop" | null | Non | default null |
subject | string | Non | max length 300 · default "" |
preheader | string | Non | max length 300 · default "" |
kind | "marketing" | "transactional" | Non | default "marketing" |
contactId | string (uuid) | null | Non |
Réponse
3 champs
| Champ | Type | Toujours présent |
|---|---|---|
html | string | Oui |
subject | string | Oui |
text | string | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/preview" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
},
"subject": "",
"preheader": "",
"kind": "marketing"
}'const res = await fetch("https://api.firmado.app/v1/emails/preview", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
},
"subject": "",
"preheader": "",
"kind": "marketing"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/preview",
headers={"X-Api-Key": "fmd_..."},
json={
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…",
},
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial",
},
"header": {
"show": True,
"placement": "inside",
"color": "…",
"linkColor": "…",
},
},
"subject": "",
"preheader": "",
"kind": "marketing",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/preview");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
},
"subject": "",
"preheader": "",
"kind": "marketing"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/preview")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
},
"subject": "",
"preheader": "",
"kind": "marketing"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
},
"subject": "",
"preheader": "",
"kind": "marketing"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/preview", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/preview"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
},
"subject": "",
"preheader": "",
"kind": "marketing"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/preview");
request.Content = new StringContent(""""
{
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
},
"subject": "",
"preheader": "",
"kind": "marketing"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"html": "…",
"subject": "…",
"text": "…"
}GET/v1/emails/saved-blocks
Liste les blocs gardés pour être réutilisés dans les modèles.
Lire/saved-blocksEn cas de succès : 200.Permission : Lire.
Réponse
57 champs
| Champ | Type | Toujours présent |
|---|---|---|
data | array of object | Oui |
data[].block | object | null | Oui |
data[].block.align | string | Oui |
data[].block.backgroundColor | null dans les exemples | Oui |
data[].block.borderColor | null dans les exemples | Oui |
data[].block.borderWidth | integer | Oui |
data[].block.buttonColor | null dans les exemples | Oui |
data[].block.fontFamily | null dans les exemples | Oui |
data[].block.fontSize | integer | Oui |
data[].block.fontWeight | integer | Oui |
data[].block.fullWidth | boolean | Oui |
data[].block.hideOn | null dans les exemples | Oui |
data[].block.id | string | Oui |
data[].block.innerPadding | object | Oui |
data[].block.innerPadding.horizontal | integer | Oui |
data[].block.innerPadding.vertical | integer | Oui |
data[].block.label | string | Oui |
data[].block.padding | object | Oui |
data[].block.padding.bottom | integer | Oui |
data[].block.padding.left | integer | Oui |
data[].block.padding.right | integer | Oui |
data[].block.padding.top | integer | Oui |
data[].block.radius | integer | Oui |
data[].block.textColor | null dans les exemples | Oui |
data[].block.type | string | Oui |
data[].block.url | string (uri) | Oui |
data[].createdAt | string (date-time) | Oui |
data[].createdBy | string (uuid) | Oui |
data[].icon | string | Oui |
data[].id | string (uuid) | Oui |
data[].kind | string | Oui |
data[].name | string | Oui |
data[].row | object | null | Oui |
data[].row.backgroundColor | null dans les exemples | Oui |
data[].row.backgroundImage | string | Oui |
data[].row.borderColor | null dans les exemples | Oui |
data[].row.borderWidth | integer | Oui |
data[].row.columns | array of object | Oui |
data[].row.columns[].backgroundColor | null dans les exemples | Oui |
data[].row.columns[].blocks | array of object | Oui |
data[].row.columns[].id | string | Oui |
data[].row.columns[].padding | object | Oui |
data[].row.columns[].radius | integer | Oui |
data[].row.columns[].verticalAlign | string | Oui |
data[].row.fullWidth | boolean | Oui |
data[].row.hideOn | null dans les exemples | Oui |
data[].row.id | string | Oui |
data[].row.padding | object | Oui |
data[].row.padding.bottom | integer | Oui |
data[].row.padding.left | integer | Oui |
data[].row.padding.right | integer | Oui |
data[].row.padding.top | integer | Oui |
data[].row.radius | integer | Oui |
data[].row.stackOnMobile | boolean | Oui |
data[].row.widths | array of integer | Oui |
data[].updatedAt | string (date-time) | Oui |
limit | integer | Oui |
Exemple
curl -X GET "https://api.firmado.app/v1/emails/saved-blocks" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/saved-blocks", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/saved-blocks",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/saved-blocks");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/saved-blocks")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/saved-blocks", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/saved-blocks"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/saved-blocks");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"data": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"icon": "…",
"kind": "…",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"block": {},
"row": {}
}
],
"limit": 1
}POST/v1/emails/saved-blocks
Garde un bloc pour le réutiliser dans les modèles.
Créer/saved-blocksEn cas de succès : 201.Permission : Créer.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
kind | "block" | Non | default "block" |
name | string | Oui | min length 1 · max length 60 |
icon | "blocks" | "star" | "heart" | "megaphone" | "gift" | "tag" | "shopping-bag" | "calendar" | "image" | "mail" | "phone" | "map-pin" | "sparkles" | "zap" | "users" | "file-text" | Non | default "blocks" |
block | object | Oui | |
block.type | "heading" | Oui | |
block.id | string | Oui | min length 1 · max length 40 |
block.padding | object | Non | |
block.padding.top | integer | Oui | min 0 · max 200 |
block.padding.right | integer | Oui | min 0 · max 200 |
block.padding.bottom | integer | Oui | min 0 · max 200 |
block.padding.left | integer | Oui | min 0 · max 200 |
block.backgroundColor | string | null | Non | default null |
block.hideOn | "mobile" | "desktop" | null | Non | default null |
block.fontFamily | string | null | Non | default null |
block.fontSize | integer | null | Non | default null |
block.color | string | null | Non | default null |
block.lineHeight | number | null | Non | default null |
block.letterSpacing | number | Non | min -5 · max 20 · default 0 |
block.align | "left" | "center" | "right" | Non | default "left" |
block.html | string | Oui | max length 50000 |
block.level | 1 | 2 | 3 | Non | default 1 |
block.fontWeight | integer | Non | min 100 · max 900 · default 700 |
Réponse
81 champs
| Champ | Type | Toujours présent |
|---|---|---|
block | object | null | Oui |
block.align | string | Oui |
block.backgroundColor | null dans les exemples | Oui |
block.borderColor | null dans les exemples | Oui |
block.borderWidth | integer | Oui |
block.buttonColor | null dans les exemples | Oui |
block.fontFamily | null dans les exemples | Oui |
block.fontSize | integer | Oui |
block.fontWeight | integer | Oui |
block.fullWidth | boolean | Oui |
block.hideOn | null dans les exemples | Oui |
block.id | string | Oui |
block.innerPadding | object | Oui |
block.innerPadding.horizontal | integer | Oui |
block.innerPadding.vertical | integer | Oui |
block.label | string | Oui |
block.padding | object | Oui |
block.padding.bottom | integer | Oui |
block.padding.left | integer | Oui |
block.padding.right | integer | Oui |
block.padding.top | integer | Oui |
block.radius | integer | Oui |
block.textColor | null dans les exemples | Oui |
block.type | string | Oui |
block.url | string (uri) | Oui |
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
icon | string | Oui |
id | string (uuid) | Oui |
kind | string | Oui |
name | string | Oui |
row | object | null | Oui |
row.backgroundColor | null dans les exemples | Oui |
row.backgroundImage | string | Oui |
row.borderColor | null dans les exemples | Oui |
row.borderWidth | integer | Oui |
row.columns | array of object | Oui |
row.columns[].backgroundColor | null dans les exemples | Oui |
row.columns[].blocks | array of object | Oui |
row.columns[].blocks[].align | string | Oui |
row.columns[].blocks[].backgroundColor | null dans les exemples | Oui |
row.columns[].blocks[].borderColor | null dans les exemples | Non |
row.columns[].blocks[].borderWidth | integer | Non |
row.columns[].blocks[].buttonColor | null dans les exemples | Non |
row.columns[].blocks[].color | null dans les exemples | Non |
row.columns[].blocks[].fontFamily | null dans les exemples | Oui |
row.columns[].blocks[].fontSize | integer | null | Oui |
row.columns[].blocks[].fontWeight | integer | Non |
row.columns[].blocks[].fullWidth | boolean | Non |
row.columns[].blocks[].hideOn | null dans les exemples | Oui |
row.columns[].blocks[].html | string | Non |
row.columns[].blocks[].id | string | Oui |
row.columns[].blocks[].innerPadding | object | Non |
row.columns[].blocks[].label | string | Non |
row.columns[].blocks[].letterSpacing | integer | Non |
row.columns[].blocks[].lineHeight | null dans les exemples | Non |
row.columns[].blocks[].padding | object | Oui |
row.columns[].blocks[].radius | integer | Non |
row.columns[].blocks[].textColor | null dans les exemples | Non |
row.columns[].blocks[].type | string | Oui |
row.columns[].blocks[].url | string (uri) | Non |
row.columns[].id | string | Oui |
row.columns[].padding | object | Oui |
row.columns[].padding.bottom | integer | Oui |
row.columns[].padding.left | integer | Oui |
row.columns[].padding.right | integer | Oui |
row.columns[].padding.top | integer | Oui |
row.columns[].radius | integer | Oui |
row.columns[].verticalAlign | string | Oui |
row.fullWidth | boolean | Oui |
row.hideOn | null dans les exemples | Oui |
row.id | string | Oui |
row.padding | object | Oui |
row.padding.bottom | integer | Oui |
row.padding.left | integer | Oui |
row.padding.right | integer | Oui |
row.padding.top | integer | Oui |
row.radius | integer | Oui |
row.stackOnMobile | boolean | Oui |
row.widths | array of integer | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/saved-blocks" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"kind": "block",
"icon": "blocks"
}'const res = await fetch("https://api.firmado.app/v1/emails/saved-blocks", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"kind": "block",
"icon": "blocks"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/saved-blocks",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0,
},
},
"kind": "block",
"icon": "blocks",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/saved-blocks");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"kind": "block",
"icon": "blocks"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/saved-blocks")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"kind": "block",
"icon": "blocks"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"kind": "block",
"icon": "blocks"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/saved-blocks", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/saved-blocks"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"kind": "block",
"icon": "blocks"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/saved-blocks");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"block": {
"type": "heading",
"id": "…",
"html": "…",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"kind": "block",
"icon": "blocks"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (201), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"icon": "…",
"kind": "…",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"block": {
"id": "…",
"url": "https://example.com",
"type": "…",
"align": "…",
"label": "…",
"hideOn": null,
"radius": 1,
"padding": {
"top": 1,
"left": 1,
"right": 1,
"bottom": 1
},
"fontSize": 1,
"fullWidth": true,
"textColor": null,
"fontFamily": null,
"fontWeight": 1,
"borderColor": null,
"borderWidth": 1,
"buttonColor": null,
"innerPadding": {
"vertical": 1,
"horizontal": 1
},
"backgroundColor": null
},
"row": {
"id": "…",
"hideOn": null,
"radius": 1,
"widths": [
1
],
"columns": [
{}
],
"padding": {
"top": 1,
"left": 1,
"right": 1,
"bottom": 1
},
"fullWidth": true,
"borderColor": null,
"borderWidth": 1,
"stackOnMobile": true,
"backgroundColor": null,
"backgroundImage": "…"
}
}DELETE/v1/emails/saved-blocks/{id}
Supprime un bloc gardé ; les modèles qui l’utilisaient gardent leur copie.
Supprimer/saved-blocks/{id}En cas de succès : 204.Permission : Supprimer.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Exemple
curl -X DELETE "https://api.firmado.app/v1/emails/saved-blocks/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/saved-blocks/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/emails/saved-blocks/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/saved-blocks/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/saved-blocks/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/emails/saved-blocks/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/saved-blocks/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/emails/saved-blocks/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();PATCH/v1/emails/saved-blocks/{id}
Renomme un bloc gardé ou change son icône.
Modifier/saved-blocks/{id}En cas de succès : 200.Permission : Modifier.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Non | min length 1 · max length 60 |
icon | "blocks" | "star" | "heart" | "megaphone" | "gift" | "tag" | "shopping-bag" | "calendar" | "image" | "mail" | "phone" | "map-pin" | "sparkles" | "zap" | "users" | "file-text" | Non |
Réponse
33 champs
| Champ | Type | Toujours présent |
|---|---|---|
block | object | Oui |
block.align | string | Oui |
block.backgroundColor | null dans les exemples | Oui |
block.borderColor | null dans les exemples | Oui |
block.borderWidth | integer | Oui |
block.buttonColor | null dans les exemples | Oui |
block.fontFamily | null dans les exemples | Oui |
block.fontSize | integer | Oui |
block.fontWeight | integer | Oui |
block.fullWidth | boolean | Oui |
block.hideOn | null dans les exemples | Oui |
block.id | string | Oui |
block.innerPadding | object | Oui |
block.innerPadding.horizontal | integer | Oui |
block.innerPadding.vertical | integer | Oui |
block.label | string | Oui |
block.padding | object | Oui |
block.padding.bottom | integer | Oui |
block.padding.left | integer | Oui |
block.padding.right | integer | Oui |
block.padding.top | integer | Oui |
block.radius | integer | Oui |
block.textColor | null dans les exemples | Oui |
block.type | string | Oui |
block.url | string (uri) | Oui |
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
icon | string | Oui |
id | string (uuid) | Oui |
kind | string | Oui |
name | string | Oui |
row | null dans les exemples | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X PATCH "https://api.firmado.app/v1/emails/saved-blocks/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"icon": "blocks"
}'const res = await fetch("https://api.firmado.app/v1/emails/saved-blocks/{id}", {
method: "PATCH",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"icon": "blocks"
}),
})
const data = await res.json()import requests
res = requests.patch(
"https://api.firmado.app/v1/emails/saved-blocks/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"icon": "blocks",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/saved-blocks/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"icon": "blocks"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/saved-blocks/{id}")
req = Net::HTTP::Patch.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"icon": "blocks"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"icon": "blocks"
}`)
req, _ := http.NewRequest("PATCH", "https://api.firmado.app/v1/emails/saved-blocks/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/saved-blocks/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"icon": "blocks"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.firmado.app/v1/emails/saved-blocks/{id}");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"icon": "blocks"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"icon": "…",
"kind": "…",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z",
"block": {
"id": "…",
"url": "https://example.com",
"type": "…",
"align": "…",
"label": "…",
"hideOn": null,
"radius": 1,
"padding": {
"top": 1,
"left": 1,
"right": 1,
"bottom": 1
},
"fontSize": 1,
"fullWidth": true,
"textColor": null,
"fontFamily": null,
"fontWeight": 1,
"borderColor": null,
"borderWidth": 1,
"buttonColor": null,
"innerPadding": {
"vertical": 1,
"horizontal": 1
},
"backgroundColor": null
},
"row": null
}POST/v1/emails/send
Envoie un modèle à un contact ou à une adresse (transactionnel, sauf indication contraire).
Créer/sendEn cas de succès : 201.Permission : Créer.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
templateId | string (uuid) | Oui | |
contactId | string (uuid) | Non | |
to | string (email) | Non | |
kind | "transactional" | "marketing" | Non | default "transactional" |
data | object of string | number | boolean | null | Non | |
subject | string | Non | max length 300 |
domainId | string (uuid) | null | Non | |
fromName | string | null | Non | |
fromLocal | string | null | Non | |
replyTo | string (email) | null | Non | |
sendAt | string (date-time) | Non |
Réponse
22 champs
| Champ | Type | Toujours présent |
|---|---|---|
automationId | null dans les exemples | Oui |
bouncedAt | null dans les exemples | Oui |
campaignId | null dans les exemples | Oui |
clickedAt | null dans les exemples | Oui |
clicks | integer | Oui |
complainedAt | null dans les exemples | Oui |
contactId | string (uuid) | Oui |
createdAt | string (date-time) | Oui |
deliveredAt | null dans les exemples | Oui |
email | string (email) | Oui |
error | string | null | Oui |
id | string (uuid) | Oui |
kind | string | Oui |
openedAt | null dans les exemples | Oui |
opens | integer | Oui |
sendAfter | string (date-time) | Oui |
sentAt | string | null (date-time) | Oui |
source | string | Oui |
status | string | Oui |
subject | string | null | Oui |
templateId | string (uuid) | Oui |
unsubscribedAt | null dans les exemples | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/send" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional"
}'const res = await fetch("https://api.firmado.app/v1/emails/send", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/send",
headers={"X-Api-Key": "fmd_..."},
json={
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/send");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/send")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/send", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/send"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/send");
request.Content = new StringContent(""""
{
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"to": "[email protected]",
"kind": "transactional"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (201), avec des valeurs d’exemple :
{
"automationId": null,
"bouncedAt": null,
"campaignId": null,
"clickedAt": null,
"clicks": 1,
"complainedAt": null,
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"deliveredAt": null,
"email": "[email protected]",
"error": "…",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"kind": "…",
"openedAt": null,
"opens": 1,
"sendAfter": "2026-11-21T14:00:00.000Z",
"sentAt": "2026-11-21T14:00:00.000Z",
"source": "…",
"status": "…",
"subject": "…",
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"unsubscribedAt": null
}GET/v1/emails/sends
Liste les e-mails envoyés, avec leur statut, ouvertures et clics.
Lire/sendsEn cas de succès : 200.Permission : Lire.
Paramètres de requête
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
page | integer | Non | min 1 · default 1 |
contactId | string (uuid) | Non | |
source | "campaign" | "automation" | "api" | "manual" | "test" | Non |
Exemple
curl -X GET "https://api.firmado.app/v1/emails/sends" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/sends", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/sends",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/sends");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/sends")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/sends", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/sends"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/sends");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/emails/sends/{id}
Renvoie un e-mail envoyé, avec ce qu’il en est advenu.
Lire/sends/{id}En cas de succès : 200.Permission : Lire.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Exemple
curl -X GET "https://api.firmado.app/v1/emails/sends/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/sends/{id}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/sends/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/sends/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/sends/{id}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/sends/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/sends/{id}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/sends/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/emails/templates
Liste les modèles d’e-mail.
Lire/templatesEn cas de succès : 200.Permission : Lire.
Exemple
curl -X GET "https://api.firmado.app/v1/emails/templates" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/templates", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/templates",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/templates");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/templates")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/templates", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/templates"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/templates");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/templates
Crée un modèle d’e-mail.
Créer/templatesEn cas de succès : 201.Permission : Créer.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Oui | min length 1 · max length 120 |
subject | string | Non | max length 300 · default "" |
preheader | string | Non | max length 300 · default "" |
document | object | Non | |
document.version | 1 | Non | default 1 |
document.settings | object | Non | |
document.settings.backdropColor | string | Non | default "#f4f4f5" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.contentColor | string | Non | default "#ffffff" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.width | integer | Non | min 320 · max 900 · default 600 |
document.settings.fontFamily | string | Non | max length 60 · default "Arial" |
document.settings.headingFontFamily | string | Non | max length 60 · default "Arial" |
document.settings.fontSize | integer | Non | min 0 · max 40 · default 16 |
document.settings.lineHeight | number | Non | min 0.8 · max 3 · default 1.5 |
document.settings.textColor | string | Non | default "#1f2937" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.headingColor | string | Non | default "#111827" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.linkColor | string | Non | default "#2563eb" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.primaryColor | string | Non | default "#2563eb" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.onPrimaryColor | string | Non | default "#ffffff" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.radius | integer | Non | min 0 · max 40 · default 0 |
document.settings.outerPadding | integer | Non | min 0 · max 120 · default 24 |
document.header | object | Non | |
document.header.show | boolean | Non | default true |
document.header.placement | "inside" | "outside" | Non | default "outside" |
document.header.color | string | null | Non | default null |
document.header.linkColor | string | null | Non | default null |
document.header.backgroundColor | string | null | Non | default null |
document.header.fontSize | integer | Non | min 0 · max 24 · default 12 |
document.header.padding | object | Non | |
document.header.padding.top | integer | Oui | min 0 · max 200 |
document.header.padding.right | integer | Oui | min 0 · max 200 |
document.header.padding.bottom | integer | Oui | min 0 · max 200 |
document.header.padding.left | integer | Oui | min 0 · max 200 |
document.header.presetId | string | null | Non | default null |
document.header.custom | object | null | Non | default null |
document.header.custom.text | string | Non | max length 300 · default "" |
document.header.custom.linkLabel | string | Non | max length 60 · default "" |
document.footer | object | Non | |
document.footer.placement | "inside" | "outside" | Non | default "inside" |
document.footer.color | string | null | Non | default null |
document.footer.linkColor | string | null | Non | default null |
document.footer.backgroundColor | string | null | Non | default null |
document.footer.fontSize | integer | Non | min 0 · max 24 · default 12 |
document.footer.padding | object | Non | |
document.footer.padding.top | integer | Oui | min 0 · max 200 |
document.footer.padding.right | integer | Oui | min 0 · max 200 |
document.footer.padding.bottom | integer | Oui | min 0 · max 200 |
document.footer.padding.left | integer | Oui | min 0 · max 200 |
document.footer.align | "left" | "center" | "right" | Non | default "center" |
document.footer.presetId | string | null | Non | default null |
document.footer.custom | object | null | Non | default null |
document.footer.custom.html | string | Non | max length 50000 · default "" |
document.footer.custom.unsubscribeLabel | string | Oui | min length 1 · max length 100 |
document.footer.custom.showAddress | boolean | Non | default true |
document.rows | array of object | Oui | max items 100 |
document.rows[].id | string | Oui | min length 1 · max length 40 |
document.rows[].columns | array of object | Oui | min items 1 · max items 4 |
document.rows[].columns[].id | string | Oui | min length 1 · max length 40 |
document.rows[].columns[].blocks | array of object | Oui | max items 60 |
document.rows[].columns[].backgroundColor | string | null | Non | default null |
document.rows[].columns[].padding | object | Non | |
document.rows[].columns[].radius | integer | Non | min 0 · max 100 · default 0 |
document.rows[].columns[].verticalAlign | "top" | "middle" | "bottom" | Non | default "top" |
document.rows[].widths | array of number | Oui | min items 1 · max items 4 |
document.rows[].backgroundColor | string | null | Non | default null |
document.rows[].backgroundImage | string | Non | max length 2000 · default "" |
document.rows[].fullWidth | boolean | Non | default false |
document.rows[].padding | object | Non | |
document.rows[].padding.top | integer | Oui | min 0 · max 200 |
document.rows[].padding.right | integer | Oui | min 0 · max 200 |
document.rows[].padding.bottom | integer | Oui | min 0 · max 200 |
document.rows[].padding.left | integer | Oui | min 0 · max 200 |
document.rows[].radius | integer | Non | min 0 · max 100 · default 0 |
document.rows[].borderColor | string | null | Non | default null |
document.rows[].borderWidth | integer | Non | min 0 · max 10 · default 0 |
document.rows[].stackOnMobile | boolean | Non | default true |
document.rows[].hideOn | "mobile" | "desktop" | null | Non | default null |
Réponse
79 champs
| Champ | Type | Toujours présent |
|---|---|---|
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
document | object | Oui |
document.footer | object | Oui |
document.footer.align | string | Oui |
document.footer.backgroundColor | null dans les exemples | Oui |
document.footer.color | string | null | Oui |
document.footer.custom | object | null | Oui |
document.footer.custom.html | string | Oui |
document.footer.custom.showAddress | boolean | Oui |
document.footer.custom.unsubscribeLabel | string | Oui |
document.footer.fontSize | integer | Oui |
document.footer.linkColor | null dans les exemples | Oui |
document.footer.padding | object | Oui |
document.footer.padding.bottom | integer | Oui |
document.footer.padding.left | integer | Oui |
document.footer.padding.right | integer | Oui |
document.footer.padding.top | integer | Oui |
document.footer.placement | string | Oui |
document.footer.presetId | null dans les exemples | Oui |
document.header | object | Oui |
document.header.backgroundColor | null dans les exemples | Oui |
document.header.color | null dans les exemples | Oui |
document.header.custom | null dans les exemples | Oui |
document.header.fontSize | integer | Oui |
document.header.linkColor | null dans les exemples | Oui |
document.header.padding | object | Oui |
document.header.padding.bottom | integer | Oui |
document.header.padding.left | integer | Oui |
document.header.padding.right | integer | Oui |
document.header.padding.top | integer | Oui |
document.header.placement | string | Oui |
document.header.presetId | null dans les exemples | Oui |
document.header.show | boolean | Oui |
document.rows | array of object | Oui |
document.rows[].backgroundColor | null dans les exemples | Oui |
document.rows[].backgroundImage | string | Oui |
document.rows[].borderColor | null dans les exemples | Oui |
document.rows[].borderWidth | integer | Oui |
document.rows[].columns | array of object | Oui |
document.rows[].columns[].backgroundColor | null dans les exemples | Oui |
document.rows[].columns[].blocks | array of object | Oui |
document.rows[].columns[].id | string | Oui |
document.rows[].columns[].padding | object | Oui |
document.rows[].columns[].radius | integer | Oui |
document.rows[].columns[].verticalAlign | string | Oui |
document.rows[].fullWidth | boolean | Oui |
document.rows[].hideOn | null dans les exemples | Oui |
document.rows[].id | string | Oui |
document.rows[].padding | object | Oui |
document.rows[].padding.bottom | integer | Oui |
document.rows[].padding.left | integer | Oui |
document.rows[].padding.right | integer | Oui |
document.rows[].padding.top | integer | Oui |
document.rows[].radius | integer | Oui |
document.rows[].stackOnMobile | boolean | Oui |
document.rows[].widths | array of integer | Oui |
document.settings | object | Oui |
document.settings.backdropColor | string | Oui |
document.settings.contentColor | string | Oui |
document.settings.fontFamily | string | Oui |
document.settings.fontSize | integer | Oui |
document.settings.headingColor | string | Oui |
document.settings.headingFontFamily | string | Oui |
document.settings.lineHeight | number | Oui |
document.settings.linkColor | string | Oui |
document.settings.onPrimaryColor | string | Oui |
document.settings.outerPadding | integer | Oui |
document.settings.primaryColor | string | Oui |
document.settings.radius | integer | Oui |
document.settings.textColor | string | Oui |
document.settings.width | integer | Oui |
document.version | integer | Oui |
id | string (uuid) | Oui |
name | string | Oui |
organizationId | string (uuid) | Oui |
preheader | string | Oui |
subject | string | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/templates" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}'const res = await fetch("https://api.firmado.app/v1/emails/templates", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/templates",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…",
},
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial",
},
"header": {
"show": True,
"placement": "inside",
"color": "…",
"linkColor": "…",
},
},
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/templates");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/templates")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/templates", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/templates"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/templates");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"subject": "",
"preheader": "",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (201), avec des valeurs d’exemple :
{
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"document": {
"footer": {
"align": "…",
"backgroundColor": null,
"color": "…",
"custom": {},
"fontSize": 1,
"linkColor": null,
"padding": {},
"placement": "…",
"presetId": null
},
"header": {
"backgroundColor": null,
"color": null,
"custom": null,
"fontSize": 1,
"linkColor": null,
"padding": {},
"placement": "…",
"presetId": null,
"show": true
},
"rows": [
{}
],
"settings": {
"backdropColor": "…",
"contentColor": "…",
"fontFamily": "…",
"fontSize": 1,
"headingColor": "…",
"headingFontFamily": "…",
"lineHeight": 1,
"linkColor": "…",
"onPrimaryColor": "…",
"outerPadding": 1,
"primaryColor": "…",
"radius": 1,
"textColor": "…",
"width": 1
},
"version": 1
},
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"preheader": "…",
"subject": "…",
"updatedAt": "2026-11-21T14:00:00.000Z"
}DELETE/v1/emails/templates/{id}
Supprime un modèle d’e-mail.
Supprimer/templates/{id}En cas de succès : 204.Permission : Supprimer.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Exemple
curl -X DELETE "https://api.firmado.app/v1/emails/templates/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/templates/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/emails/templates/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/templates/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/templates/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/emails/templates/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/templates/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/emails/templates/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/emails/templates/{id}
Renvoie un modèle d’e-mail avec son document.
Lire/templates/{id}En cas de succès : 200.Permission : Lire.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Réponse
15 champs
| Champ | Type | Toujours présent |
|---|---|---|
createdAt | string (date-time) | Oui |
createdBy | string (uuid) | Oui |
document | object | Oui |
document.rows | array of object | Oui |
document.rows[].columns | array of object | Oui |
document.rows[].columns[].blocks | array of object | Oui |
document.rows[].columns[].id | string | Oui |
document.rows[].id | string | Oui |
document.rows[].widths | array of integer | Oui |
id | string (uuid) | Oui |
name | string | Oui |
organizationId | string (uuid) | Oui |
preheader | string | Oui |
subject | string | Oui |
updatedAt | string (date-time) | Oui |
Exemple
curl -X GET "https://api.firmado.app/v1/emails/templates/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/templates/{id}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/templates/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/templates/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/templates/{id}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/templates/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/templates/{id}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/templates/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{}
]
},
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}PATCH/v1/emails/templates/{id}
Modifie un modèle d’e-mail.
Modifier/templates/{id}En cas de succès : 200.Permission : Modifier.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Non | min length 1 · max length 120 |
subject | string | Non | max length 300 |
preheader | string | Non | max length 300 |
document | object | Non | |
document.version | 1 | Non | default 1 |
document.settings | object | Non | |
document.settings.backdropColor | string | Non | default "#f4f4f5" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.contentColor | string | Non | default "#ffffff" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.width | integer | Non | min 320 · max 900 · default 600 |
document.settings.fontFamily | string | Non | max length 60 · default "Arial" |
document.settings.headingFontFamily | string | Non | max length 60 · default "Arial" |
document.settings.fontSize | integer | Non | min 0 · max 40 · default 16 |
document.settings.lineHeight | number | Non | min 0.8 · max 3 · default 1.5 |
document.settings.textColor | string | Non | default "#1f2937" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.headingColor | string | Non | default "#111827" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.linkColor | string | Non | default "#2563eb" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.primaryColor | string | Non | default "#2563eb" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.onPrimaryColor | string | Non | default "#ffffff" · pattern ^#[0-9a-fA-F]{6}$ |
document.settings.radius | integer | Non | min 0 · max 40 · default 0 |
document.settings.outerPadding | integer | Non | min 0 · max 120 · default 24 |
document.header | object | Non | |
document.header.show | boolean | Non | default true |
document.header.placement | "inside" | "outside" | Non | default "outside" |
document.header.color | string | null | Non | default null |
document.header.linkColor | string | null | Non | default null |
document.header.backgroundColor | string | null | Non | default null |
document.header.fontSize | integer | Non | min 0 · max 24 · default 12 |
document.header.padding | object | Non | |
document.header.padding.top | integer | Oui | min 0 · max 200 |
document.header.padding.right | integer | Oui | min 0 · max 200 |
document.header.padding.bottom | integer | Oui | min 0 · max 200 |
document.header.padding.left | integer | Oui | min 0 · max 200 |
document.header.presetId | string | null | Non | default null |
document.header.custom | object | null | Non | default null |
document.header.custom.text | string | Non | max length 300 · default "" |
document.header.custom.linkLabel | string | Non | max length 60 · default "" |
document.footer | object | Non | |
document.footer.placement | "inside" | "outside" | Non | default "inside" |
document.footer.color | string | null | Non | default null |
document.footer.linkColor | string | null | Non | default null |
document.footer.backgroundColor | string | null | Non | default null |
document.footer.fontSize | integer | Non | min 0 · max 24 · default 12 |
document.footer.padding | object | Non | |
document.footer.padding.top | integer | Oui | min 0 · max 200 |
document.footer.padding.right | integer | Oui | min 0 · max 200 |
document.footer.padding.bottom | integer | Oui | min 0 · max 200 |
document.footer.padding.left | integer | Oui | min 0 · max 200 |
document.footer.align | "left" | "center" | "right" | Non | default "center" |
document.footer.presetId | string | null | Non | default null |
document.footer.custom | object | null | Non | default null |
document.footer.custom.html | string | Non | max length 50000 · default "" |
document.footer.custom.unsubscribeLabel | string | Oui | min length 1 · max length 100 |
document.footer.custom.showAddress | boolean | Non | default true |
document.rows | array of object | Oui | max items 100 |
document.rows[].id | string | Oui | min length 1 · max length 40 |
document.rows[].columns | array of object | Oui | min items 1 · max items 4 |
document.rows[].columns[].id | string | Oui | min length 1 · max length 40 |
document.rows[].columns[].blocks | array of object | Oui | max items 60 |
document.rows[].columns[].backgroundColor | string | null | Non | default null |
document.rows[].columns[].padding | object | Non | |
document.rows[].columns[].radius | integer | Non | min 0 · max 100 · default 0 |
document.rows[].columns[].verticalAlign | "top" | "middle" | "bottom" | Non | default "top" |
document.rows[].widths | array of number | Oui | min items 1 · max items 4 |
document.rows[].backgroundColor | string | null | Non | default null |
document.rows[].backgroundImage | string | Non | max length 2000 · default "" |
document.rows[].fullWidth | boolean | Non | default false |
document.rows[].padding | object | Non | |
document.rows[].padding.top | integer | Oui | min 0 · max 200 |
document.rows[].padding.right | integer | Oui | min 0 · max 200 |
document.rows[].padding.bottom | integer | Oui | min 0 · max 200 |
document.rows[].padding.left | integer | Oui | min 0 · max 200 |
document.rows[].radius | integer | Non | min 0 · max 100 · default 0 |
document.rows[].borderColor | string | null | Non | default null |
document.rows[].borderWidth | integer | Non | min 0 · max 10 · default 0 |
document.rows[].stackOnMobile | boolean | Non | default true |
document.rows[].hideOn | "mobile" | "desktop" | null | Non | default null |
Exemple
curl -X PATCH "https://api.firmado.app/v1/emails/templates/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}'const res = await fetch("https://api.firmado.app/v1/emails/templates/{id}", {
method: "PATCH",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}),
})
const data = await res.json()import requests
res = requests.patch(
"https://api.firmado.app/v1/emails/templates/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…",
},
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial",
},
"header": {
"show": True,
"placement": "inside",
"color": "…",
"linkColor": "…",
},
},
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/templates/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/templates/{id}")
req = Net::HTTP::Patch.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}`)
req, _ := http.NewRequest("PATCH", "https://api.firmado.app/v1/emails/templates/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/templates/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PATCH"), "https://api.firmado.app/v1/emails/templates/{id}");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"subject": "…",
"preheader": "…",
"document": {
"rows": [
{
"id": "…",
"columns": [],
"widths": [],
"backgroundColor": "…"
}
],
"version": 1,
"settings": {
"backdropColor": "#f4f4f5",
"contentColor": "#ffffff",
"width": 600,
"fontFamily": "Arial"
},
"header": {
"show": true,
"placement": "inside",
"color": "…",
"linkColor": "…"
}
}
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/templates/{id}/duplicate
Copie un modèle d’e-mail.
Créer/templates/{id}/duplicateEn cas de succès : 201.Permission : Créer.
Paramètres de chemin
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
id | string | Oui |
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
name | string | Oui | min length 1 · max length 120 |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/templates/{id}/duplicate" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima"
}'const res = await fetch("https://api.firmado.app/v1/emails/templates/{id}/duplicate", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/templates/{id}/duplicate",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/templates/{id}/duplicate");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/templates/{id}/duplicate")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/templates/{id}/duplicate", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/templates/{id}/duplicate"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/templates/{id}/duplicate");
request.Content = new StringContent(""""
{
"name": "Ana Lima"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/emails/test
Envoie un test d’un modèle ou d’une campagne aux adresses des membres.
Créer/testEn cas de succès : 200.Permission : Créer.
Corps
| Champ | Type | Obligatoire | Notes |
|---|---|---|---|
templateId | string (uuid) | Non | |
campaignId | string (uuid) | Non | |
emails | array of string (email) | Oui | min items 1 · max items 5 |
contactId | string (uuid) | null | Non | |
kind | "marketing" | "transactional" | Non | default "marketing" |
Réponse
5 champs
| Champ | Type | Toujours présent |
|---|---|---|
data | array of object | Oui |
data[].email | string (email) | Oui |
data[].error | null dans les exemples | Oui |
data[].id | string (uuid) | Oui |
data[].status | string | Oui |
Exemple
curl -X POST "https://api.firmado.app/v1/emails/test" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"emails": [
"[email protected]"
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}'const res = await fetch("https://api.firmado.app/v1/emails/test", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"emails": [
"[email protected]"
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/emails/test",
headers={"X-Api-Key": "fmd_..."},
json={
"emails": [
"[email protected]",
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/test");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"emails": [
"[email protected]"
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/test")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"emails": [
"[email protected]"
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"emails": [
"[email protected]"
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/emails/test", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/test"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"emails": [
"[email protected]"
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/emails/test");
request.Content = new StringContent(""""
{
"emails": [
"[email protected]"
],
"templateId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"campaignId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Réponse (200), avec des valeurs d’exemple :
{
"data": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"status": "…",
"error": null
}
]
}GET/v1/emails/theme
Le thème de l’organisation, pour les e-mails qui le suivent.
Lire/themeEn cas de succès : 200.Permission : Lire.
Exemple
curl -X GET "https://api.firmado.app/v1/emails/theme" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/theme", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/theme",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/theme");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/theme")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/theme", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/theme"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/theme");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/emails/variables
Les variables {{...}} qu’un e-mail peut afficher : contact, entreprise et organisation.
Lire/variablesEn cas de succès : 200.Permission : Lire.
Exemple
curl -X GET "https://api.firmado.app/v1/emails/variables" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/emails/variables", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/emails/variables",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/emails/variables");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/emails/variables")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/emails/variables", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/emails/variables"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/emails/variables");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Événements de webhook
Les changements de cette fonctionnalité que les webhooks peuvent envoyer.
email_template.createdCréeremail_template.updatedModifieremail_template.deletedSupprimeremail_campaign.createdCréeremail_campaign.updatedModifieremail_campaign.sentModifieremail_campaign.deletedSupprimeremail_automation.createdCréeremail_automation.updatedModifieremail_automation.deletedSupprimeremail.deliveredModifieremail.bouncedModifieremail.complainedModifieremail.openedModifieremail.clickedModifieremail.unsubscribedModifier