curl -X POST https://api.thinnest.ai/campaigns \
-H "Authorization: Bearer $THINNESTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}'
import requests
url = "https://api.thinnest.ai/campaigns"
headers = {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
}
payload = {
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.thinnest.ai/campaigns", {
method: "POST",
headers: {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}),
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}`)
req, _ := http.NewRequest("POST", "https://api.thinnest.ai/campaigns", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"id": "camp_a1b2c3d4",
"name": "Follow-up Campaign",
"status": "draft",
"type": "voice",
"agent_id": "ag_c47e7c97_b2f2",
"total_contacts": 2,
"completed": 0,
"failed": 0,
"scheduled_at": "2026-03-10T09:00:00Z",
"created_at": "2026-03-07T14:00:00Z"
}
Campaigns
Create Campaign
Create a new outbound campaign.
POST
/
campaigns
curl -X POST https://api.thinnest.ai/campaigns \
-H "Authorization: Bearer $THINNESTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}'
import requests
url = "https://api.thinnest.ai/campaigns"
headers = {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
}
payload = {
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.thinnest.ai/campaigns", {
method: "POST",
headers: {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}),
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}`)
req, _ := http.NewRequest("POST", "https://api.thinnest.ai/campaigns", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"id": "camp_a1b2c3d4",
"name": "Follow-up Campaign",
"status": "draft",
"type": "voice",
"agent_id": "ag_c47e7c97_b2f2",
"total_contacts": 2,
"completed": 0,
"failed": 0,
"scheduled_at": "2026-03-10T09:00:00Z",
"created_at": "2026-03-07T14:00:00Z"
}
curl -X POST https://api.thinnest.ai/campaigns \
-H "Authorization: Bearer $THINNESTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}'
import requests
url = "https://api.thinnest.ai/campaigns"
headers = {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
}
payload = {
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.thinnest.ai/campaigns", {
method: "POST",
headers: {
"Authorization": "Bearer " + "YOUR_THINNESTAI_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}),
});
const data = await response.json();
console.log(data);
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"name": "Follow-up Campaign",
"agent_id": "ag_c47e7c97_b2f2",
"type": "voice",
"contacts": [
"+1234567890",
"+0987654321"
],
"message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
"schedule": "2026-03-10T09:00:00Z",
"max_concurrent": 5
}`)
req, _ := http.NewRequest("POST", "https://api.thinnest.ai/campaigns", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_THINNESTAI_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Request Body
Campaign display name
Voice-enabled agent to use (ag_*)
Campaign type: voice, sms
List of phone numbers in E.164 format (+1234567890)
Message template with placeholders
ISO 8601 datetime to start the campaign
Maximum concurrent calls/messages
Outbound caller ID (must be verified)
Response 201
{
"id": "camp_a1b2c3d4",
"name": "Follow-up Campaign",
"status": "draft",
"type": "voice",
"agent_id": "ag_c47e7c97_b2f2",
"total_contacts": 2,
"completed": 0,
"failed": 0,
"scheduled_at": "2026-03-10T09:00:00Z",
"created_at": "2026-03-07T14:00:00Z"
}
Campaign Lifecycle
draft → launched → running → completed
↕
paused
Errors
| Code | Description |
|---|---|
401 | Missing or invalid authentication |
402 | Insufficient balance for campaign |
404 | Agent not found |
422 | Invalid contacts or configuration |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Request to create a new campaign.
Maximum string length:
200Campaign configuration options.
Show child attributes
Show child attributes
Response
Successful Response
⌘I

