GET
/apikeysGet API keys
Returns a list of API keys. For security reasons, hashed keys are omitted from the response. API keys can be used as an alternative to JWT tokens for authentication
offsetintegeroptional
Number of items to skip from the beginning of the result set. Used for pagination in combination with the limit parameter
limitintegeroptional
The maximum number of items to return. Max value is 500, default is 100
orderstringoptional
Ordering API keys by id. Default ASC
200successful operation
adminstringoptional
admin associated with this API key. If empty and the scope is "admin scope" the key can impersonate any admin
created_atintegeroptional
creation time as unix timestamp in milliseconds
descriptionstringoptional
optional description
expires_atintegeroptional
expiration time as unix timestamp in milliseconds. Once set, the expiration date cannot be extended. It can only be shortened.
idstringoptional
unique key identifier
keystringoptional
We store the hash of the key. This is just like a password. For security reasons this field is omitted when you search/get API keys
last_use_atintegeroptional
last use time as unix timestamp in milliseconds. It is saved at most once every 10 minutes
namestringoptional
User friendly key name
scopeintegeroptional
Options:
* `1` - admin scope. The API key will be used to impersonate an SFTPGo admin
* `2` - user scope. The API key will be used to impersonate an SFTPGo user
updated_atintegeroptional
last update time as unix timestamp in milliseconds
userstringoptional
username associated with this API key. If empty and the scope is "user scope" the key can impersonate any user
400Bad Request
errorstringoptional
error description if any
messagestringoptional
message, can be empty
401Unauthorized
errorstringoptional
error description if any
messagestringoptional
message, can be empty
403Forbidden
errorstringoptional
error description if any
messagestringoptional
message, can be empty
500Internal Server Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty
defaultUnexpected Error
errorstringoptional
error description if any
messagestringoptional
message, can be empty
Error handling
A 400 is returned: Bad Request. A 401 is returned: Unauthorized. A 403 is returned: Forbidden. A 500 is returned: Internal Server Error. Any other status is an error: Unexpected Error.