Campaigns
Get Campaign
Retrieve the details of a specific campaign by its ID using the AutoSend API.
GET
/
campaigns
/
{campaignId}
curl --request GET \
--url 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567' \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch(
'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567',
{
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
},
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567", nil)
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567"))
.header("Authorization", "Bearer <token>")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer <token>'
response = http.request(request)
puts JSON.parse(response.body)
{
"success": true,
"data": {
"id": "69d348dd0351e0c32be90342",
"projectId": "68c7e05a0bd5787257e6ee3b",
"organizationId": "68c7e05a0bd5787257e6ee38",
"createdBy": 68c7e05a0bd5787257e7ec99,
"name": "Spring Sale Newsletter",
"subject": "Don't miss our Spring Sale!",
"previewText": "Up to 50% off this weekend only",
"replyTo": "[email protected]",
"toLists": [
{
"id": "696e1158fbfc515799175f02",
"name": "seg list",
"type": "list",
"contactCount": 3
}
],
"excludeLists": [],
"unsubscribeGroupId": null,
"sendNow": true,
"scheduledAt": "2026-04-06T05:56:02.850Z",
"templateId": "A-280fa451a7ca5cc17513",
"status": "sent",
"from": {
"email": "[email protected]",
"name": "Example Team"
},
"metrics": {
"sent": 200,
"delivered": 200,
"opened": 160,
"suppressed": 0,
"clicked": 0,
"bounced": 0,
"unsubscribed": 0,
"spamReported": 0,
"processedCount": 200,
"totalContacts": 200,
"failedCount": 0
},
"sentAt": "2026-04-06T05:54:51.190Z",
"abortedAt": null,
"failureReason": null,
"createdAt": "2026-04-06T05:47:09.523Z",
"updatedAt": "2026-04-06T07:26:09.190Z",
"sendToGlobalList": false,
"template": {
"templateId": "A-280fa451a7ca5cc17513",
"projectId": "68c7e05a0bd5787257e6ee3b",
"templateName": "Spring Sale Newsletter",
"subject": "Don't miss our Spring Sale!",
"previewText": "Up to 50% off this weekend only",
"emailTemplate": "<!DOCTYPE html><html><head></head><body><h1>Welcome, {{name}}!</h1><p>Thanks for signing up.</p></body></html>",
"templateType": "marketing",
"builderType": "code",
"createdAt": "2026-04-06T05:47:09.516Z",
"updatedAt": "2026-04-06T05:47:09.516Z",
},
"trackingClick": true,
"trackingOpen": true,
"sendMode": "immediate",
"resumedAt": null,
"pausedReason": null,
"pausedAt": null,
"thresholdPreset": "balanced",
"source": "api",
},
"message": "Campaign retrieved successfully"
}
curl --request GET \
--url 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567' \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch(
'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567',
{
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
},
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567", nil)
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567"))
.header("Authorization", "Bearer <token>")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer <token>'
response = http.request(request)
puts JSON.parse(response.body)
{
"success": true,
"data": {
"id": "69d348dd0351e0c32be90342",
"projectId": "68c7e05a0bd5787257e6ee3b",
"organizationId": "68c7e05a0bd5787257e6ee38",
"createdBy": 68c7e05a0bd5787257e7ec99,
"name": "Spring Sale Newsletter",
"subject": "Don't miss our Spring Sale!",
"previewText": "Up to 50% off this weekend only",
"replyTo": "[email protected]",
"toLists": [
{
"id": "696e1158fbfc515799175f02",
"name": "seg list",
"type": "list",
"contactCount": 3
}
],
"excludeLists": [],
"unsubscribeGroupId": null,
"sendNow": true,
"scheduledAt": "2026-04-06T05:56:02.850Z",
"templateId": "A-280fa451a7ca5cc17513",
"status": "sent",
"from": {
"email": "[email protected]",
"name": "Example Team"
},
"metrics": {
"sent": 200,
"delivered": 200,
"opened": 160,
"suppressed": 0,
"clicked": 0,
"bounced": 0,
"unsubscribed": 0,
"spamReported": 0,
"processedCount": 200,
"totalContacts": 200,
"failedCount": 0
},
"sentAt": "2026-04-06T05:54:51.190Z",
"abortedAt": null,
"failureReason": null,
"createdAt": "2026-04-06T05:47:09.523Z",
"updatedAt": "2026-04-06T07:26:09.190Z",
"sendToGlobalList": false,
"template": {
"templateId": "A-280fa451a7ca5cc17513",
"projectId": "68c7e05a0bd5787257e6ee3b",
"templateName": "Spring Sale Newsletter",
"subject": "Don't miss our Spring Sale!",
"previewText": "Up to 50% off this weekend only",
"emailTemplate": "<!DOCTYPE html><html><head></head><body><h1>Welcome, {{name}}!</h1><p>Thanks for signing up.</p></body></html>",
"templateType": "marketing",
"builderType": "code",
"createdAt": "2026-04-06T05:47:09.516Z",
"updatedAt": "2026-04-06T05:47:09.516Z",
},
"trackingClick": true,
"trackingOpen": true,
"sendMode": "immediate",
"resumedAt": null,
"pausedReason": null,
"pausedAt": null,
"thresholdPreset": "balanced",
"source": "api",
},
"message": "Campaign retrieved successfully"
}
Authorizations
string | header
required
Bearer authentication header of the form Bearer
<token>, where <token> is your auth token.Path Parameters
string
required
The id of the campaign to retrieve.
Response
Returns the full campaign object for the given ID.boolean
Indicates whether the request was successful.
object
The campaign object.
Show data
Show data
string
Unique identifier of the campaign.
string
ID of the project this campaign belongs to.
string
ID of the organization this campaign belongs to.
string | null
ID of the user who created the campaign.
string
Display name of the campaign.
string
Email subject line.
string
Preview text shown in email clients.
string | null
ID of the sender used for this campaign.
string
Reply-to email address.
array
array
Lists or segments excluded from this campaign.
string | null
ID of the unsubscribe group associated with this campaign.
boolean
Whether the campaign was sent immediately.
string | null
ISO 8601 date-time when the campaign is scheduled to send. Null if not scheduled.
string
ID of the email template used by this campaign.
string
Current status of the campaign. One of:
draft, scheduled, sending, sending_gradual, paused, sent, failed, aborted.object
Campaign delivery and engagement metrics.
Show metrics
Show metrics
number
Number of emails sent.
number
Number of emails delivered.
number
Number of emails opened.
number
Number of emails suppressed.
number
Number of emails clicked.
number
Number of emails bounced.
number
Number of unsubscribes.
number
Number of spam reports.
number
Total number of emails processed.
number
Total number of contacts targeted.
number
Number of emails that failed to send.
number
Average sending rate per second.
number
Total time taken to send the campaign in seconds.
string | null
ISO 8601 timestamp when the campaign was sent.
string | null
ISO 8601 timestamp when the campaign was aborted. Null if not aborted.
string | null
Internal job ID for the campaign send process.
string | null
Reason for campaign failure. Null if the campaign did not fail.
string
ISO 8601 timestamp when the campaign was created.
string
ISO 8601 timestamp when the campaign was last updated.
boolean
Whether the campaign was sent to the global contact list.
object
The email template associated with this campaign.
Show template
Show template
string
Unique identifier of the template.
string
ID of the project the template belongs to.
string
Display name of the template.
string
Email subject line from the template.
string
Preview text from the template.
string
HTML content of the email template.
string
Type of the template. One of:
marketing, transactional.string
How the template was built. One of:
code, editor.object | null
Editor JSON data if built with the visual editor.
object | null
Parent body properties for the template.
string
ISO 8601 timestamp when the template was created.
string
ISO 8601 timestamp when the template was last updated.
boolean
Whether the template has been flagged.
string
Source of the template. One of:
api, dashboard.string
Internal ID of the template.
boolean
Whether click tracking is enabled.
boolean
Whether open tracking is enabled.
string
How the campaign is delivered:
immediate, scheduled, or gradual.string | null
ISO 8601 timestamp when the campaign was resumed. Null if never paused.
string | null
Reason the campaign was paused. Null if not paused.
string | null
ISO 8601 timestamp when the campaign was paused. Null if not paused.
string
Sending threshold preset. One of:
balanced, aggressive, conservative.string
Source of the campaign. One of:
api, dashboard.object | null
Gradual send configuration. Null if not using gradual send mode.
string
A human-readable message describing the result.
Was this page helpful?
⌘I
curl --request GET \
--url 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567' \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch(
'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567',
{
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
},
}
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567", nil)
req.Header.Set("Authorization", "Bearer <token>")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567"))
.header("Authorization", "Bearer <token>")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.autosend.com/v1/campaigns/60d5ec49f1b2c72d9c8b4567')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer <token>'
response = http.request(request)
puts JSON.parse(response.body)
{
"success": true,
"data": {
"id": "69d348dd0351e0c32be90342",
"projectId": "68c7e05a0bd5787257e6ee3b",
"organizationId": "68c7e05a0bd5787257e6ee38",
"createdBy": 68c7e05a0bd5787257e7ec99,
"name": "Spring Sale Newsletter",
"subject": "Don't miss our Spring Sale!",
"previewText": "Up to 50% off this weekend only",
"replyTo": "[email protected]",
"toLists": [
{
"id": "696e1158fbfc515799175f02",
"name": "seg list",
"type": "list",
"contactCount": 3
}
],
"excludeLists": [],
"unsubscribeGroupId": null,
"sendNow": true,
"scheduledAt": "2026-04-06T05:56:02.850Z",
"templateId": "A-280fa451a7ca5cc17513",
"status": "sent",
"from": {
"email": "[email protected]",
"name": "Example Team"
},
"metrics": {
"sent": 200,
"delivered": 200,
"opened": 160,
"suppressed": 0,
"clicked": 0,
"bounced": 0,
"unsubscribed": 0,
"spamReported": 0,
"processedCount": 200,
"totalContacts": 200,
"failedCount": 0
},
"sentAt": "2026-04-06T05:54:51.190Z",
"abortedAt": null,
"failureReason": null,
"createdAt": "2026-04-06T05:47:09.523Z",
"updatedAt": "2026-04-06T07:26:09.190Z",
"sendToGlobalList": false,
"template": {
"templateId": "A-280fa451a7ca5cc17513",
"projectId": "68c7e05a0bd5787257e6ee3b",
"templateName": "Spring Sale Newsletter",
"subject": "Don't miss our Spring Sale!",
"previewText": "Up to 50% off this weekend only",
"emailTemplate": "<!DOCTYPE html><html><head></head><body><h1>Welcome, {{name}}!</h1><p>Thanks for signing up.</p></body></html>",
"templateType": "marketing",
"builderType": "code",
"createdAt": "2026-04-06T05:47:09.516Z",
"updatedAt": "2026-04-06T05:47:09.516Z",
},
"trackingClick": true,
"trackingOpen": true,
"sendMode": "immediate",
"resumedAt": null,
"pausedReason": null,
"pausedAt": null,
"thresholdPreset": "balanced",
"source": "api",
},
"message": "Campaign retrieved successfully"
}