Generate API key
POST
/admin/api-keys
const url = 'https://shoehorn.example.com/api/v1/admin/api-keys';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","scopes":["catalog"],"expires_at":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://shoehorn.example.com/api/v1/admin/api-keys \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "scopes": [ "catalog" ], "expires_at": "2026-04-15T12:00:00Z" }'Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
scopes
required
Array<string>
expires_at
string format: date-time
Responses
Section titled “ Responses ”API key generated (token shown only once)
Media type application/json
object
id
string
name
string
token
Full token (shp_svc_…) - shown only at creation
string
scopes
Array<string>
Example generated
{ "id": "example", "name": "example", "token": "example", "scopes": [ "example" ]}