Mint an API key
POST
/v1/api-keys
const url = 'https://api.fromenance.com/v1/api-keys';const options = { method: 'POST', headers: { cookie: 'fromenance.session_token=<fromenance.session_token>', 'Content-Type': 'application/json' }, body: '{"name":"example","mode":"live","scopes":["register"]}'};
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://api.fromenance.com/v1/api-keys \ --header 'Content-Type: application/json' \ --cookie fromenance.session_token=<fromenance.session_token> \ --data '{ "name": "example", "mode": "live", "scopes": [ "register" ] }'The secret is returned once and never stored. Test keys write to a sandbox partition and never send replies to real addresses.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
name
required
string
mode
string
scopes
Array<string>
Responses
Section titled “ Responses ”Key
Media typeapplication/json
object
id
required
string
name
required
string
prefix
required
string
mode
required
string
scopes
required
Array<string>
last_used_at
required
string | null
revoked_at
required
string | null
created_at
required
string
secret
required
string
Example
{ "mode": "live", "scopes": [ "register" ]}