> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weav.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manually trigger URL resync

> Requires a token with the external-api:write ability. id string required URL training data UUID Format: uuid . cURL JavaScript Python PHP cURL JavaScript Python PHP 200 OK 404 Not Found 422 Unprocessable Content 200 OK 404 Not Found 422 Unprocessable Content 401 Unauthorized training_data_id…

```http
POST https://api.weav.com/v1/training-data/{id}/resync-now
```

Requires a token with the `external-api:write` ability.

## Path parameters

<ParamField path="id" type="string" required>
URL training data UUID

Format: `uuid`.
</ParamField>

## Request

<CodeGroup>

```bash cURL
curl --request POST \
  --url 'https://api.weav.com/v1/training-data/{id}/resync-now' \
  --header "Authorization: Bearer ${WEAV_API_TOKEN}"
```

```js JavaScript
const response = await fetch("https://api.weav.com/v1/training-data/{id}/resync-now", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.WEAV_API_TOKEN}`
  }
});
console.log(await response.json());
```

```python Python
import os
import requests

headers = {"Authorization": f"Bearer {os.environ['WEAV_API_TOKEN']}"}
response = requests.post("https://api.weav.com/v1/training-data/{id}/resync-now", headers=headers)
print(response.json())
```

```php PHP
use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('POST', 'https://api.weav.com/v1/training-data/{id}/resync-now', [
    'headers' => ['Authorization' => 'Bearer '.getenv('WEAV_API_TOKEN')],
]);
echo $response->getBody();
```

</CodeGroup>

## Response

<CodeGroup>

```json 200 OK
{
    "success": true,
    "message": "string",
    "data": {
        "training_data_id": "9b2f6c1e-3d4a-4f5b-8c7d-1e2f3a4b5c6d",
        "urls_count": 3
    }
}
```

```json 404 Not Found
{
    "error": "Error message",
    "code": "ERROR_CODE",
    "errors": {}
}
```

```json 422 Unprocessable Content
{
    "error": "Error message",
    "code": "ERROR_CODE",
    "errors": {}
}
```

</CodeGroup>

- `401` Unauthorized

## Response fields

<ParamField body="training_data_id" type="string">
Format: `uuid`.
</ParamField>

<ParamField body="urls_count" type="integer">

</ParamField>

---

This knowledge base is built and hosted on [Weav](https://weav.com).
