Crear campaña
POST
/v1/bulk/campaigns
const url = 'https://api.mailerdash.com/v1/bulk/campaigns';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","template_id":"example","list_id":"example","from_email":"example","from_name":"example","reply_to":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.mailerdash.com/v1/bulk/campaigns \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "template_id": "example", "list_id": "example", "from_email": "example", "from_name": "example", "reply_to": "example" }'Authorizations
Sección titulada «Authorizations »Request Body required
Sección titulada «Request Body required » Media type application/json
object
name
required
string
template_id
required
string
list_id
required
string
from_email
required
string
from_name
string
reply_to
string
Example generated
{ "name": "example", "template_id": "example", "list_id": "example", "from_email": "example", "from_name": "example", "reply_to": "example"}Responses
Sección titulada « Responses »Campaña creada
Media type application/json
object
id
string
name
string
key_id
string
template_id
string
list_id
string
from_email
string
from_name
string
reply_to
string
status
string
scheduled_at
string
started_at
string
completed_at
string
total_contacts
integer
sent_count
integer
failed_count
integer
created_at
string
updated_at
string
Example
{ "id": "cmp-d894cd3d626d9d11", "status": "draft"}Campos requeridos faltantes
No autorizado
Plantilla o lista no encontrada