campaign audiences
update an audience
rename it and/or change the columns its agent gets (contextColumns: null = every column again). campaigns already made from it keep the columns they were made with.
PATCH
/
v1
/
campaign-audiences
/
{audience_id}
update an audience
curl --request PATCH \
--url https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contextColumns": [
{
"column": "city",
"description": "where they live"
}
]
}
'import requests
url = "https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}"
payload = { "contextColumns": [
{
"column": "city",
"description": "where they live"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contextColumns: [{column: 'city', description: 'where they live'}]})
};
fetch('https://silk-api.rumik.ai/v1/campaign-audiences/{audience_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://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'contextColumns' => [
[
'column' => 'city',
'description' => 'where they live'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}"
payload := strings.NewReader("{\n \"contextColumns\": [\n {\n \"column\": \"city\",\n \"description\": \"where they live\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contextColumns\": [\n {\n \"column\": \"city\",\n \"description\": \"where they live\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contextColumns\": [\n {\n \"column\": \"city\",\n \"description\": \"where they live\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "01a0b054-6f82-7193-ce0f-1a2b3c4d5e6f",
"name": "September leads",
"columns": [
"name",
"city",
"mobile"
],
"phoneColumn": "mobile",
"contextColumns": [
{
"column": "city",
"description": "where they live"
},
{
"column": "mobile",
"description": "the phone number this call is going to"
}
],
"contactCount": 2,
"skippedCount": 1,
"sourceFilename": "leads.csv",
"createdAt": "2026-10-01T09:00:00Z",
"updatedAt": "2026-10-01T09:00:00Z"
}{
"error": "Invalid API key",
"code": "unauthorized"
}{
"error": "This API key lacks the 'agent' scope",
"code": "forbidden_scope"
}{
"error": "Contact group not found",
"code": "campaign_audience_not_found"
}{
"error": "body.toNumber: must be an E.164 phone number, e.g. +14155551234",
"code": "invalid_request",
"details": [
{
"loc": "body.toNumber",
"message": "must be an E.164 phone number, e.g. +14155551234"
}
]
}{
"error": "Rate limit exceeded",
"code": "rate_limited",
"limit": 100,
"current": 101
}Authorizations
your rumik api key, e.g. rk_live_.... create one in the rumik dashboard.
Path Parameters
the audience's id.
Body
application/json
Response
ok.
a contact list (CSV) a campaign calls, with the columns its agent gets.
Show child attributes
Show child attributes
⌘I
update an audience
curl --request PATCH \
--url https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contextColumns": [
{
"column": "city",
"description": "where they live"
}
]
}
'import requests
url = "https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}"
payload = { "contextColumns": [
{
"column": "city",
"description": "where they live"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contextColumns: [{column: 'city', description: 'where they live'}]})
};
fetch('https://silk-api.rumik.ai/v1/campaign-audiences/{audience_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://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'contextColumns' => [
[
'column' => 'city',
'description' => 'where they live'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}"
payload := strings.NewReader("{\n \"contextColumns\": [\n {\n \"column\": \"city\",\n \"description\": \"where they live\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contextColumns\": [\n {\n \"column\": \"city\",\n \"description\": \"where they live\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://silk-api.rumik.ai/v1/campaign-audiences/{audience_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contextColumns\": [\n {\n \"column\": \"city\",\n \"description\": \"where they live\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "01a0b054-6f82-7193-ce0f-1a2b3c4d5e6f",
"name": "September leads",
"columns": [
"name",
"city",
"mobile"
],
"phoneColumn": "mobile",
"contextColumns": [
{
"column": "city",
"description": "where they live"
},
{
"column": "mobile",
"description": "the phone number this call is going to"
}
],
"contactCount": 2,
"skippedCount": 1,
"sourceFilename": "leads.csv",
"createdAt": "2026-10-01T09:00:00Z",
"updatedAt": "2026-10-01T09:00:00Z"
}{
"error": "Invalid API key",
"code": "unauthorized"
}{
"error": "This API key lacks the 'agent' scope",
"code": "forbidden_scope"
}{
"error": "Contact group not found",
"code": "campaign_audience_not_found"
}{
"error": "body.toNumber: must be an E.164 phone number, e.g. +14155551234",
"code": "invalid_request",
"details": [
{
"loc": "body.toNumber",
"message": "must be an E.164 phone number, e.g. +14155551234"
}
]
}{
"error": "Rate limit exceeded",
"code": "rate_limited",
"limit": 100,
"current": 101
}