Claim a one-time agent connector setup token
Used by external agent runtimes such as OpenClaw to finish agent connector setup. The setup token is generated in the authenticated Leadtime app, but this claim endpoint does not require Bearer auth. Claiming the token enables the agent webhooks/sessions connection, creates a fresh agent PAT, stores the webhook URL, and returns one-time secrets to the installer.
POST
/agent-connectors/setup/claimAuthorization
AuthorizationOAuth2 access token · headerrequiredRequest body
requiredapplication/jsonagentIdstringRuntime-specific agent id to attach this Leadtime agent to.
gatewayPublicUrlstringrequiredPublic OpenClaw/Hermes gateway URL reachable by Leadtime for webhook delivery.
runtimeVersionstringConnector/runtime version reported by the installer.
setupTokenstringrequiredOne-time setup token generated from the agent settings page.
Responses
201Connector setup was claimed and one-time secrets were returned.
401Setup token is invalid, expired, or already used.
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/agent-connectors/setup/claim" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"agentId": "main",
"gatewayPublicUrl": "https://agent.example.com",
"runtimeVersion": "openclaw-leadtime-plugin@0.1.0",
"setupToken": "lt_conn_abc123"
}'const response = await fetch("https://leadtime.app/api/public/agent-connectors/setup/claim", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"agentId": "main",
"gatewayPublicUrl": "https://agent.example.com",
"runtimeVersion": "openclaw-leadtime-plugin@0.1.0",
"setupToken": "lt_conn_abc123"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/agent-connectors/setup/claim",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"agentId": "main",
"gatewayPublicUrl": "https://agent.example.com",
"runtimeVersion": "openclaw-leadtime-plugin@0.1.0",
"setupToken": "lt_conn_abc123"
},
)Response
Connector setup was claimed and one-time secrets were returned.
Setup token is invalid, expired, or already used.
Forbidden - Insufficient API scopes or permissions