data.key is still returned._id → PUT with the full intended name, permissions, and expirePeriod → prove one allowed and one forbidden call.message is Update API key success. data includes _id, communityId, name, key, permissions, expirePeriod, createdAt, updatedAt.Create API key validation error.-style enum detail as create.key values.200. The secret does not change. List again and match _id. A key missing leaderboard still 403s GET /v1/leaderboards after this PUT unless you add that permission.| Status | When | Recovery |
|---|---|---|
400 invalid enum | Unknown permission | Use a community permission name. |
401 | Missing or invalid token | Replace the managing key. |
_id. Repeating the same PUT is a metadata overwrite, not a second secret._id.curl --location --request PUT 'https://adss-integration.returning.ai/apis/v1/communities//api-keys/' \
--header 'Content-Type: application/json' \
--data '{
"name": "Updated Slack Integration Key",
"permissions": [
"sendMessage",
"replyMessage",
"createUser",
"manageUser",
"getUserData",
"getUserStats",
"bulkUpdateUser",
"userFields"
],
"expirePeriod": 0,
"expireDate": "2025-12-15T23:59:59.000Z"
}'{
"meta": {
"status": "success",
"statusCode": 200
},
"message": "Update API key success.",
"data": {
"_id": "675b9876fedc432109876543",
"name": "Updated Slack Integration Key",
"key": "<apiKey>",
"permissions": [
"sendMessage",
"replyMessage",
"createUser",
"manageUser",
"getUserData",
"getUserStats",
"bulkUpdateUser",
"userFields"
],
"expirePeriod": 0,
"expireDate": "2025-12-15T23:59:59.000Z",
"updatedAt": "2024-12-15T15:45:22.789Z",
"createdAt": "2024-12-15T10:30:45.123Z"
}
}