AI credentials
Set a custom API
Add or replace a custom API: a secret and its HTTPS base URL.
PUT
/
credential-profiles
/
{profile}
/
custom-apis
/
{name}
Set a custom API
curl --request PUT \
--url https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "sk_live_123",
"baseUrl": "https://api.stripe.com/v1"
}
'import requests
url = "https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}"
payload = {
"value": "sk_live_123",
"baseUrl": "https://api.stripe.com/v1"
}
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({value: 'sk_live_123', baseUrl: 'https://api.stripe.com/v1'})
};
fetch('https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}', 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://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}",
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([
'value' => 'sk_live_123',
'baseUrl' => 'https://api.stripe.com/v1'
]),
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://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}"
payload := strings.NewReader("{\n \"value\": \"sk_live_123\",\n \"baseUrl\": \"https://api.stripe.com/v1\"\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://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"sk_live_123\",\n \"baseUrl\": \"https://api.stripe.com/v1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}")
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 \"value\": \"sk_live_123\",\n \"baseUrl\": \"https://api.stripe.com/v1\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"type": "<string>",
"success": true,
"profile": {
"id": "<string>",
"name": "default",
"isDefault": true,
"owner": {
"id": "<string>",
"kind": "personal",
"name": "<string>",
"aiProxyEnabled": true
},
"canManage": true,
"connected": [
"anthropic-api-key"
],
"customApis": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"type": "sandbox.error",
"status": 400,
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"status": 400
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 401,
"code": "unauthorized",
"message": "Unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized",
"status": 401
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 403,
"code": "forbidden",
"message": "Forbidden",
"error": {
"code": "forbidden",
"message": "Forbidden",
"status": 403
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 409,
"code": "provider_not_configured",
"message": "Prompting is locked until Codex is configured on the Agents page.",
"requestId": "req_01HX...",
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
}
}Authorizations
Boat bearer token in the form boat_.... Service API keys authenticate sandbox operations.
Path Parameters
Profile id or name.
Environment variable name of the custom API, for example STRIPE_KEY. Provider names (ANTHROPIC_*, OPENAI_*, and so on) and names that end in _BASE_URL are reserved.
Pattern:
^[A-Z_][A-Z0-9_]{0,63}$Body
application/json
⌘I
Set a custom API
curl --request PUT \
--url https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "sk_live_123",
"baseUrl": "https://api.stripe.com/v1"
}
'import requests
url = "https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}"
payload = {
"value": "sk_live_123",
"baseUrl": "https://api.stripe.com/v1"
}
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({value: 'sk_live_123', baseUrl: 'https://api.stripe.com/v1'})
};
fetch('https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}', 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://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}",
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([
'value' => 'sk_live_123',
'baseUrl' => 'https://api.stripe.com/v1'
]),
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://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}"
payload := strings.NewReader("{\n \"value\": \"sk_live_123\",\n \"baseUrl\": \"https://api.stripe.com/v1\"\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://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"sk_live_123\",\n \"baseUrl\": \"https://api.stripe.com/v1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://boat.dev/api/v1/credential-profiles/{profile}/custom-apis/{name}")
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 \"value\": \"sk_live_123\",\n \"baseUrl\": \"https://api.stripe.com/v1\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"type": "<string>",
"success": true,
"profile": {
"id": "<string>",
"name": "default",
"isDefault": true,
"owner": {
"id": "<string>",
"kind": "personal",
"name": "<string>",
"aiProxyEnabled": true
},
"canManage": true,
"connected": [
"anthropic-api-key"
],
"customApis": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"ok": false,
"type": "sandbox.error",
"status": 400,
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"status": 400
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 401,
"code": "unauthorized",
"message": "Unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized",
"status": 401
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 403,
"code": "forbidden",
"message": "Forbidden",
"error": {
"code": "forbidden",
"message": "Forbidden",
"status": 403
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 409,
"code": "provider_not_configured",
"message": "Prompting is locked until Codex is configured on the Agents page.",
"requestId": "req_01HX...",
"error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"details": {}
}
}