Contact Lists
Manage contact lists and contacts
8 endpoints
Endpoints
Method Path Description
GET /v1/contact-listsGET /v1/contact-lists
POST /v1/contact-listsPOST /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}/contactsGET /v1/contact-lists/{id}/contacts
POST /v1/contact-lists/{id}/contactsPOST /v1/contact-lists/{id}/contacts
DELETE /v1/contact-lists/{id}/contacts/{email}DELETE /v1/contact-lists/{id}/contacts/{email}
GET /v1/contact-lists
Responses
Status Description
200 List of contact lists with contact counts
401 Unauthorized
Example
cURL
TypeScript
Python
Rust
Go
curl -X GET https://api.euromail.dev/v1/contact-lists \
-H "X-EuroMail-Api-Key: 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_inbooleanNo
namestringYes
Responses
Status Description
201 Contact list created
401 Unauthorized
409 List name already exists
422 Validation error
Example
cURL
TypeScript
Python
Rust
Go
curl -X POST https://api.euromail.dev/v1/contact-lists \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "name": "example.com" }'
import { EuroMail } from "@euromail/sdk" ;
const euromail = new EuroMail ({ apiKey: "em_live_..." });
const result = await euromail. createContactList ({
name: "example.com" ,
});
from euromail import EuroMail
client = EuroMail( api_key = "em_live_..." )
result = client.create_contact_list(
name = "example.com" ,
)
use euromail :: EuroMail ;
let client = EuroMail :: new ( "em_live_..." );
let result = client . create_contact_list ( & CreateContactListParams {
name : "example.com" . into (),
.. Default :: default ()
}) .await? ;
client := euromail. NewClient ( "em_live_..." )
result, err := client. CreateContactList (ctx, euromail . CreateContactListParams {
Name: "example.com" ,
})
GET /v1/contact-lists/{id}
Parameters
Name In Type Required Description
idpath stringYes Contact list ID
Responses
Status Description
200 Contact list details with contact count
401 Unauthorized
404 Contact list not found
Example
cURL
TypeScript
Python
Rust
Go
curl -X GET https://api.euromail.dev/v1/contact-lists/{id} \
-H "X-EuroMail-Api-Key: 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
idpath stringYes Contact list ID
Request Body
Field Type Required Description
description`string null` No
double_opt_inbooleanNo
namestringYes
Responses
Status Description
200 Contact list updated
401 Unauthorized
404 Contact list not found
409 List name already exists
Example
cURL
TypeScript
Python
Rust
Go
curl -X PUT https://api.euromail.dev/v1/contact-lists/{id} \
-H "X-EuroMail-Api-Key: em_live_..." \
-H "Content-Type: application/json" \
-d '{ "name": "example.com" }'
import { EuroMail } from "@euromail/sdk" ;
const euromail = new EuroMail ({ apiKey: "em_live_..." });
const result = await euromail. updateContactList ({
name: "example.com" ,
});
from euromail import EuroMail
client = EuroMail( api_key = "em_live_..." )
result = client.update_contact_list(
name = "example.com" ,
)
use euromail :: EuroMail ;
let client = EuroMail :: new ( "em_live_..." );
let result = client . update_contact_list ( & UpdateContactListParams {
name : "example.com" . into (),
.. Default :: default ()
}) .await? ;
client := euromail. NewClient ( "em_live_..." )
result, err := client. UpdateContactList (ctx, euromail . UpdateContactListParams {
Name: "example.com" ,
})
DELETE /v1/contact-lists/{id}
Parameters
Name In Type Required Description
idpath stringYes Contact list ID
Responses
Status Description
204 Contact list deleted
401 Unauthorized
404 Contact list not found
Example
cURL
TypeScript
Python
Rust
Go
curl -X DELETE https://api.euromail.dev/v1/contact-lists/{id} \
-H "X-EuroMail-Api-Key: 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
idpath stringYes Contact list ID
pagequery integerNo Page number (default: 1)
per_pagequery integerNo Items per page
statusquery stringNo Filter by status
Responses
Status Description
200 Paginated list of contacts
401 Unauthorized
404 Contact list not found
Example
cURL
TypeScript
Python
Rust
Go
curl -X GET https://api.euromail.dev/v1/contact-lists/{id}/contacts \
-H "X-EuroMail-Api-Key: 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
idpath stringYes Contact list ID
Request Body
Field Type Required Description
contactsBulkContact[]No
email`string null` No
metadataanyNo
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
TypeScript
Python
Rust
Go
curl -X POST https://api.euromail.dev/v1/contact-lists/{id}/contacts \
-H "X-EuroMail-Api-Key: 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 ;
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
idpath stringYes Contact list ID
emailpath stringYes Contact email address
Responses
Status Description
204 Contact removed
401 Unauthorized
404 Contact or list not found
Example
cURL
TypeScript
Python
Rust
Go
curl -X DELETE https://api.euromail.dev/v1/contact-lists/{id}/contacts/{email} \
-H "X-EuroMail-Api-Key: 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_..." )