cURL (integrator)
curl https://api.relayer.fi/v1/agents/$AGENT_ID/status \
-H "Authorization: ApiKey $RELAYER_API_KEY"import { RelayerSDK } from "@relayerfi/agent-sdk";
const sdk = new RelayerSDK({ /* ... */ });
// The SDK polls this every 30s automatically via KillSwitch — you rarely
// hit it manually. Use the getter to read the cached state synchronously:
if (sdk.isKillSwitchActive) {
// skip payment operations
}
// Direct call:
const { data } = await sdk.http.get(`/v1/agents/${sdk.agentId}/status`);
// data.killSwitch (boolean) — true iff status === 'killed'
// data.status — full lifecycle: active | suspended | draining | killed | paused | pending_policiesimport requests
url = "https://testnet.relayer.fi/v1/agents/{id}/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.relayer.fi/v1/agents/{id}/status', 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://testnet.relayer.fi/v1/agents/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.relayer.fi/v1/agents/{id}/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.relayer.fi/v1/agents/{id}/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/agents/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyRuntime (HMAC)
Get agent status and kill-switch state (HMAC or API key)
<!-- relayer:auth-badge:start -->
> **Auth: agent HMAC or API key.** Accepts the agent's own HMAC credentials (runtime self-call) **or** the integrator's ApiKey (backend query on the agent's behalf).
<!-- relayer:auth-badge:end -->
Returns the agent's current lifecycle status and a `killSwitch` boolean (`true` iff status === 'killed'). Polled every 30s by `@relayerfi/agent-sdk` KillSwitch to gate payment operations. Accepts the agent's own HMAC headers or an integrator API key.
GET
/
agents
/
{id}
/
status
cURL (integrator)
curl https://api.relayer.fi/v1/agents/$AGENT_ID/status \
-H "Authorization: ApiKey $RELAYER_API_KEY"import { RelayerSDK } from "@relayerfi/agent-sdk";
const sdk = new RelayerSDK({ /* ... */ });
// The SDK polls this every 30s automatically via KillSwitch — you rarely
// hit it manually. Use the getter to read the cached state synchronously:
if (sdk.isKillSwitchActive) {
// skip payment operations
}
// Direct call:
const { data } = await sdk.http.get(`/v1/agents/${sdk.agentId}/status`);
// data.killSwitch (boolean) — true iff status === 'killed'
// data.status — full lifecycle: active | suspended | draining | killed | paused | pending_policiesimport requests
url = "https://testnet.relayer.fi/v1/agents/{id}/status"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.relayer.fi/v1/agents/{id}/status', 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://testnet.relayer.fi/v1/agents/{id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.relayer.fi/v1/agents/{id}/status"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.relayer.fi/v1/agents/{id}/status")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/agents/{id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyPath Parameters
Agent UUID
Response
Status payload: { agentId, killSwitch, status }
⌘I