arrobaMail
Module 0325 endpoints

Campaigns /campaigns

Admin: no restriction. Reseller sees campaigns from its sub-users. User: only their own campaigns.

Endpoints

25 total
GET/campaignsUser

List campaigns with pagination

Query params

NameTypeReq.DefaultDescription
limitnumberNo25Items per page
offsetnumberNo0Offset
statusstringNo-active, completed, draft, paused, stopped
qstringNo-Search by name or subject

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{
  "paging": { "total": 150, "limit": 25, "offset": 0, "pages": 6 },
  "list": [
    {
      "id": 12345,
      "encid": "1A2B3C",
      "camp_name": "Newsletter Mayo",
      "asunto": "Novedades de Mayo 2025",
      "status": 3,
      "from_name": "Empresa ABC",
      "from_mail": "info@Empresa ABC.com",
      "dateCreated": "2025-05-01 10:30:00",
      "suscribers": 5000,
      "sents": 4850,
      "stats": { "opens": 1200, "clicks": 340, "bounces": 45, "unsubscribes": 12 }
    }
  ]
}
POST/campaignsUser

Create and queue campaign for sending

from_mail must be a verified sender. Checks the sending quota. Detects duplicates (same lists + subject within 24h). Anti-spam check on from_name.

Request body · application/json

NameTypeReq.Description
camp_namestringYesInternal campaign name
asuntostringYesEmail subject
htmlstringYesHTML content
from_namestringYesSender name
from_mailstringYesVerified sender email
list_idstring[]YesArray of encoded list IDs
preheaderstringNoPreview text
textostringNoPlain-text version
reply_tostringNoReply email
seidnumberNoSegmentation ID
track_linksnumberNo1 = enable link tracking
track_readsnumberNo1 = enable open tracking
track_convnumberNo1 = enable conversion tracking
g_analyticsobjectNoGoogle Analytics config
draftIdnumberNoDraft ID to convert

Example

curl -X POST "https://envios.arrobamail.com/v3/api/campaigns" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "camp_name": "...",
  "asunto": "...",
  "html": "...",
  "from_name": "...",
  "from_mail": "...",
  "list_id": ["..."],
  "preheader": "...",
  "texto": "...",
  "reply_to": "...",
  "seid": 0,
  "track_links": 0,
  "track_reads": 0,
  "track_conv": 0,
  "g_analytics": {},
  "draftId": 0
}'

Response 201

{
  "success": 1,
  "mid": 12345,
  "subscribers": 5000
}

Errors

StatusCodeDescription
400invalid_senderSender not verified
400subject_requiredSubject required
400html_requiredHTML required
400lists_requiredAt least one list required
400duplicate_campaignDuplicate campaign in the last 24h
400quota_exceededSending quota exceeded
400spamlike_sender_nameSender name resembles spam
POST/campaigns/testUser

Send test email

Content hash prevents duplicates within 10 minutes.

Request body · application/json

NameTypeReq.Description
emailstringYesTest destination email
subjectstringYesSubject
htmlstringYesHTML content
from_namestringNoSender name
from_mailstringNoSender email

Example

curl -X POST "https://envios.arrobamail.com/v3/api/campaigns/test" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "...",
  "subject": "...",
  "html": "...",
  "from_name": "...",
  "from_mail": "..."
}'

Response 200

{ "success": true }
GET/campaigns/:encidUser

Full campaign detail

Path parameters

NameDescription
encidEncoded campaign ID (format "1A2B3C" or numeric)

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{
  "id": 12345,
  "encid": "1A2B3C",
  "camp_name": "May Newsletter",
  "asunto": "May 2025 updates",
  "preheader": "Discover what's new",
  "status": 3,
  "from_name": "ABC Company",
  "from_mail": "[email protected]",
  "reply_to": "[email protected]",
  "track_links": 1,
  "track_reads": 1,
  "dateCreated": "2025-05-01 10:30:00",
  "dateStart": "2025-05-01 10:35:00",
  "dateEnd": "2025-05-01 11:45:00",
  "suscribers": 5000,
  "sents": 4850,
  "stats": {
    "opens": 1200, "unique_opens": 980,
    "clicks": 340, "unique_clicks": 210,
    "bounces": 45, "hard_bounces": 12,
    "unsubscribes": 12, "complaints": 2
  }
}
GET/campaigns/:encid/bodyUser

Campaign HTML/text content

Path parameters

NameDescription
encidEncoded campaign ID

Query params

NameTypeReq.DefaultDescription
imagesFullPathbooleanNofalseConvert relative paths to absolute URLs

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/body" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{
  "id": 12345,
  "html": "<html>...</html>",
  "texto": "Plain text version...",
  "asunto": "May 2025 updates",
  "camp_name": "May Newsletter"
}
GET/campaigns/:encid/stats/subscribersLogsUser

