Developer API

Code Plagiarism
Detection API

Build plagiarism detection into your apps. Check code against 20+ billion sources.

const response = await fetch('https://codequiry.com/api/v1/check', { method: 'POST', headers: { 'apikey': 'YOUR_API_KEY' }, body: formData }); // Check created!
UPDATE CHECK API

Update Check Details

Modify the name or programming language of an existing plagiarism check. Useful for correcting mistakes or updating check metadata before starting analysis.

API Endpoint

POST https://codequiry.com/api/v1/check/update

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 unique identifier of the check to update
name String Optional New name for the check (minimum 3 characters)
language Integer Optional New programming language ID (see Languages API)
Note: At least one of name or language must be provided. You can update both in a single request.

Success Response

HTTP Status: 200 OK

{
    "success": true,
    "message": "Check updated successfully",
    "check": {
        "id": 2810,
        "name": "Python Assignment - Week 6 (Updated)",
        "status_id": 1,
        "language_id": 14,
        "created_at": "2024-01-15 14:30:22",
        "updated_at": "2024-01-16 09:15:33"
    }
}
        
JSON Response
Response Fields
  • success — Boolean indicating the update was successful
  • message — Confirmation message
  • check — The updated check object with all current values
  • check.id — Unique check identifier
  • check.name — Updated check name
  • check.status_id — Current status of the check
  • check.language_id — Current language ID

Error Responses

401 Unauthorized

Invalid or missing API key.

404 Not Found

The specified check does not exist or does not belong to your account.

422 Validation Error

Invalid parameter values. Name must be at least 3 characters, language must be a valid language ID.

Code Examples

cURL
curl -X POST "https://codequiry.com/api/v1/check/update" \
  -H "apikey: YOUR_API_KEY_HERE" \
  -d "check_id=2810" \
  -d "name=Python Assignment - Week 6 (Updated)" \
  -d "language=14"
        
cURL
JavaScript
async function updateCheck(checkId, updates) {
    const response = await fetch('https://codequiry.com/api/v1/check/update', {
        method: 'POST',
        headers: {
            'apikey': 'YOUR_API_KEY_HERE',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({ check_id: checkId, ...updates })
    });

    const data = await response.json();

    if (data.success) {
        console.log(`Updated: ${data.check.name}`);
    }
    return data;
}

// Update name only
await updateCheck(2810, { name: 'New Assignment Name' });

// Update language only
await updateCheck(2810, { language: 39 }); // Switch to JavaScript

// Update both
await updateCheck(2810, { name: 'JS Project', language: 39 });
        
JavaScript