cURL
curl --request GET \
--url https://api-sandbox.y.uno/v1/campaigns/{campaign_id} \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/campaigns/{campaign_id}"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/campaigns/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/campaigns/{campaign_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.y.uno/v1/campaigns/{campaign_id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Declined Payment Recovery - Colombia",
"account_id": "2404911d-5df9-429e-8488-ad41abea1a4b",
"organization_code": "550e8400-e29b-41d4-a716-446655440000",
"country": "CO",
"channel": "WHATSAPP_MESSAGE",
"schedule": {
"daily_start_time": "08:00",
"daily_end_time": "21:00",
"time_zone": "America/Bogota"
},
"duration": {
"start_at": "2025-07-01T00:00:00Z",
"end_at": "2026-07-01T00:00:00Z"
},
"status": "ACTIVE",
"rules": [
{
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"rule_type": "PAYMENT_STATUS",
"values": [
"DECLINED"
],
"conditional": "EQUAL",
"metadata_key": null,
"status": "ACTIVE",
"created_at": "2025-07-01T12:05:00Z",
"updated_at": "2025-07-01T12:05:00Z"
}
],
"created_at": "2025-07-01T12:00:00Z",
"updated_at": "2025-07-01T12:00:00Z"
}
}Get Campaign
Retrieve a single communications campaign by ID, including its rules.
GET
/
campaigns
/
{campaign_id}
cURL
curl --request GET \
--url https://api-sandbox.y.uno/v1/campaigns/{campaign_id} \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>'import requests
url = "https://api-sandbox.y.uno/v1/campaigns/{campaign_id}"
headers = {
"public-api-key": "<api-key>",
"private-secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'public-api-key': '<api-key>', 'private-secret-key': '<api-key>'}
};
fetch('https://api-sandbox.y.uno/v1/campaigns/{campaign_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.y.uno/v1/campaigns/{campaign_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"private-secret-key: <api-key>",
"public-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.y.uno/v1/campaigns/{campaign_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.y.uno/v1/campaigns/{campaign_id}")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Declined Payment Recovery - Colombia",
"account_id": "2404911d-5df9-429e-8488-ad41abea1a4b",
"organization_code": "550e8400-e29b-41d4-a716-446655440000",
"country": "CO",
"channel": "WHATSAPP_MESSAGE",
"schedule": {
"daily_start_time": "08:00",
"daily_end_time": "21:00",
"time_zone": "America/Bogota"
},
"duration": {
"start_at": "2025-07-01T00:00:00Z",
"end_at": "2026-07-01T00:00:00Z"
},
"status": "ACTIVE",
"rules": [
{
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"rule_type": "PAYMENT_STATUS",
"values": [
"DECLINED"
],
"conditional": "EQUAL",
"metadata_key": null,
"status": "ACTIVE",
"created_at": "2025-07-01T12:05:00Z",
"updated_at": "2025-07-01T12:05:00Z"
}
],
"created_at": "2025-07-01T12:00:00Z",
"updated_at": "2025-07-01T12:00:00Z"
}
}Was this page helpful?
⌘I