cURL
curl --request PUT \
--url https://api.opal.dev/v1/bundles/{bundle_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Bundle 1",
"description": "Description of bundle 1",
"admin_owner_id": "4aed3e8a-727b-4d72-8010-3b8710c50bec"
}
'import requests
url = "https://api.opal.dev/v1/bundles/{bundle_id}"
payload = {
"name": "Bundle 1",
"description": "Description of bundle 1",
"admin_owner_id": "4aed3e8a-727b-4d72-8010-3b8710c50bec"
}
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: 'Bundle 1',
description: 'Description of bundle 1',
admin_owner_id: '4aed3e8a-727b-4d72-8010-3b8710c50bec'
})
};
fetch('https://api.opal.dev/v1/bundles/{bundle_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/bundles/{bundle_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' => 'Bundle 1',
'description' => 'Description of bundle 1',
'admin_owner_id' => '4aed3e8a-727b-4d72-8010-3b8710c50bec'
]),
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/bundles/{bundle_id}"
payload := strings.NewReader("{\n \"name\": \"Bundle 1\",\n \"description\": \"Description of bundle 1\",\n \"admin_owner_id\": \"4aed3e8a-727b-4d72-8010-3b8710c50bec\"\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/bundles/{bundle_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bundle 1\",\n \"description\": \"Description of bundle 1\",\n \"admin_owner_id\": \"4aed3e8a-727b-4d72-8010-3b8710c50bec\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/bundles/{bundle_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\": \"Bundle 1\",\n \"description\": \"Description of bundle 1\",\n \"admin_owner_id\": \"4aed3e8a-727b-4d72-8010-3b8710c50bec\"\n}"
response = http.request(request)
puts response.read_body{
"bundle_id": "a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1",
"name": "Bundle 1",
"description": "Description of bundle 1",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"admin_owner_id": "4aed3e8a-727b-4d72-8010-3b8710c50bec",
"total_num_items": 15,
"total_num_resources": 10,
"total_num_groups": 5
}Updates a bundle.
PUT
/
bundles
/
{bundle_id}
cURL
curl --request PUT \
--url https://api.opal.dev/v1/bundles/{bundle_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Bundle 1",
"description": "Description of bundle 1",
"admin_owner_id": "4aed3e8a-727b-4d72-8010-3b8710c50bec"
}
'import requests
url = "https://api.opal.dev/v1/bundles/{bundle_id}"
payload = {
"name": "Bundle 1",
"description": "Description of bundle 1",
"admin_owner_id": "4aed3e8a-727b-4d72-8010-3b8710c50bec"
}
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: 'Bundle 1',
description: 'Description of bundle 1',
admin_owner_id: '4aed3e8a-727b-4d72-8010-3b8710c50bec'
})
};
fetch('https://api.opal.dev/v1/bundles/{bundle_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/bundles/{bundle_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' => 'Bundle 1',
'description' => 'Description of bundle 1',
'admin_owner_id' => '4aed3e8a-727b-4d72-8010-3b8710c50bec'
]),
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/bundles/{bundle_id}"
payload := strings.NewReader("{\n \"name\": \"Bundle 1\",\n \"description\": \"Description of bundle 1\",\n \"admin_owner_id\": \"4aed3e8a-727b-4d72-8010-3b8710c50bec\"\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/bundles/{bundle_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bundle 1\",\n \"description\": \"Description of bundle 1\",\n \"admin_owner_id\": \"4aed3e8a-727b-4d72-8010-3b8710c50bec\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/bundles/{bundle_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\": \"Bundle 1\",\n \"description\": \"Description of bundle 1\",\n \"admin_owner_id\": \"4aed3e8a-727b-4d72-8010-3b8710c50bec\"\n}"
response = http.request(request)
puts response.read_body{
"bundle_id": "a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1",
"name": "Bundle 1",
"description": "Description of bundle 1",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"admin_owner_id": "4aed3e8a-727b-4d72-8010-3b8710c50bec",
"total_num_items": 15,
"total_num_resources": 10,
"total_num_groups": 5
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the bundle to be updated.
Body
application/json
Response
The bundle was successfully updated.
The ID of the bundle.
Example:
"a381e7a3-e5e0-4c48-b1d6-4ccb4c191bc1"
The name of the bundle.
Example:
"Bundle 1"
The description of the bundle.
Example:
"Description of bundle 1"
The creation timestamp of the bundle, in ISO 8601 format
The last updated timestamp of the bundle, in ISO 8601 format
The ID of the owner of the bundle.
Example:
"4aed3e8a-727b-4d72-8010-3b8710c50bec"
The total number of items in the bundle.
Example:
15
The total number of resources in the bundle.
Example:
10
The total number of groups in the bundle.
Example:
5
Last modified on September 2, 2026
Was this page helpful?