curl --request PUT \
--url https://api.opal.dev/v1/campaigns/{campaign_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Q3 Access Review (Updated)",
"configuration": {
"end_date": "2026-09-30T00:00:00.000Z",
"timezone": "America/Los_Angeles"
}
}
'import requests
url = "https://api.opal.dev/v1/campaigns/{campaign_id}"
payload = {
"name": "Q3 Access Review (Updated)",
"configuration": {
"end_date": "2026-09-30T00:00:00.000Z",
"timezone": "America/Los_Angeles"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Q3 Access Review (Updated)',
configuration: {end_date: '2026-09-30T00:00:00.000Z', timezone: 'America/Los_Angeles'}
})
};
fetch('https://api.opal.dev/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.opal.dev/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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q3 Access Review (Updated)',
'configuration' => [
'end_date' => '2026-09-30T00:00:00.000Z',
'timezone' => 'America/Los_Angeles'
]
]),
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://api.opal.dev/v1/campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"name\": \"Q3 Access Review (Updated)\",\n \"configuration\": {\n \"end_date\": \"2026-09-30T00:00:00.000Z\",\n \"timezone\": \"America/Los_Angeles\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.opal.dev/v1/campaigns/{campaign_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q3 Access Review (Updated)\",\n \"configuration\": {\n \"end_date\": \"2026-09-30T00:00:00.000Z\",\n \"timezone\": \"America/Los_Angeles\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q3 Access Review (Updated)\",\n \"configuration\": {\n \"end_date\": \"2026-09-30T00:00:00.000Z\",\n \"timezone\": \"America/Los_Angeles\"\n }\n}"
response = http.request(request)
puts response.read_body{
"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353",
"name": "Q3 Access Review",
"status": "DRAFT",
"is_template": false,
"created_at": "2026-07-01T00:00:00.000Z",
"updated_at": "2026-07-01T00:00:00.000Z",
"created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1",
"configuration": null,
"started_at": null,
"started_by_user_id": null,
"stopped_at": null,
"stopped_by_user_id": null,
"ended_at": null,
"ended_by_user_id": null
}Partially updates a campaign. Omitted fields are left unchanged.
configuration.query and configuration.reviewer_assignment_policy
cannot be updated after create; including either field returns 400.
configuration.cron_expression and
configuration.recurring_duration_days may only be set on template
campaigns; setting them on a one-off campaign returns 400.
configuration.is_template is immutable and not accepted on update.
Configuration updates on a stopped or ended (non-template) campaign
return 400. Name-only updates are still allowed.
curl --request PUT \
--url https://api.opal.dev/v1/campaigns/{campaign_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Q3 Access Review (Updated)",
"configuration": {
"end_date": "2026-09-30T00:00:00.000Z",
"timezone": "America/Los_Angeles"
}
}
'import requests
url = "https://api.opal.dev/v1/campaigns/{campaign_id}"
payload = {
"name": "Q3 Access Review (Updated)",
"configuration": {
"end_date": "2026-09-30T00:00:00.000Z",
"timezone": "America/Los_Angeles"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Q3 Access Review (Updated)',
configuration: {end_date: '2026-09-30T00:00:00.000Z', timezone: 'America/Los_Angeles'}
})
};
fetch('https://api.opal.dev/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.opal.dev/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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Q3 Access Review (Updated)',
'configuration' => [
'end_date' => '2026-09-30T00:00:00.000Z',
'timezone' => 'America/Los_Angeles'
]
]),
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://api.opal.dev/v1/campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"name\": \"Q3 Access Review (Updated)\",\n \"configuration\": {\n \"end_date\": \"2026-09-30T00:00:00.000Z\",\n \"timezone\": \"America/Los_Angeles\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.opal.dev/v1/campaigns/{campaign_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Q3 Access Review (Updated)\",\n \"configuration\": {\n \"end_date\": \"2026-09-30T00:00:00.000Z\",\n \"timezone\": \"America/Los_Angeles\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Q3 Access Review (Updated)\",\n \"configuration\": {\n \"end_date\": \"2026-09-30T00:00:00.000Z\",\n \"timezone\": \"America/Los_Angeles\"\n }\n}"
response = http.request(request)
puts response.read_body{
"campaign_id": "f454d283-ca87-4a8a-bdbb-df212eca5353",
"name": "Q3 Access Review",
"status": "DRAFT",
"is_template": false,
"created_at": "2026-07-01T00:00:00.000Z",
"updated_at": "2026-07-01T00:00:00.000Z",
"created_by_user_id": "32acc112-21ff-4669-91c2-21e27683eaa1",
"configuration": null,
"started_at": null,
"started_by_user_id": null,
"stopped_at": null,
"stopped_by_user_id": null,
"ended_at": null,
"ended_by_user_id": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the campaign.
Body
UpdateCampaignInfo Object
Description
The UpdateCampaignInfo object is used to partially update a campaign.
Omitted fields are left unchanged.
Usage Example
Use in the PUT Campaign endpoint.
Response
The updated Campaign.
An access review campaign.
The ID of the campaign.
"f454d283-ca87-4a8a-bdbb-df212eca5353"
The name of the campaign.
"Q3 Access Review"
The current status of a campaign.
DRAFT, ONGOING, COMPLETED, STOPPED, ENDED "ONGOING"
Whether this campaign is a recurring schedule template. Templates spawn draft campaigns on schedule rather than being reviewed directly.
false
The creation time of the campaign.
"2026-07-01T00:00:00.000Z"
The last updated time of the campaign.
"2026-07-01T00:00:00.000Z"
The ID of the user who created the campaign.
"32acc112-21ff-4669-91c2-21e27683eaa1"
The campaign's configuration, if set.
Show child attributes
Show child attributes
{
"configuration_id": "39a4d283-ca87-4a8a-bdbb-df212eca5fdb",
"created_at": "2026-07-01T00:00:00.000Z",
"updated_at": "2026-07-01T00:00:00.000Z",
"query": null,
"reviewer_assignment_policy": "MANUALLY",
"allow_self_review": false,
"send_reviewer_assignment_notification": true,
"allow_reviewer_reassignment": false,
"start_date": null,
"end_date": "2026-09-30T00:00:00.000Z",
"timezone": "America/Los_Angeles",
"revoke_on": "END",
"reminder_schedule": [7, 3, 1],
"reminder_include_manager": true,
"require_reason_on_denial": false,
"hide_ai_suggestions": false,
"custom_start_message": null,
"group_asset_visibility_policy": "STRICT",
"is_template": false,
"cron_expression": null,
"next_scheduled_run": null,
"last_scheduled_run": null,
"recurring_duration_days": null
}
The time the campaign was started, if started.
"2026-07-02T00:00:00.000Z"
The ID of the user who started the campaign, if started.
"32acc112-21ff-4669-91c2-21e27683eaa1"
The time the campaign was manually stopped, if stopped.
"2026-07-10T00:00:00.000Z"
The ID of the user who stopped the campaign, if stopped.
"32acc112-21ff-4669-91c2-21e27683eaa1"
The time the campaign reached its scheduled end, if ended.
"2026-07-14T00:00:00.000Z"
The ID of the user who ended the campaign, if ended.
"32acc112-21ff-4669-91c2-21e27683eaa1"
Was this page helpful?