curl --request POST \
--url https://api.openagent.to/api/v1/api-keys/validate \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "oa_pk_EXAMPLE_NOT_A_REAL_KEY",
"apiSecret": "oa_sk_EXAMPLE_NOT_A_REAL_SECRET"
}
'import requests
url = "https://api.openagent.to/api/v1/api-keys/validate"
payload = {
"apiKey": "oa_pk_EXAMPLE_NOT_A_REAL_KEY",
"apiSecret": "oa_sk_EXAMPLE_NOT_A_REAL_SECRET"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: 'oa_pk_EXAMPLE_NOT_A_REAL_KEY',
apiSecret: 'oa_sk_EXAMPLE_NOT_A_REAL_SECRET'
})
};
fetch('https://api.openagent.to/api/v1/api-keys/validate', 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.openagent.to/api/v1/api-keys/validate",
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([
'apiKey' => 'oa_pk_EXAMPLE_NOT_A_REAL_KEY',
'apiSecret' => 'oa_sk_EXAMPLE_NOT_A_REAL_SECRET'
]),
CURLOPT_HTTPHEADER => [
"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.openagent.to/api/v1/api-keys/validate"
payload := strings.NewReader("{\n \"apiKey\": \"oa_pk_EXAMPLE_NOT_A_REAL_KEY\",\n \"apiSecret\": \"oa_sk_EXAMPLE_NOT_A_REAL_SECRET\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.openagent.to/api/v1/api-keys/validate")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"oa_pk_EXAMPLE_NOT_A_REAL_KEY\",\n \"apiSecret\": \"oa_sk_EXAMPLE_NOT_A_REAL_SECRET\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openagent.to/api/v1/api-keys/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"oa_pk_EXAMPLE_NOT_A_REAL_KEY\",\n \"apiSecret\": \"oa_sk_EXAMPLE_NOT_A_REAL_SECRET\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"appName": "Acme Integration",
"keyName": "CI runner",
"status": "active",
"valid": true
},
"message": "Success",
"meta": {
"timestamp": "2026-09-01T09:15:32.104Z",
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10"
},
"statusCode": 200,
"success": true
}{
"data": {
"valid": false
},
"message": "API_KEY_INVALID_CREDENTIALS",
"meta": {
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10",
"timestamp": "2026-09-01T09:15:32.104Z"
},
"statusCode": 401,
"success": false
}{
"error": {
"code": "Validation error",
"details": [
{
"field": "email",
"message": "Invalid email format",
"allowedValues": [
"<string>"
]
}
]
},
"message": "Validation error",
"meta": {
"timestamp": "2026-09-01T09:15:32.104Z",
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10"
},
"statusCode": 422,
"success": false
}{
"error": {
"code": "Validation error",
"details": [
{
"field": "email",
"message": "Invalid email format",
"allowedValues": [
"<string>"
]
}
]
},
"message": "Validation error",
"meta": {
"timestamp": "2026-09-01T09:15:32.104Z",
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10"
},
"statusCode": 422,
"success": false
}Check an API key and secret
Verifies an apiKey / apiSecret pair and reports whether it is currently usable, which is how an integrator confirms a credential before wiring it into a webhook consumer. Unauthenticated — the credential being checked is the only thing it needs. A successful check updates the key’s lastUsedAt, so this endpoint is not read-only and is visible in the key’s audit trail. The 401 is not the standard error envelope. An unusable credential is reported as data: the body is the success envelope with success: false and data.valid: false, and there is no error.code to branch on. Read data.valid, not the envelope. The 401 is byte-identical for an unknown key, a wrong secret and a disabled key — deliberately, so it cannot be used to discover which keys exist.
curl --request POST \
--url https://api.openagent.to/api/v1/api-keys/validate \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "oa_pk_EXAMPLE_NOT_A_REAL_KEY",
"apiSecret": "oa_sk_EXAMPLE_NOT_A_REAL_SECRET"
}
'import requests
url = "https://api.openagent.to/api/v1/api-keys/validate"
payload = {
"apiKey": "oa_pk_EXAMPLE_NOT_A_REAL_KEY",
"apiSecret": "oa_sk_EXAMPLE_NOT_A_REAL_SECRET"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: 'oa_pk_EXAMPLE_NOT_A_REAL_KEY',
apiSecret: 'oa_sk_EXAMPLE_NOT_A_REAL_SECRET'
})
};
fetch('https://api.openagent.to/api/v1/api-keys/validate', 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.openagent.to/api/v1/api-keys/validate",
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([
'apiKey' => 'oa_pk_EXAMPLE_NOT_A_REAL_KEY',
'apiSecret' => 'oa_sk_EXAMPLE_NOT_A_REAL_SECRET'
]),
CURLOPT_HTTPHEADER => [
"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.openagent.to/api/v1/api-keys/validate"
payload := strings.NewReader("{\n \"apiKey\": \"oa_pk_EXAMPLE_NOT_A_REAL_KEY\",\n \"apiSecret\": \"oa_sk_EXAMPLE_NOT_A_REAL_SECRET\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.openagent.to/api/v1/api-keys/validate")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"oa_pk_EXAMPLE_NOT_A_REAL_KEY\",\n \"apiSecret\": \"oa_sk_EXAMPLE_NOT_A_REAL_SECRET\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openagent.to/api/v1/api-keys/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"oa_pk_EXAMPLE_NOT_A_REAL_KEY\",\n \"apiSecret\": \"oa_sk_EXAMPLE_NOT_A_REAL_SECRET\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"appName": "Acme Integration",
"keyName": "CI runner",
"status": "active",
"valid": true
},
"message": "Success",
"meta": {
"timestamp": "2026-09-01T09:15:32.104Z",
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10"
},
"statusCode": 200,
"success": true
}{
"data": {
"valid": false
},
"message": "API_KEY_INVALID_CREDENTIALS",
"meta": {
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10",
"timestamp": "2026-09-01T09:15:32.104Z"
},
"statusCode": 401,
"success": false
}{
"error": {
"code": "Validation error",
"details": [
{
"field": "email",
"message": "Invalid email format",
"allowedValues": [
"<string>"
]
}
]
},
"message": "Validation error",
"meta": {
"timestamp": "2026-09-01T09:15:32.104Z",
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10"
},
"statusCode": 422,
"success": false
}{
"error": {
"code": "Validation error",
"details": [
{
"field": "email",
"message": "Invalid email format",
"allowedValues": [
"<string>"
]
}
]
},
"message": "Validation error",
"meta": {
"timestamp": "2026-09-01T09:15:32.104Z",
"requestId": "3f1c9d2e-6b7a-4f18-9c53-0a2b6d4e8f10"
},
"statusCode": 422,
"success": false
}Body
Response
The credential is valid and active
Standard success envelope. The endpoint payload is in data.

