API Reference
Machines
Machines represent registered agents or servers linked to your account. Use these endpoints to list, inspect, and revoke machines.
GET
/api/machine/listList all machines linked to the authenticated user's account.
Authentication
API key, Session cookie, or Machine JWT
Response
{
"machines": [
{
"machineId": "m_8f3a4b2c",
"machineName": "my-laptop",
"createdAt": "2026-02-10T08:00:00.000Z",
"lastRequestAt": "2026-02-17T14:30:00.000Z"
},
{
"machineId": "m_9e5d6c1a",
"machineName": "ci-runner",
"createdAt": "2026-02-12T10:00:00.000Z",
"lastRequestAt": "2026-02-17T12:00:00.000Z"
}
]
}Examples
curl
curl https://keychains.dev/api/machine/list \ -H "Authorization: Bearer kc_your_api_key"
Node.js
const res = await fetch("https://keychains.dev/api/machine/list", {
headers: { Authorization: "Bearer kc_your_api_key" },
});
const { machines } = await res.json();GET
/api/machine/:machineIdGet details of a specific machine by its ID. Only accessible to the machine's owner.
Authentication
API key, Session cookie, or Machine JWT
Response
{
"machineId": "m_8f3a4b2c",
"machineName": "my-laptop",
"createdAt": "2026-02-10T08:00:00.000Z",
"lastRequestAt": "2026-02-17T14:30:00.000Z",
"revokedAt": null
}Examples
curl
curl https://keychains.dev/api/machine/m_8f3a4b2c \ -H "Authorization: Bearer kc_your_api_key"
Node.js
const res = await fetch("https://keychains.dev/api/machine/m_8f3a4b2c", {
headers: { Authorization: "Bearer kc_your_api_key" },
});
const machine = await res.json();DELETE
/api/machine/:machineIdRevoke and remove a machine from your account. This permanently deletes the machine's keys and challenge data. All associated permission requests are also revoked.
Authentication
API key, Session cookie, or Machine JWT
Response
{
"success": true
}Examples
curl
curl -X DELETE https://keychains.dev/api/machine/m_8f3a4b2c \ -H "Authorization: Bearer kc_your_api_key"
Node.js
await fetch("https://keychains.dev/api/machine/m_8f3a4b2c", {
method: "DELETE",
headers: { Authorization: "Bearer kc_your_api_key" },
});