Update a program
curl --request PATCH \
--url http://localhost:3000/api/programs/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/api/programs/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/api/programs/{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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/programs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:3000/api/programs/{id}"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/api/programs/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/programs/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"mode": "batch",
"organizationId": "<string>",
"audienceId": "<string>",
"flowId": "<string>",
"status": "draft",
"startAt": "<string>",
"didPool": [
{
"id": "<string>",
"number": "+212500000001",
"country": "MA"
}
],
"retryStrategy": {},
"createdAt": "<string>",
"updatedAt": "<string>",
"triggerCondition": {
"type": "date",
"attributeName": "date_echeance",
"direction": "before",
"offset": {
"days": 2,
"hours": 15,
"minutes": 0
}
},
"stopAt": "<string>",
"pauseWindows": {},
"autoPauseRules": {}
}Programs
Update a program
PATCH
/
api
/
programs
/
{id}
Update a program
curl --request PATCH \
--url http://localhost:3000/api/programs/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/api/programs/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/api/programs/{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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/programs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:3000/api/programs/{id}"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/api/programs/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/programs/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"mode": "batch",
"organizationId": "<string>",
"audienceId": "<string>",
"flowId": "<string>",
"status": "draft",
"startAt": "<string>",
"didPool": [
{
"id": "<string>",
"number": "+212500000001",
"country": "MA"
}
],
"retryStrategy": {},
"createdAt": "<string>",
"updatedAt": "<string>",
"triggerCondition": {
"type": "date",
"attributeName": "date_echeance",
"direction": "before",
"offset": {
"days": 2,
"hours": 15,
"minutes": 0
}
},
"stopAt": "<string>",
"pauseWindows": {},
"autoPauseRules": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Program ID
Response
Program ID
Program name
Program mode
Available options:
batch, live Organization ID
Audience ID. Set at creation for batch, auto-created for live.
Flow ID
Program lifecycle status. Operational status is on executions.
Available options:
draft, active, archived Scheduled start time
Resolved DID pool
Show child attributes
Show child attributes
Retry strategy
Created at
Updated at
Trigger condition (live mode only)
Show child attributes
Show child attributes
Scheduled stop time
Pause windows
Auto-pause rules