Update Workspace Integration
curl --request PUT \
--url https://api.royalti.io/integrations/workspace \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "integration-123",
"settings": {
"apiKey": "new-api-key-here",
"region": "EU"
}
}
'import requests
url = "https://api.royalti.io/integrations/workspace"
payload = {
"id": "integration-123",
"settings": {
"apiKey": "new-api-key-here",
"region": "EU"
}
}
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({id: 'integration-123', settings: {apiKey: 'new-api-key-here', region: 'EU'}})
};
fetch('https://api.royalti.io/integrations/workspace', 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.royalti.io/integrations/workspace",
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([
'id' => 'integration-123',
'settings' => [
'apiKey' => 'new-api-key-here',
'region' => 'EU'
]
]),
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.royalti.io/integrations/workspace"
payload := strings.NewReader("{\n \"id\": \"integration-123\",\n \"settings\": {\n \"apiKey\": \"new-api-key-here\",\n \"region\": \"EU\"\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.royalti.io/integrations/workspace")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"integration-123\",\n \"settings\": {\n \"apiKey\": \"new-api-key-here\",\n \"region\": \"EU\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/integrations/workspace")
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 \"id\": \"integration-123\",\n \"settings\": {\n \"apiKey\": \"new-api-key-here\",\n \"region\": \"EU\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "vertofx",
"enabled": true,
"settings": {
"apiKey": "your-api-key-here",
"region": "US"
},
"metadata": {
"customField": "custom-value"
},
"memo": "Integration for VertoFX payments",
"TenantId": "123e4567-e89b-12d3-a456-426614174000",
"IntegrationId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-01T00:00:00Z"
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}Integration
Update Workspace Integration
Updates an existing workspace integration.
PUT
/
integrations
/
workspace
Update Workspace Integration
curl --request PUT \
--url https://api.royalti.io/integrations/workspace \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "integration-123",
"settings": {
"apiKey": "new-api-key-here",
"region": "EU"
}
}
'import requests
url = "https://api.royalti.io/integrations/workspace"
payload = {
"id": "integration-123",
"settings": {
"apiKey": "new-api-key-here",
"region": "EU"
}
}
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({id: 'integration-123', settings: {apiKey: 'new-api-key-here', region: 'EU'}})
};
fetch('https://api.royalti.io/integrations/workspace', 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.royalti.io/integrations/workspace",
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([
'id' => 'integration-123',
'settings' => [
'apiKey' => 'new-api-key-here',
'region' => 'EU'
]
]),
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.royalti.io/integrations/workspace"
payload := strings.NewReader("{\n \"id\": \"integration-123\",\n \"settings\": {\n \"apiKey\": \"new-api-key-here\",\n \"region\": \"EU\"\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.royalti.io/integrations/workspace")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"integration-123\",\n \"settings\": {\n \"apiKey\": \"new-api-key-here\",\n \"region\": \"EU\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/integrations/workspace")
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 \"id\": \"integration-123\",\n \"settings\": {\n \"apiKey\": \"new-api-key-here\",\n \"region\": \"EU\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "vertofx",
"enabled": true,
"settings": {
"apiKey": "your-api-key-here",
"region": "US"
},
"metadata": {
"customField": "custom-value"
},
"memo": "Integration for VertoFX payments",
"TenantId": "123e4567-e89b-12d3-a456-426614174000",
"IntegrationId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-01T00:00:00Z"
}
}{
"status": "error",
"message": "Invalid request parameters"
}{
"status": "error",
"message": "Unauthorized"
}{
"status": "error",
"message": "Resource not found"
}{
"status": "error",
"message": "Internal server error"
}This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
Endpoint:/integrations/workspace
Authorization:
- Required role:
adminor higher
PUT
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Integration ID |
| settings | object | Yes | Updated settings |
Code Examples
const response = await fetch('https://api.royalti.io/integrations/workspace', {
method: 'PUT',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"id": "integration-123",
"settings": {
"apiKey": "new-api-key-here",
"region": "EU"
}
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.put(
'https://api.royalti.io/integrations/workspace',
headers={
'Authorization': f'Bearer {token}'
},
json={"id":"integration-123","settings":{"apiKey":"new-api-key-here","region":"EU"}}
)
data = response.json()
print(data)
curl -X PUT https://api.royalti.io/integrations/workspace \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id":"integration-123","settings":{"apiKey":"new-api-key-here","region":"EU"}}'
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Body
application/json
⌘I