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

# Update File

> Update file metadata

<ParamField path="PATCH" type="endpoint">
  /api/v1/files/:id
</ParamField>

Update metadata for an existing file in Forerunner.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the file to update
</ParamField>

## Body Parameters

<ParamField body="externalDocumentURL" type="string" required>
  A valid URL pointing to the document in an external system
</ParamField>

## Response

<ResponseField name="file" type="object">
  Contains the updated file metadata when successful, or `null` if the update fails.

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      UUID uniquely identifying the file
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="errors" type="array">
  Array of error objects. See [Errors](/developers/api/overview#errors).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://app.withforerunner.com/api/v1/files/f8a3b2c1-d4e5-6789-abcd-ef0123456789 \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"externalDocumentURL": "https://dms.example.com/docs/123"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "file": {
      "id": "f8a3b2c1-d4e5-6789-abcd-ef0123456789"
    },
    "errors": []
  }
  ```
</ResponseExample>
