Campaigns
Get campaign
Returns one campaign and its stored send window, or null when no matching campaign exists in the selected project.
Requires campaigns:read. Project tokens only access resources in their own project.
GET
/
platform
/
campaigns
/
{campaignId}
Get campaign
curl --request GET \
--url https://api.polymorfa.com/platform/campaigns/{campaignId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/platform/campaigns/{campaignId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/campaigns/{campaignId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/campaigns/{campaignId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}false{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipientListId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipientCount": 1,
"sentCount": 1,
"deliveredCount": 1,
"readCount": 1,
"failedCount": 1,
"skippedCount": 1,
"scheduledAt": 123,
"launchedAt": 123,
"completedAt": 123,
"createdAt": 123,
"updatedAt": 123,
"sendWindow": {
"timeZone": "<string>",
"days": [
"monday"
],
"hours": [
{
"start": "09:00",
"end": "18:00"
}
],
"recipientTimeZone": true,
"timeZoneVariable": "<string>"
},
"composerBlueprint": "<unknown>",
"messages": "<unknown>",
"audienceRef": "<unknown>",
"senderConfig": "<unknown>",
"complianceConfig": "<unknown>",
"variants": "<unknown>",
"variantStrategy": "<unknown>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}Authorizations
Send your team API key or project token as Authorization: Bearer <token>. The credential must have the required permissions. Project tokens can access only their own project.
Path Parameters
Identifier for the campaign.
Query Parameters
Project the campaign belongs to. Required with a team API key; a project token is bound to its own project and omits it.
Response
Success
Structured data carried by this object.
Accepted alternatives
| Alternative | Accepted input |
|---|---|
| Alternative 1 | Type: object; Required fields: id, name, status, templateId, recipientListId, recipientCount, sentCount, deliveredCount, readCount, failedCount, skippedCount, scheduledAt, launchedAt, completedAt, createdAt, updatedAt, sendWindow |
| Alternative 2 | null |
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Get campaign
curl --request GET \
--url https://api.polymorfa.com/platform/campaigns/{campaignId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/platform/campaigns/{campaignId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/platform/campaigns/{campaignId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/platform/campaigns/{campaignId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}false{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipientListId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recipientCount": 1,
"sentCount": 1,
"deliveredCount": 1,
"readCount": 1,
"failedCount": 1,
"skippedCount": 1,
"scheduledAt": 123,
"launchedAt": 123,
"completedAt": 123,
"createdAt": 123,
"updatedAt": 123,
"sendWindow": {
"timeZone": "<string>",
"days": [
"monday"
],
"hours": [
{
"start": "09:00",
"end": "18:00"
}
],
"recipientTimeZone": true,
"timeZoneVariable": "<string>"
},
"composerBlueprint": "<unknown>",
"messages": "<unknown>",
"audienceRef": "<unknown>",
"senderConfig": "<unknown>",
"complianceConfig": "<unknown>",
"variants": "<unknown>",
"variantStrategy": "<unknown>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"request_log_url": "<string>"
},
"data": null,
"docs": "<string>"
}