Export subscriber logs (Excel)

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/stats/subscribersLogs" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{
  "fileName": "CampaignSubscribersLog-12345.xlsx",
  "date": "2025-05-03 15:30:00"
}
GET/campaigns/:encid/stats/subscriber-actionsUser

Paginated subscriber actions

Path parameters

NameDescription
encidEncoded campaign ID

Query params

NameTypeReq.DefaultDescription
pageintNo1Page
limitintNo50Items per page (25, 50, 100)
actionstringNo-open, click, bounce, complaint, unsubscribe, subscribe, blocked
emailstringNo-Partial email search
dateFromintNo-Unix timestamp
dateTointNo-Unix timestamp
bounceTypestringNo-hard, soft, spam, invalid, preblocked
sortstringNodate_descdate_desc, date_asc, email_asc, email_desc

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/stats/subscriber-actions" \
  -H "Authorization: Bearer $TOKEN"
GET/campaigns/:encid/stats/opens-subscribersUser

Paginated subscribers with opens

Lists subscribers who opened a non-archived campaign, with first open and read count.

Path parameters

NameDescription
encidEncoded campaign ID

Query params

NameTypeReq.DefaultDescription
pageintNo1Page
limitintNo50Items per page (25, 50, 100)
emailstringNo-Partial email search
listIdintNo-Filter by list
sortstringNoreads_descreads_desc, reads_asc, first_open_desc, first_open_asc, email_asc, email_desc

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/stats/opens-subscribers" \
  -H "Authorization: Bearer $TOKEN"
GET/campaigns/:encid/stats/opens-subscribers/exportUser

Export detailed opens list

Generates an Excel file with all subscribers who opened a non-archived campaign. Includes email, list, total opens, and first open. The file is cached for 10 minutes per campaign.

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/stats/opens-subscribers/export" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{ "fileName": "CampaignOpenSubscribers-12345.xlsx", "date": "2026-05-27T14:00:00.000Z", "exported": 116 }

Errors

StatusCodeDescription
400campaign_archivedThe campaign is archived and its detail is no longer available.
GET/campaigns/:encid/stats/click-qualityUser

Link click quality

Splits raw clicks into likely-human, likely-bot, and unclassified, by campaign and by link.

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/stats/click-quality" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{
  "campaign_id": 12345,
  "quality": {
    "raw_unique_clickers": 120,
    "trusted_unique_clickers": 96,
    "bot_likely_unique": 18,
    "unknown_unique": 6
  },
  "links": []
}
GET/campaigns/:encid/stats/subscriber-actions/urlsUser

Unique clicked URLs

Returns the unique tracked URLs in the campaign with their click counts.

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/stats/subscriber-actions/urls" \
  -H "Authorization: Bearer $TOKEN"
PATCH/campaigns/:encidUser

Update campaign fields

Only the fields sent are modified. Editable fields: camp_name, asunto, preheader, html, texto, from_name, from_mail, reply_to, track_links, track_reads.

Path parameters

NameDescription
encidEncoded campaign ID

Request body · application/json

NameTypeReq.Description
camp_namestringNoInternal name
asuntostringNoEmail subject
preheaderstringNoPreview text
htmlstringNoHTML content
from_namestringNoSender name
from_mailstringNoSender email
track_linksnumberNo0 or 1
track_readsnumberNo0 or 1

Example

curl -X PATCH "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "camp_name": "...",
  "asunto": "...",
  "preheader": "...",
  "html": "...",
  "from_name": "...",
  "from_mail": "...",
  "track_links": 0,
  "track_reads": 0
}'

Response 200

{ "success": true }
DELETE/campaigns/:encidUser

Delete campaign

Superadmin: physical deletion. Other roles: soft delete (active=6).

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X DELETE "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{ "success": true }
PUT/campaigns/:encid/status/resumeUser

Resume paused campaign

The campaign must have status 4 (paused).

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X PUT "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/status/resume" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{ "success": true }

Errors

StatusCodeDescription
400status_not_pausedThe campaign is not paused
PUT/campaigns/:encid/status/stopUser

Pause active campaign

The campaign must have status 0, 1, or 3.

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X PUT "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/status/stop" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{ "success": true }

Errors

StatusCodeDescription
400status_not_activeThe campaign is not active
PUT/campaigns/:encid/status/approveReseller

Approve pending campaign

The campaign must have on_hold=1. The approving user must be the parent/reseller of the owner.

Path parameters

NameDescription
encidEncoded campaign ID

Example

curl -X PUT "https://envios.arrobamail.com/v3/api/campaigns/{ENCID}/status/approve" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{ "success": true }
POST/campaigns/countRecipientsUser

Count recipients from lists/segmentation

Request body · application/json

NameTypeReq.Description
lidsstring[]YesEncoded list IDs
seidnumberNoSegmentation ID
active_subs_onlybooleanNoActive subscribers only

Example

