Returning.AI
  1. API Keys
Returning.AI
  • Returning.AI
    • Auth
      • register
      • verify email
      • login
      • secure auth
    • Server
      • create new server
      • get my servers
      • update server
      • role list of server
      • channel list of server
    • Role
      • create new role
      • update role
      • delete role
      • add role to a user on a server
      • remove role from a user on a server
      • get role list of user on a server
    • Channel
      • get channels list
      • create new channel
      • update channel
      • delete channel
    • Badge
      • get badges list
      • create new badge
      • update badge
      • delete badge
      • award badge to user
      • remove badge from user
    • Integration
      • users
        • create new user
        • manage user
        • user data
        • gamification stats
        • user bulk update
        • user bulk import
      • Messages
        • Send Message
        • Reply Message
        • React Message
      • Channels
        • Get Channels List
      • User Field Histories
        • Create user field history
        • Get user field histories
      • User Fields
        • Create user field
        • Get all user fields for a community
        • Delete user field
        • Update user field
        • Get specific user field
      • Users
        • Get user
    • Application
      • API Keys
        • Create API key
          POST
        • Read API keys
          GET
        • Delete API key
          DELETE
        • Update API key
          PUT
      • Users
        • Get user
      • Community Users
        • Get community users
        • Get user
      • User Fields
        • Get all user fields for a community
        • Get specific user field
        • Create user field
        • Update user field
        • Delete user field
      • User Field Histories
        • Get all user field histories in a community
        • Get user field histories for a specific field
        • Get user field histories for a specific user
        • Get user field histories of specific user field and user
        • Create user field history for specific user
  1. API Keys

Delete API key

DELETE
/apis/v1/communities/{communityId}/api-keys/{apiKeyId}
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.
Security Requirements:
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
Key Features:
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

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
communityId
string <objectId>
required
The unique identifier of the community
Example:
675a1234bcde567890123456
apiKeyId
string <objectId>
required
The unique identifier of the API key to delete
Example:
675b9876fedc432109876543

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://application.returning.ai/apis/v1/communities//api-keys/'

Responses

🟢200OK
application/json
Delete API key successful
Body
meta
object 
optional
status
string 
optional
Response status
statusCode
number 
optional
HTTP status code
message
string 
optional
Success message for the operation
data
object 
optional
_id
string 
optional
The unique identifier of the deleted API key
name
string 
optional
The name of the deleted API key
key
string 
optional
The API key value (partially masked for security)
permissions
array[string]
optional
Array of permissions that were granted to the API key
expirePeriod
number 
optional
The expiration period in days (0 for no expiration)
expireDate
string <date-time>
optional
The expiration date of the API key
updatedAt
string <date-time>
optional
When the API key was last updated
createdAt
string <date-time>
optional
When the API key was created
Examples
{
    "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"
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🔴500Server Error
Modified at 2025-07-07 16:49:45
Previous
Read API keys
Next
Update API key