GET
/api/setup-keysList setup keys
Lists all setup keys. Use this endpoint to retrieve the available setup keys and review their names, usage, validity, and assigned groups.
200Returns an array of setup key objects with key details, including their identifiers, names, expiration, usage, validity, and assigned groups.
allow_extra_dns_labelsbooleanrequired
Allow extra DNS labels to be added to the peer
auto_groupsarray<string>required
List of group IDs to auto-assign to peers registered with this key
ephemeralbooleanrequired
Indicate that the peer will be ephemeral or not
expiresstringrequired
Setup Key expiration date
idstringrequired
Setup Key ID
last_usedstringrequired
Setup key last usage date
namestringrequired
Setup key name identifier
revokedbooleanrequired
Setup key revocation status
statestringrequired
Setup key status, "valid", "overused","expired" or "revoked"
typestringrequired
Setup key type, one-off for single time usage and reusable
updated_atstringrequired
Setup key last update date
usage_limitintegerrequired
A number of times this key can be used. The value of 0 indicates the unlimited usage.
used_timesintegerrequired
Usage count of setup key
validbooleanrequired
Setup key validity status
keystringrequired
Setup Key as secret
400Returned when the request is invalid.
401Returned when the request lacks required authentication.
403Returned when the request is forbidden.
500Returned when an internal server error occurs.
Error handling
A 400 indicates an invalid request, a 401 indicates missing authentication, a 403 indicates insufficient permission, and a 500 indicates an internal server error. Send valid credentials in the Authorization header to authenticate the request.