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": "support@example.com",
"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": "hello@yourdomain.com",
"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": "support@example.com",
"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": "hello@yourdomain.com",
"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
Bearer authentication header of the form Bearer
<token>, where <token> is your auth token.Path Parameters
Response
Returns the full campaign object for the given ID.The campaign object.
Show data
Show data
Current status of the campaign. One of:
draft, scheduled, sending, sending_gradual, paused, sent, failed, aborted.Campaign delivery and engagement metrics.
Show metrics
Show metrics
The email template associated with this campaign.
Show template
Show template
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": "support@example.com",
"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": "hello@yourdomain.com",
"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"
}