curl -X POST "https://envios.arrobamail.com/v3/api/campaigns/countRecipients" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "lids": ["..."],
  "seid": 0,
  "active_subs_only": true
}'

Response 200

{ "destinatarios": 5000 }
POST/campaigns/importFromUrlUser

Import HTML from URL

Valid, reachable URL. Scripts are stripped from the imported HTML.

Request body · application/json

NameTypeReq.Description
urlstringYesReachable HTTP/HTTPS URL

Example

curl -X POST "https://envios.arrobamail.com/v3/api/campaigns/importFromUrl" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "..."
}'

Response 200

{ "html": "<html>...</html>" }

Errors

StatusCodeDescription
400invalid_urlInvalid URL format
400cant_access_urlCould not access the URL
GET/campaigns/draft/:idUser

Get draft

The draft must belong to the authenticated user.

Path parameters

NameDescription
idNumeric draft ID

Example

curl -X GET "https://envios.arrobamail.com/v3/api/campaigns/draft/{ID}" \
  -H "Authorization: Bearer $TOKEN"

Response 200

{
  "id": 456,
  "camp_data": {
    "name": "Borrador Newsletter Mayo",
    "from_mail": "info@Empresa ABC.com",
    "from_name": "Empresa ABC",
    "subject": "Novedades de Mayo 2025",
    "html": "<html>...</html>",
    "list_id": [1, 3],
    "templateId": 10
  },
  "dateCreated": "2025-05-02 14:22:00",
  "dateModified": "2025-05-03 09:15:00"
}
POST/campaigns/draftUser

Save draft

Request body · application/json

NameTypeReq.Description
camp_data.namestringYesDraft name
camp_data.from_mailstringNoSender email
camp_data.from_namestringNoSender name
camp_data.subjectstringNoSubject
camp_data.htmlstringNoHTML
camp_data.list_idnumber[]NoList IDs
camp_data.templateIdnumberNoTemplate ID

Example

curl -X POST "https://envios.arrobamail.com/v3/api/campaigns/draft" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "camp_data.name": "...",
  "camp_data.from_mail": "...",
  "camp_data.from_name": "...",
  "camp_data.subject": "...",
  "camp_data.html": "...",
  "camp_data.list_id": [0],
  "camp_data.templateId": 0
}'

Response 201

{ "id": 456 }
PUT/campaigns/draft/:idUser

Update draft

Same fields as POST /campaigns/draft. Partial merge.

Path parameters

NameDescription
idNumeric draft ID

Request body · application/json

NameTypeReq.Description
camp_dataobjectYesFields to update (partial merge)

Example

curl -X PUT "https://envios.arrobamail.com/v3/api/campaigns/draft/{ID}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "camp_data": {}
}'

Response 200

{ "success": true }
POST/campaigns/spamlikeCheckUser

Check spam similarity

Request body · application/json

NameTypeReq.Description
subjectstringYesSubject to evaluate
bodystringYesHTML content to evaluate

Example

curl -X POST "https://envios.arrobamail.com/v3/api/campaigns/spamlikeCheck" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "subject": "...",
  "body": "..."
}'

Response 200

{
  "score": 3.5,
  "threshold": 5.0,
  "isSpam": false,
  "details": { "subject_score": 1.2, "body_score": 2.3 }
}
POST/campaigns/generateUser

Generate content with AI

Subject to daily and monthly limits. Rate limit: 2/min, 10/hour.

Request body · application/json

NameTypeReq.Description
typestringYes"campaignContent" or "subjectandpreheader"
promptstringNoPrompt for the campaignContent type
body_htmlstringNoExisting HTML for the subjectandpreheader type
imagesstring[]NoReference image URLs
useBrandKitbooleanNoDefault true. If false, does not use the active brand kit

Example

curl -X POST "https://envios.arrobamail.com/v3/api/campaigns/generate" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "...",
  "prompt": "...",
  "body_html": "...",
  "images": ["..."],
  "useBrandKit": true
}'

Errors

StatusCodeDescription
429daily_limit_reachedDaily limit reached
429monthly_limit_reachedMonthly limit reached
429per_minute_limit_exceededToo many requests per minute
503ai_unavailableAI service unavailable
PUT/campaigns/generationLogs/:generationId/feedbackUser

Send feedback on AI generation

Path parameters

NameDescription
generationIdAI generation log ID

Request body · application/json

NameTypeReq.Description
ratingintegerNoRating from 1 to 5
userCommentsstringNoUser comments

Example

curl -X PUT "https://envios.arrobamail.com/v3/api/campaigns/generationLogs/{GENERATIONID}/feedback" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "rating": 0,
  "userComments": "..."
}'

Response 200

{ "success": true }

Get started with arrobaMail
in under 5 minutes.

Free plan, AI generations included, no credit card required — and real support from a real team.

Try it free now
WhatsAppOur team replies