Update Agent Subscription
curl --request PUT \
--url https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "01h8xyz123abc456def789ghi"
}
'import requests
url = "https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id}"
payload = { "product_id": "01h8xyz123abc456def789ghi" }
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({product_id: '01h8xyz123abc456def789ghi'})
};
fetch('https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{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://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{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([
'product_id' => '01h8xyz123abc456def789ghi'
]),
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://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id}"
payload := strings.NewReader("{\n \"product_id\": \"01h8xyz123abc456def789ghi\"\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://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"01h8xyz123abc456def789ghi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{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 \"product_id\": \"01h8xyz123abc456def789ghi\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 303,
"workspace_id": "01kqh44c218wnfq26sdepf803y",
"type": "default",
"stripe_id": "sub_N2BSUg1wARYxBszPfeU0qldewdoXidX1JZ8s0ajq",
"stripe_status": "active",
"stripe_price": null,
"quantity": null,
"trial_ends_at": null,
"ends_at": null,
"created_at": "2026-05-01T06:38:01.000000Z",
"updated_at": "2026-05-01T06:38:01.000000Z"
}
}Subscriptions
Update Subscription
Updates the subscription for the specified agent to a new product. The agent must have an active subscription.
PUT
/
api
/
v1
/
workspaces
/
{workspace_id}
/
agents
/
{agent_id}
/
subscriptions
/
{id}
Update Agent Subscription
curl --request PUT \
--url https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "01h8xyz123abc456def789ghi"
}
'import requests
url = "https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id}"
payload = { "product_id": "01h8xyz123abc456def789ghi" }
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({product_id: '01h8xyz123abc456def789ghi'})
};
fetch('https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{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://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{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([
'product_id' => '01h8xyz123abc456def789ghi'
]),
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://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id}"
payload := strings.NewReader("{\n \"product_id\": \"01h8xyz123abc456def789ghi\"\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://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product_id\": \"01h8xyz123abc456def789ghi\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://colloqui-web-develop-btoadh.laravel.cloud/api/v1/workspaces/{workspace_id}/agents/{agent_id}/subscriptions/{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 \"product_id\": \"01h8xyz123abc456def789ghi\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 303,
"workspace_id": "01kqh44c218wnfq26sdepf803y",
"type": "default",
"stripe_id": "sub_N2BSUg1wARYxBszPfeU0qldewdoXidX1JZ8s0ajq",
"stripe_status": "active",
"stripe_price": null,
"quantity": null,
"trial_ends_at": null,
"ends_at": null,
"created_at": "2026-05-01T06:38:01.000000Z",
"updated_at": "2026-05-01T06:38:01.000000Z"
}
}Authorizations
Bearer token authentication
Path Parameters
The ID of the workspace.
The ID of the agent.
The ID of the subscription.
Body
application/json
The id of an existing record in the products table.
Example:
"01h8xyz123abc456def789ghi"
Response
200 - application/json
Show child attributes
Show child attributes

