Code Plagiarism
Detection API
Build plagiarism detection into your applications with our powerful REST API. Detect copied code across 20+ billion sources with industry-leading accuracy.
API Playground
Not ConnectedConnect your API key to test endpoints
Delete Submission from Check
Remove a specific file submission from an existing plagiarism check. Useful for cleaning up failed uploads or removing unwanted files before analysis.
API Endpoint
Authentication
Include your API key in the request header:
apikey: YOUR_API_KEY_HERE
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
check_id |
integer | Required | The ID of the check containing the submission to delete |
submission_id |
integer | Required | The ID of the submission to delete |
Success Response
HTTP Status: 200 OK
{
"success": true,
"message": "The submission has been deleted successfully."
}
Error Responses
Invalid or missing API key.
Attempting to delete from a demo assignment without admin privileges.
Invalid check_id or submission_id parameters.
Failed to delete the submission due to a server error.
Code Examples
Python
import requests
API_KEY = "your_api_key_here"
API_URL = "https://codequiry.com/api/v1/check/deleteSubmission"
headers = {
"apikey": API_KEY
}
data = {
"check_id": 12345,
"submission_id": 67890
}
try:
response = requests.post(API_URL, headers=headers, data=data)
response.raise_for_status()
result = response.json()
if result["success"]:
print("✅ Submission deleted successfully!")
print(f"Message: {result['message']}")
else:
print(f"❌ Error: {result.get('error', 'Unknown error')}")
except requests.exceptions.RequestException as e:
print(f"❌ Request failed: {e}")
Node.js
const axios = require('axios');
const API_KEY = 'your_api_key_here';
const API_URL = 'https://codequiry.com/api/v1/check/deleteSubmission';
async function deleteSubmission() {
try {
const response = await axios.post(API_URL, {
check_id: 12345,
submission_id: 67890
}, {
headers: {
'apikey': API_KEY
}
});
const result = response.data;
if (result.success) {
console.log('✅ Submission deleted successfully!');
console.log(`Message: ${result.message}`);
} else {
console.error(`❌ Error: ${result.error}`);
}
} catch (error) {
if (error.response) {
console.error(`❌ API Error: ${error.response.data.error || error.response.statusText}`);
} else {
console.error(`❌ Request failed: ${error.message}`);
}
}
}
deleteSubmission();
PHP
<?php
$apiKey = 'your_api_key_here';
$apiUrl = 'https://codequiry.com/api/v1/check/deleteSubmission';
$data = [
'check_id' => 12345,
'submission_id' => 67890
];
// Initialize cURL
$ch = curl_init($apiUrl);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"apikey: $apiKey"
]
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);
// Handle response
if ($error) {
echo "❌ Request failed: $error\n";
exit(1);
}
$result = json_decode($response, true);
if ($httpCode === 200 && $result['success']) {
echo "✅ Submission deleted successfully!\n";
echo "Message: {$result['message']}\n";
} else {
echo "❌ Error: " . ($result['error'] ?? 'Unknown error') . "\n";
}
?>
cURL
curl -X POST "https://codequiry.com/api/v1/check/deleteSubmission" \
-H "apikey: your_api_key_here" \
-d "check_id=12345" \
-d "submission_id=67890"
Important Notes
Irreversible Action
Deleting a submission is permanent and cannot be undone. Make sure you want to remove the file before calling this endpoint.
Check Status
You can delete submissions from checks that are still in progress. However, once a check has started analysis (status 6 or 7), the results may still reflect the deleted submission until the check is re-run.
Ownership Verification
The API automatically verifies that you own the check and submission. You can only delete submissions from checks that belong to your account.