Create API key
POST
/api/v1/auth/api-keys
const url = 'https://app.ayna.com/api/v1/auth/api-keys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","expires_in_days":1}'};
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://app.ayna.com/api/v1/auth/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "expires_in_days": 1 }'Create a new API key. The key value is only shown once.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Created
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}