curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"apiKey": "<string>"
}
'Create a new API key
curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/api-keys \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"apiKey": "<string>"
}
'{
"name": "Android Production App"
}
{
"id": "afd8012b-d81e-41c6-92cd-eed0c6cb3676",
"name": "Android Production App",
"key": "7zvFJw9L0qEoYdKx2mBt1sLpZj3nX7gW",
"status": "active",
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-20T10:00:00Z"
}
{
"error": {
"code": "APIKEY_NAME_ALREADY_EXISTS",
"message": "API key with name \"Android Production App\" already exists"
}
}
curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/api-keys" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Android Production App"
}'