post https://api.aeronpay.in/api/serviceapi-prod/api/ai/delete-response
Delete Response
The Delete Response API allows you to delete a previously generated AI response using its context token. This is useful for cleaning up responses that are no longer needed or for managing response storage.
Endpoint
POST https://api.aeronpay.co.in/payal-api/api/serviceapi-prod/api/ai/delete-response
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
client_referenceId | string | Yes | Unique client reference ID (max 30 characters) |
context_token | string | Yes | Unique token received in the response of Create API |
Request Example
{
"client_referenceId": "AI5687654362456",
"context_token": "apay_68946e7042d481a3829228037001395f08ecc0bf999ba6b7"
}Response Structure
Success Response (200)
{
"status": "SUCCESS",
"status_code": "200",
"message": "Response deleted for context_token: apay_68946e7042d481a3829228037001395f08ecc0bf999ba6b7"
}| Field | Type | Description |
|---|---|---|
status | string | Status of the operation (SUCCESS/FAILED) |
status_code | string | HTTP status code as string |
message | string | Confirmation message including the deleted context token |
Implementation Notes
- The
client_referenceIdshould be unique for each request and must not exceed 30 characters - The
context_tokenmust be a valid token obtained from a previous AI API response
Use Cases
- Cleanup: Remove responses that are no longer needed to manage storage
- Privacy: Delete sensitive responses after processing
- Resource Management: Clear old responses to optimize system performance
Error Handling
If the deletion fails, you may receive error responses such as:
- Invalid context token
- Token already deleted
- Missing required parameters
Make sure to handle these scenarios appropriately in your implementation.