Recipients a campaign
/api/v1/campaigns/{campaign}/recipientsParameters
| Name | In | Type | Description |
|---|---|---|---|
campaignrequired | path | string | The campaign identifier. |
status | query | string | Only recipients with this status: pending, sent, failed, skipped_suppressed, skipped_unsubscribed, skipped_invalid (the address does not exist, found before sending) or skipped_inbox_full (the inbox was full, so marketing is held for 7 days). |
engagement | query | string | opened, not_opened or clicked. |
search | query | string | Matches the recipient's email. |
per_page | query | integer | Page size, 1–100. Default 25. |
Request
/api/v1/campaigns/{campaign}/recipientscurl -X GET 'https://app.mailyte.com/api/v1/campaigns/01JBT8XQ2M9WYC3K4F6R7S8T9V/recipients' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY'const response = await fetch('https://app.mailyte.com/api/v1/campaigns/01JBT8XQ2M9WYC3K4F6R7S8T9V/recipients', {
method: 'GET',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
},
});
const { data } = await response.json();import requests
response = requests.get(
"https://app.mailyte.com/api/v1/campaigns/01JBT8XQ2M9WYC3K4F6R7S8T9V/recipients",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->get('https://app.mailyte.com/api/v1/campaigns/01JBT8XQ2M9WYC3K4F6R7S8T9V/recipients');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/campaigns/01JBT8XQ2M9WYC3K4F6R7S8T9V/recipients")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer mk_live_YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataobjectdataarray<object>objectstringcampaign_recipientidstringUnique identifier for the recipient row.
emailstringcontact_idstringNull for an address that reached the campaign without a contact row behind it.
statusstringpending | sent | failed | skipped_suppressed | skipped_unsubscribed | skipped_invalid | skipped_inbox_full | unknownWhat happened to this recipient. -
pending: not attempted yet. -sent: handed to the mail server. -failed: seeerror. -skipped_suppressed: on your suppression list. -skipped_unsubscribed: unsubscribed. -skipped_invalid: the address does not exist, found before sending. -skipped_inbox_full: the inbox was full, so marketing to this person is held for 7 days.errorstringWhat went wrong, for a person to read. Do not parse it. Null when nothing went wrong.
sent_atstringWhen the message was handed to the mail server. This is not delivery. Set only when
statusissent; readstatusfirst.opened_atstringWhen this recipient first opened the email. Null when no open has been seen.
clicked_atstringWhen this recipient first clicked a link. Null when no click has been seen.
pagination_metaany
Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist. |
403 | The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys. |
404 | No such resource in this organization. |
422 | The request was understood but the values were not acceptable. |
429 | Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait. |
Every status, with what causes it and what to do, is on the error reference.