# Submit URL

> Scan a URL to check for plagiarism, AI-generated content, and writing quality.

<RequestExample>

```bash title="cURL" icon="terminal"
curl --request PUT \
  --url https://api.copyleaks.com/v3/scans/submit/url/my-scan-123 \
  --header 'Authorization: Bearer YOUR_LOGIN_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "url": "https://copyleaks.com/ai-detector",
    "properties": {
      "webhooks": {
        "status": "https://my-server.com/webhook/{STATUS}"
      },
      "sandbox": true,
      "aiGeneratedText": { "detect": true }
    }
  }'
```

```python title="Python" icon="python"
from copyleaks.copyleaks import Copyleaks
from copyleaks.models.submit.document import UrlDocument
from copyleaks.models.submit.properties.scan_properties import ScanProperties
from copyleaks.models.submit.properties.submit_webhooks import SubmitWebhooks
from copyleaks.models.submit.properties.ai_generated_text import AIGeneratedText

auth_token = Copyleaks.login("your@email.address", "YOUR_API_KEY")

submission = UrlDocument("https://copyleaks.com/ai-detector")
submission.set_properties(ScanProperties(
    webhooks=SubmitWebhooks(status="https://my-server.com/webhook/{STATUS}"),
    sandbox=True,
    ai_generated_text=AIGeneratedText(detect=True),
))

Copyleaks.submit_url(auth_token, "my-scan-123", submission)
```

```javascript title="JavaScript" icon="square-js"
const { Copyleaks, CopyleaksURLSubmissionModel } = require('plagiarism-checker');

const copyleaks = new Copyleaks();
const auth = await copyleaks.loginAsync('YOUR_EMAIL', 'YOUR_API_KEY');

const submission = new CopyleaksURLSubmissionModel(
  'https://copyleaks.com/ai-detector',
  {
    sandbox: true,
    webhooks: { status: 'https://my-server.com/webhook/{STATUS}' },
    aiGeneratedText: { detect: true },
  }
);

await copyleaks.submitUrlAsync(auth, 'my-scan-123', submission);
```

```java title="Java" icon="java"
import com.copyleaks.sdk.api.Copyleaks;
import com.copyleaks.sdk.api.models.submissions.CopyleaksUrlSubmissionModel;
import com.copyleaks.sdk.api.models.submissions.properties.*;

String authToken = Copyleaks.login("your@email", "API_KEY");
SubmissionWebhooks hooks = new SubmissionWebhooks("https://my-server.com/webhook/{STATUS}");
SubmissionProperties props = new SubmissionProperties(hooks);
props.setSandbox(true);

SubmissionAIGeneratedText ai = new SubmissionAIGeneratedText();
ai.setDetect(true);
props.setAiGeneratedText(ai);

Copyleaks.submitUrl(authToken, "my-scan-123",
  new CopyleaksUrlSubmissionModel("https://copyleaks.com/ai-detector", props));
```

</RequestExample>

<ResponseExample>

```json 201 Created
{
  "scannedDocument": {
    "scanId": "scan-id23",
    "totalWords": 42,
    "totalExcluded": 0,
    "credits": 0,
    "expectedCredits": 1,
    "creationTime": "2025-08-05T06:46:31.501305Z",
    "metadata": {},
    "detectedLanguage": "en"
  },
  "results": {
    "score": { "aggregatedScore": 2.4, "identicalWords": 1 }
  },
  "status": 0,
  "developerPayload": ""
}
```

</ResponseExample>

Submit a URL to be scanned for plagiarism, AI-generated content, and writing analysis. Copyleaks will crawl the URL, extract its content, and scan it against its vast database and the internet.

Once submitted, the scan will be processed, and you can monitor its progress using webhooks or by checking the scan status.

<Warning>
**Authentication Required.** You need to login with a user and API key in order to access this method. Add this HTTP header to your request:

**Authorization: Bearer &lt;Your-Login-Token&gt;**
</Warning>

## Request

### Path Parameters

<ParamField path="scanId" type="string" required>
  A unique scan id provided by you. We recommend you use the same id in your database to represent the scan in the Copyleaks database. This will help you to debug incidents. Using the same ID for the same file will help you to avoid network problems that may lead to multiple scans for the same file. Learn more about [the criteria for creating a Scan ID](/concepts/management/choosing-scan-id).

  `>= 3 characters` `<= 36 characters`
</ParamField>

### Headers

```http
Content-Type: application/json
Authorization: Bearer YOUR_LOGIN_TOKEN
```

### Request Body

The request body is a JSON object containing the URL to scan and a `properties` object to configure the scan.

<ParamField body="url" type="string" required>
  The URL to be scanned. e.g., `https://copyleaks.com`
</ParamField>
<ParamField body="verb" type="string">
  Describes the HTTP method that is going to be executed on the specified url. Supported Values: `GET`, `POST`, `PUT`
</ParamField>
<ParamField body="headers" type="array[array]">
  Custom headers for the request. If specified, no Copyleaks headers are attached (otherwise defaults are used). Use `Set-Cookie` for cookies. Multiple values supported. Example: `[["header-key", "header-value"], ...]`
</ParamField>
<ParamField body="properties" type="object" required>
  Configuration options for the scan.
  <Expandable title="properties">
    <ScanSubmitProperties />
  </Expandable>
</ParamField>

<Note title="Integration Testing">
For testing purposes, use sandbox mode, which does not consume credits.
</Note>

## Responses

<Tabs>
  <Tab title="201">
    <Check>**201 Created** - The scan was successfully created and is now processing.</Check>

    ```json
    {
      "scannedDocument": {
        "scanId": "scan-id23",
        "totalWords": 42,
        "creationTime": "2025-08-05T06:46:31.501305Z",
        "detectedLanguage": "en"
      },
      "results": {
        "score": {
          "identicalWords": 1,
          "minorChangedWords": 0,
          "relatedMeaningWords": 0,
          "aggregatedScore": 2.4
        }
      },
      "status": 0,
      "developerPayload": ""
    }
    ```
  </Tab>
  <Tab title="400">
    <Warning>**400 Bad Request** - The url field is required.</Warning>
  </Tab>
  <Tab title="401">
    <Warning>**401 Unauthorized** - Authentication failed or API key is invalid.</Warning>
  </Tab>
  <Tab title="409">
    <Warning>**409 Conflict** - A scan with the same Id already exists in the system.</Warning>
  </Tab>
  <Tab title="429">
    <Warning>**429 Too Many Requests** - Rate limit exceeded.</Warning>
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
	<Card title="Check for AI-Generated Text" icon="robot" href="/guides/ai-detector/ai-text-detection/">Learn how to use Copyleaks to detect AI-generated text, including from the latest models.</Card>
	<Card title="Check for Plagiarism" icon="magnifying-glass" href="/guides/authenticity/detect-plagiarism-text/">Learn how to use Copyleaks to detect plagiarism by comparing your content against billions of online sources and internal documents.</Card>
	<Card title="Check Grammar and Writing Quality" icon="spell-check" href="/guides/writing/check-grammar/">Learn how to use Copyleaks to check for grammar mistakes and get suggestions for improving your writing.</Card>
</CardGroup>
