Accept Delegation
curl --request POST \
--url https://api.truthlocks.com/v1/delegations/cross-tenant/accept \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>"
}
'import requests
url = "https://api.truthlocks.com/v1/delegations/cross-tenant/accept"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', token: '<string>'})
};
fetch('https://api.truthlocks.com/v1/delegations/cross-tenant/accept', 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.truthlocks.com/v1/delegations/cross-tenant/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.truthlocks.com/v1/delegations/cross-tenant/accept"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.post("https://api.truthlocks.com/v1/delegations/cross-tenant/accept")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/delegations/cross-tenant/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"delegation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [
"<string>"
],
"ttl_seconds": 123,
"conditions": {},
"status": "offered",
"token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Guardrails & Delegation
Accept Cross-Tenant Delegation
Accept a cross-tenant trust delegation offer, activating scoped permissions for the accepting agent.
POST
/
v1
/
delegations
/
cross-tenant
/
accept
Accept Delegation
curl --request POST \
--url https://api.truthlocks.com/v1/delegations/cross-tenant/accept \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>"
}
'import requests
url = "https://api.truthlocks.com/v1/delegations/cross-tenant/accept"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"token": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', token: '<string>'})
};
fetch('https://api.truthlocks.com/v1/delegations/cross-tenant/accept', 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.truthlocks.com/v1/delegations/cross-tenant/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.truthlocks.com/v1/delegations/cross-tenant/accept"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.post("https://api.truthlocks.com/v1/delegations/cross-tenant/accept")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/delegations/cross-tenant/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"delegation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scopes": [
"<string>"
],
"ttl_seconds": 123,
"conditions": {},
"status": "offered",
"token": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Accepts a pending cross-tenant trust delegation offer. Once accepted, the accepting agent gains the delegated scopes for the duration specified in the original offer. The acceptance event is recorded in the transparency log with a cryptographic receipt.
Only agents within the target tenant specified in the original offer can accept it. The offer must still be in
offered status and not yet expired.
Authentication
string
required
API key with
delegations:accept scope. Alternatively, pass a Bearer JWT
token in the Authorization header.string
required
Tenant identifier of the accepting party. Must match the
target_tenant_id
from the original offer.Path Parameters
string
required
Delegation offer identifier (e.g.
deleg_01HXYZ4A5B6C7D8E9F).Request
string
required
MAIP agent identifier of the agent accepting the delegation. Must belong to
the target tenant.
Response
string
Delegation identifier.
string
Updated status.
active upon successful acceptance.string
The agent that created the original offer.
string
Tenant of the offering agent.
string
The agent that accepted the delegation.
string
Tenant of the accepting agent.
string[]
Delegated permission scopes now active for the accepting agent.
integer
Maximum re-delegation depth.
string
ISO 8601 timestamp when the delegation was accepted.
string
ISO 8601 timestamp when the delegation will automatically expire.
string
Transparency-log receipt anchoring this delegation acceptance event.
Authorizations
API key for machine-to-machine authentication
Path Parameters
Delegation identifier
Body
application/json
Response
Delegation accepted
Available options:
offered, active, expired, revoked Delegation acceptance token (returned on offer)

