API Keys
Permanently delete an API key from a community. This action cannot be undone and will
immediately revoke access for any applications using this API key.Bearer token authentication required
Only community owners and administrators can access this endpoint
User must have either COMMUNITY_OWNER
or COMMUNITY_ADMIN
permissions for the specified community
Permanently removes API key from the system
Immediately revokes all access using this key
Returns deleted API key details for confirmation
Emits real-time event to community members
Clears all cached data related to the API key
Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
communityId
string <objectId>
requiredThe unique identifier of the community
Example:675a1234bcde567890123456
apiKeyId
string <objectId>
requiredThe unique identifier of the API key to delete
Example:675b9876fedc432109876543
Request samples
curl --location --request DELETE 'https://application.returning.ai/apis/v1/communities//api-keys/'
Responses
application/json
Delete API key successful
Success message for the operation
The unique identifier of the deleted API key
The name of the deleted API key
The API key value (partially masked for security)
Array of permissions that were granted to the API key
The expiration period in days (0 for no expiration)
expireDate
string <date-time>
optionalThe expiration date of the API key
updatedAt
string <date-time>
optionalWhen the API key was last updated
createdAt
string <date-time>
optionalWhen the API key was created
{
"meta": {
"status": "success",
"statusCode": 200
},
"message": "Delete API key success.",
"data": {
"_id": "675b9876fedc432109876543",
"name": "Slack Integration API Key",
"key": "8f3e4d5c6b7a9e2f1a4b7c8d5e9f2a6b3c7e8f1a4b5c9d2e6f8a1b4c7e9f2a5b8c",
"permissions": [
"sendMessage",
"replyMessage",
"createUser",
"manageUser",
"getUserData",
"getUserStats",
"bulkUpdateUser",
"userFields"
],
"expirePeriod": 365,
"expireDate": "2025-12-15T23:59:59.000Z",
"updatedAt": "2024-12-15T10:30:45.123Z",
"createdAt": "2024-01-15T09:15:22.456Z"
}
}
Modified at 2025-07-07 16:49:45