Contact Lists
Manage contact lists and contacts
10 endpoints
Endpoints
| Method | Path | Description |
| GET | /v1/contact-lists | GET /v1/contact-lists |
| POST | /v1/contact-lists | POST /v1/contact-lists |
| GET | /v1/contact-lists/{id} | GET /v1/contact-lists/{id} |
| PUT | /v1/contact-lists/{id} | PUT /v1/contact-lists/{id} |
| DELETE | /v1/contact-lists/{id} | DELETE /v1/contact-lists/{id} |
| GET | /v1/contact-lists/{id}/contacts | GET /v1/contact-lists/{id}/contacts |
| POST | /v1/contact-lists/{id}/contacts | POST /v1/contact-lists/{id}/contacts |
| DELETE | /v1/contact-lists/{id}/contacts/{email} | DELETE /v1/contact-lists/{id}/contacts/{email} |
| GET | /v1/contact-lists/{id}/welcome-email | GET /v1/contact-lists/{id}/welcome-email |
| PUT | /v1/contact-lists/{id}/welcome-email | PUT /v1/contact-lists/{id}/welcome-email |
GET /v1/contact-lists
Responses
| Status | Description |
| 200 | List of contact lists with contact counts |
| 401 | Unauthorized |
Example
curl -X GET https://api.euromail.dev/v1/contact-lists \
-H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.listContactLists();
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.list_contact_lists()
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.list_contact_lists().await?;
client := euromail.NewClient("em_live_...")
result, err := client.ListContactLists(ctx)
POST /v1/contact-lists
POST /v1/contact-lists
Request Body
| Field | Type | Required | Description |
description | string | null | No | |
double_opt_in | boolean | No | |
name | string | Yes | |
Responses
| Status | Description |
| 201 | Contact list created |
| 401 | Unauthorized |
| 409 | List name already exists |
| 422 | Validation error |
Example
curl -X POST https://api.euromail.dev/v1/contact-lists \
-H "Authorization: Bearer em_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "..."
}'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.createContactList({
name: "..."
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.create_contact_list(
name="...",
)
use euromail::{EuroMail, CreateContactListParams};
let client = EuroMail::new("em_live_...");
let result = client.create_contact_list(&CreateContactListParams {
name: "...".into(),
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.CreateContactList(ctx, euromail.CreateContactListParams{
Name: "...",
})
GET /v1/contact-lists/{id}
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list ID |
Responses
| Status | Description |
| 200 | Contact list details with contact count |
| 401 | Unauthorized |
| 404 | Contact list not found |
Example
curl -X GET https://api.euromail.dev/v1/contact-lists/{id} \
-H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getContactList("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_contact_list("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_contact_list("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetContactList(ctx, "id_...")
PUT /v1/contact-lists/{id}
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list ID |
Request Body
| Field | Type | Required | Description |
description | string | null | No | |
double_opt_in | boolean | No | |
name | string | Yes | |
Responses
| Status | Description |
| 200 | Contact list updated |
| 401 | Unauthorized |
| 404 | Contact list not found |
| 409 | List name already exists |
Example
curl -X PUT https://api.euromail.dev/v1/contact-lists/{id} \
-H "Authorization: Bearer em_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "..."
}'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.updateContactList({
name: "..."
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.update_contact_list(
name="...",
)
use euromail::{EuroMail, UpdateContactListParams};
let client = EuroMail::new("em_live_...");
let result = client.update_contact_list(&UpdateContactListParams {
name: "...".into(),
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.UpdateContactList(ctx, euromail.UpdateContactListParams{
Name: "...",
})
DELETE /v1/contact-lists/{id}
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list ID |
Responses
| Status | Description |
| 204 | Contact list deleted |
| 401 | Unauthorized |
| 404 | Contact list not found |
Example
curl -X DELETE https://api.euromail.dev/v1/contact-lists/{id} \
-H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.deleteContactList("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.delete_contact_list("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.delete_contact_list("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.DeleteContactList(ctx, "id_...")
GET /v1/contact-lists/{id}/contacts
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list ID |
page | query | integer | No | Page number (default: 1) |
per_page | query | integer | No | Items per page |
status | query | string | No | Filter by status |
Responses
| Status | Description |
| 200 | Paginated list of contacts |
| 401 | Unauthorized |
| 404 | Contact list not found |
Example
curl -X GET https://api.euromail.dev/v1/contact-lists/{id}/contacts \
-H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getContactListDetail("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_contact_list_detail("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_contact_list_detail("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetContactListDetail(ctx, "id_...")
POST /v1/contact-lists/{id}/contacts
POST /v1/contact-lists/{id}/contacts
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list ID |
Request Body
| Field | Type | Required | Description |
contacts | BulkContact[] | No | |
email | string | null | No | |
metadata | any | No | |
Responses
| Status | Description |
| 201 | Contact(s) added |
| 401 | Unauthorized |
| 404 | Contact list not found |
| 409 | Contact already exists in list |
| 422 | Invalid email address |
Example
curl -X POST https://api.euromail.dev/v1/contact-lists/{id}/contacts \
-H "Authorization: Bearer em_live_..." \
-H "Content-Type: application/json" \
-d '{}'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getContactListDetail({});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_contact_list_detail(
)
use euromail::{EuroMail, GetContactListDetailParams};
let client = EuroMail::new("em_live_...");
let result = client.get_contact_list_detail(&GetContactListDetailParams {
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetContactListDetail(ctx, euromail.GetContactListDetailParams{
})
DELETE /v1/contact-lists/{id}/contacts/{email}
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list ID |
email | path | string | Yes | Contact email address |
Responses
| Status | Description |
| 204 | Contact removed |
| 401 | Unauthorized |
| 404 | Contact or list not found |
Example
curl -X DELETE https://api.euromail.dev/v1/contact-lists/{id}/contacts/{email} \
-H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getContactListDetail("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_contact_list_detail("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_contact_list_detail("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetContactListDetail(ctx, "id_...")
GET /v1/contact-lists/{id}/welcome-email
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list id |
Responses
| Status | Description |
| 200 | Welcome email configuration |
| 401 | Unauthorized |
| 404 | Contact list not found |
Example
curl -X GET https://api.euromail.dev/v1/contact-lists/{id}/welcome-email \
-H "Authorization: Bearer em_live_..."
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getContactListDetail("id_...");
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_contact_list_detail("id_...")
use euromail::EuroMail;
let client = EuroMail::new("em_live_...");
let result = client.get_contact_list_detail("id_...").await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetContactListDetail(ctx, "id_...")
PUT /v1/contact-lists/{id}/welcome-email
Parameters
| Name | In | Type | Required | Description |
id | path | string | Yes | Contact list id |
Request Body
| Field | Type | Required | Description |
delay_seconds | integer | No | |
enabled | boolean | Yes | |
from_address | string | null | No | |
html_body | string | null | No | |
subject | string | null | No | |
template_id | string | null | No | |
text_body | string | null | No | |
Responses
| Status | Description |
| 200 | Welcome email configuration saved |
| 401 | Unauthorized |
| 404 | Contact list, from_address domain, or template not found |
| 422 | Invalid or contradictory configuration |
Example
curl -X PUT https://api.euromail.dev/v1/contact-lists/{id}/welcome-email \
-H "Authorization: Bearer em_live_..." \
-H "Content-Type: application/json" \
-d '{
"enabled": true
}'
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({ apiKey: "em_live_..." });
const result = await euromail.getContactListDetail({
enabled: true
});
from euromail import EuroMail
client = EuroMail(api_key="em_live_...")
result = client.get_contact_list_detail(
enabled=True,
)
use euromail::{EuroMail, GetContactListDetailParams};
let client = EuroMail::new("em_live_...");
let result = client.get_contact_list_detail(&GetContactListDetailParams {
enabled: true,
..Default::default()
}).await?;
client := euromail.NewClient("em_live_...")
result, err := client.GetContactListDetail(ctx, euromail.GetContactListDetailParams{
Enabled: true,
})