curl --request POST \
--url https://api.cashful.africa/api/canary/authentication/api-key/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My API Key",
"expiresIn": 3600,
"prefix": "pk_live_",
"metadata": {
"env": "production"
}
}
'{
"apiKey": {
"id": "key_123",
"name": "My API Key",
"prefix": "pk_live_"
}
}Create a new API key
curl --request POST \
--url https://api.cashful.africa/api/canary/authentication/api-key/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My API Key",
"expiresIn": 3600,
"prefix": "pk_live_",
"metadata": {
"env": "production"
}
}
'{
"apiKey": {
"id": "key_123",
"name": "My API Key",
"prefix": "pk_live_"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
API key created successfully
API key created successfully
Show child attributes
{
"id": "key_123",
"name": "My API Key",
"prefix": "pk_live_"
}