Skip to content

Hi Coactive team!

This is a sample of what your docs might look like on Starport, based on your public docs.

Take a look! Ask AI, search, the MCP server, and Markdown copies all work.

Starport is a free and open-source docs framework based on Starlight and maintained by Promptless. Promptless is the AI agent that automatically updates your customer-facing docs.

Every annual Promptless plan comes with white-glove migration to Starport, where we migrate the content, tune the result with you, and you own the repository so you're never locked in.

Book a 15-minute walkthrough

Sample migration of Coactive docs to Starport, prepared by PromptlessBook 15-minute call

Update Credentials

PUT https://api.coactive.ai/api/v1/auth-management/clients/{client_id}
Content-Type: application/json

Update system-level credentials.

This endpoint allows updating the name and roles of existing system-level credentials.

The access of the system-level credentials is scoped to its roles. If no roles are provided, the system-level credentials will have full access to all resources. If the credentials was previously assigned roles and no roles are provided in the update request, the credentials will gain full access to all resources.

  • Authorization header (bearer token, required) — Bearer authentication of the form Bearer <token>, where token is your auth token.
  • client_id (string, required) — The client ID of the system-level credentials

This endpoint expects an object.

  • name (string, optional, nullable) — Display name for the system-level credentials
  • roles (list of object, optional, nullable) — List of roles to assign to the system-level credentials. This is only available to organizations that are RBAC-enabled. Please contact support if you would like to enable RBAC for your organization.
    • role_id (string, required) — Name of the role (e.g., ‘admin’, ‘editor’, ‘viewer’)
    • resource (string, optional, nullable) — Optional resource type the role applies to (e.g., ‘dataset’)
    • resource_instance (string, optional, nullable) — Optional resource instance ID the role applies to
  • roles_context (string, optional, nullable) — Context for the roles to update. This can either be ‘system’ for system-level roles or ‘dataset:{dataset_id}’ for dataset-level roles.

The updated system-level credentials details

  • client_id (string, required) — OAuth client ID
  • client_secret (string, required) — OAuth client secret (only returned on creation)
  • name (string, required) — Display name for the OAuth client
  • roles (list of object, required) — List of roles assigned to the client
    • role_id (string, required) — Name of the role (e.g., ‘admin’, ‘editor’, ‘viewer’)
    • resource (string, optional, nullable) — Optional resource type the role applies to (e.g., ‘dataset’)
    • resource_instance (string, optional, nullable) — Optional resource instance ID the role applies to

Validation Error

  • detail (list of object, optional)
    • loc (list of string or integer, required)
    • msg (string, required)
    • type (string, required)

Request

{
"name": "My OAuth Client",
"roles": [
{
"role_id": "admin"
}
]
}

Response

{
"client_id": "client_123",
"client_secret": "secret_123",
"name": "My OAuth Client",
"roles": [
{
"role_id": "admin"
},
{
"role_id": "editor",
"resource": "dataset",
"resource_instance": "c1a7cb60-1731-4c0f-b966-165263c30896"
}
]
}

SDK Code

import requests
url = "https://api.coactive.ai/api/v1/auth-management/clients/client_id"
payload = {
"name": "My OAuth Client",
"roles": [{ "role_id": "admin" }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const url = 'https://api.coactive.ai/api/v1/auth-management/clients/client_id';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: '{"name":"My OAuth Client","roles":[{"role_id":"admin"}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coactive.ai/api/v1/auth-management/clients/client_id"
payload := strings.NewReader("{\n \"name\": \"My OAuth Client\",\n \"roles\": [\n {\n \"role_id\": \"admin\"\n }\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(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://api.coactive.ai/api/v1/auth-management/clients/client_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\": \"My OAuth Client\",\n \"roles\": [\n {\n \"role_id\": \"admin\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse<String> response = Unirest.put("https://api.coactive.ai/api/v1/auth-management/clients/client_id")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My OAuth Client\",\n \"roles\": [\n {\n \"role_id\": \"admin\"\n }\n ]\n}")
.asString();
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://api.coactive.ai/api/v1/auth-management/clients/client_id', [
'body' => '{
"name": "My OAuth Client",
"roles": [
{
"role_id": "admin"
}
]
}',
'headers' => [
'Authorization' => 'Bearer <token>',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
using RestSharp;
var client = new RestClient("https://api.coactive.ai/api/v1/auth-management/clients/client_id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"My OAuth Client\",\n \"roles\": [\n {\n \"role_id\": \"admin\"\n }\n ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import Foundation
let headers = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
let parameters = [
"name": "My OAuth Client",
"roles": [["role_id": "admin"]]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.coactive.ai/api/v1/auth-management/clients/client_id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()