Skip to content

Update a URL

PATCH
/api/v1/urls/{id}
Code sample: cURL
curl -X PATCH 'https://api.justcrawl.io/api/v1/urls/00000000-0000-0000-0000-000000000001' \
-H 'Authorization: Bearer $JUSTCRAWL_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"priority": 10}'

Updates the target address, the scheduling priority, or both. At least one of url or priority must be present. Only the fields you send are changed, and only those fields come back in the response.

Changing url re-validates the address and is subject to the same per-org uniqueness constraint as POST /api/v1/urls — reusing an address already tracked by the org returns 409. To disable a URL rather than edit it, use PATCH /api/v1/urls/{id}/toggle.

id
required
string format: uuid

URL item ID.

Media typeapplication/json
object
>= 1 properties
url

New target address. Must be a valid, scrapable URL.

string format: uri
priority

Scheduling priority; higher values are dispatched first.

integer
Examplegenerated
{
"url": "https://example.com",
"priority": 1
}

The fields that were updated, echoed back with the URL’s ID.

Media typeapplication/json
object
id
string format: uuid
url
string format: uri
priority
integer
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"url": "https://example.com",
"priority": 1
}

Neither field supplied, or one of them failed validation.

Missing or invalid authentication token

Media typeapplication/json
object
error
string
Example
{
"error": "Missing or invalid authentication token"
}

Insufficient permissions for this operation

Media typeapplication/json
object
error
string
Example
{
"error": "No organization. Complete onboarding first."
}

URL not found.

Another URL in this org already uses that address.

Unexpected server error. Logs and PostHog $exception capture

Media typeapplication/json
object
error
string
Example
{
"error": "Something went wrong"
}