Signup Forms
Create and manage public signup forms for contact lists
6 endpoints
Endpoints
| Method | Path | Description |
| GET | /v1/signup-forms | GET /v1/signup-forms |
| POST | /v1/signup-forms | POST /v1/signup-forms |
| GET | /v1/signup-forms/{id} | GET /v1/signup-forms/{id} |
| PUT | /v1/signup-forms/{id} | PUT /v1/signup-forms/{id} |
| DELETE | /v1/signup-forms/{id} | DELETE /v1/signup-forms/{id} |
| POST | /v1/signup-forms/{id}/toggle | POST /v1/signup-forms/{id}/toggle |
GET /v1/signup-forms
Responses
| Status | Description |
| 200 | List of signup forms |
| 401 | Unauthorized |
Example
curl -X GET https://api.euromail.dev/v1/signup-forms \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.listSignupForms();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.list_signup_forms()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.list_signup_forms().await?;
client := euromail.NewClient("em_live_...")
result, err := client.ListSignupForms(ctx)
POST /v1/signup-forms
POST /v1/signup-forms
Request Body
| Field | Type | Required | Description |
custom_fields | any | No | Custom fields rendered on the form. |
description | `string | null` | No |
from_address | `string | null` | No |
| Must use a verified domain. Defaults to noreply@. | | | |
list_id | string | Yes | Contact list ID to attach this form to. |
messages | any | No | Customizable UI messages for localization. |
redirect_url | `string | null` | No |
success_message | `string | null` | No |
theme | any | No | Theme customization: bg_color, text_color, button_color, button_text_color, |
| border_color, accent_color, border_radius, font_family, embed, hide_branding. | | | |
title | string | Yes | Form title displayed to subscribers. |
Responses
| Status | Description |
| 201 | Signup form created |
| 401 | Unauthorized |
| 404 | Contact list not found |
| 409 | A signup form already exists for this list |
| 422 | Validation error |
Example
curl -X POST https://api.euromail.dev/v1/signup-forms \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "list_id": "...", "title": "..." }'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.createSignupForm({
list_id: "...",
title: "...",
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.create_signup_form(
list_id="...",
title="...",
)
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.create_signup_form(&CreateSignupFormParams {
list_id: "...".into(),
title: "...".into(),
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.CreateSignupForm(ctx, euromail.CreateSignupFormParams{
ListId: "...",
Title: "...",
})
GET /v1/signup-forms/{id}
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Signup form ID |
Responses
| Status | Description |
| 200 | Signup form details |
| 401 | Unauthorized |
| 404 | Signup form not found |
Example
curl -X GET https://api.euromail.dev/v1/signup-forms/{id} \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getSignupForm("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_signup_form("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_signup_form("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetSignupForm(ctx, "id_...")
PUT /v1/signup-forms/{id}
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Signup form ID |
Request Body
| Field | Type | Required | Description |
custom_fields | any | No | Custom fields rendered on the form. |
description | `string | null` | No |
from_address | `string | null` | No |
messages | any | No | Customizable UI messages for localization. |
redirect_url | `string | null` | No |
success_message | `string | null` | No |
theme | any | No | Theme customization: bg_color, text_color, button_color, button_text_color, |
| border_color, accent_color, border_radius, font_family, embed, hide_branding. | | | |
title | string | Yes | Form title displayed to subscribers. |
Responses
| Status | Description |
| 200 | Signup form updated |
| 401 | Unauthorized |
| 404 | Signup form not found |
| 422 | Validation error |
Example
curl -X PUT https://api.euromail.dev/v1/signup-forms/{id} \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "title": "..." }'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.updateSignupForm({
title: "...",
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.update_signup_form(
title="...",
)
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.update_signup_form(&UpdateSignupFormParams {
title: "...".into(),
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.UpdateSignupForm(ctx, euromail.UpdateSignupFormParams{
Title: "...",
})
DELETE /v1/signup-forms/{id}
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Signup form ID |
Responses
| Status | Description |
| 204 | Signup form deleted |
| 401 | Unauthorized |
| 404 | Signup form not found |
Example
curl -X DELETE https://api.euromail.dev/v1/signup-forms/{id} \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.deleteSignupForm("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.delete_signup_form("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.delete_signup_form("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.DeleteSignupForm(ctx, "id_...")
POST /v1/signup-forms/{id}/toggle
POST /v1/signup-forms/{id}/toggle
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Signup form ID |
Responses
| Status | Description |
| 200 | Signup form toggled |
| 401 | Unauthorized |
| 404 | Signup form not found |
Example
curl -X POST https://api.euromail.dev/v1/signup-forms/{id}/toggle \
-H "X-EuroMail-Api-Key: em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getSignupFormDetail("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_signup_form_detail("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_signup_form_detail("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetSignupFormDetail(ctx, "id_...")