> ## 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

> Updates the metadata on an existing file. `externalDocumentURL` is the only field you can change, and it is required. The file's contents cannot be replaced; upload a new file instead.



## OpenAPI

````yaml /developers/v1/openapi.json patch /api/v1/files/{id}
openapi: 3.1.0
info:
  title: Forerunner Integration API v1
  version: 1.0.0
  description: >-
    Read and write floodplain data in Forerunner. This is the v1 contract; each
    version is documented separately and evolves on its own.


    v1 is the current version. It covers files, properties, records, and SI/SD,
    and is the one to build against. Its record endpoints handle `Log` records
    only; use v2 for any other record type.


    Every request needs an `Authorization: Bearer <your API key>` header.


    List endpoints return 25 results per page; page through them with `page` and
    read `pageInfo` for the totals. Every JSON response carries an `errors`
    array, empty when the request succeeded; the `401`, `403`, and `429`
    responses are plain text or HTML instead.


    Develop against the staging server, which is a separate account with
    separate API keys and separate data.


    Requests are rate limited per IP at the CDN. A request over the limit is
    answered with a `429` and an HTML body, not the JSON error shape.
servers:
  - url: https://app.withforerunner.com
    description: Production
  - url: https://app.staging.withforerunner.com
    description: Staging, for development and testing
security:
  - bearerAuth: []
tags:
  - name: Files
    description: >-
      Upload, retrieve, and update documents such as Elevation Certificates and
      permits.
  - name: Properties
    description: Query the properties in your account.
  - name: Records
    description: >-
      Read, create, update, and delete `Log` records. Other record types are
      available on v2.
  - name: SI/SD
    description: >-
      Track substantial improvement and substantial damage against your
      community's thresholds.
paths:
  /api/v1/files/{id}:
    patch:
      tags:
        - Files
      summary: Update File
      description: >-
        Updates the metadata on an existing file. `externalDocumentURL` is the
        only field you can change, and it is required. The file's contents
        cannot be replaced; upload a new file instead.
      operationId: updateFile
      parameters:
        - name: id
          in: path
          required: true
          description: UUID of the resource in Forerunner.
          schema:
            type: string
            format: uuid
          example: f8a3b2c1-d4e5-4789-abcd-ef0123456789
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                externalDocumentURL:
                  type: string
                  format: uri
                  description: >-
                    Link to display this file in your system. Public website
                    users will be directed here when viewing the file.
                  example: https://permits.example.gov/documents/EC-2024-0417
              required:
                - externalDocumentURL
      responses:
        '200':
          description: Success. `errors` is empty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1FilePatchResponse'
              example:
                errors: []
                file:
                  id: f8a3b2c1-d4e5-4789-abcd-ef0123456789
        '400':
          description: The request failed validation. `errors` names each field at fault.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/V1FilePatchResponse'
                  - $ref: '#/components/schemas/APIResponse'
              example:
                errors:
                  - message: Invalid UUID format for id parameter
                    field: id
                file: null
        '401':
          description: >-
            Missing or invalid API key. The body is plain text, not the JSON
            error shape.
        '403':
          description: >-
            Blocked by our web application firewall, which answers with an HTML
            body rather than the JSON error shape. Most often caused by a client
            sending a `PostmanRuntime`, `python-requests`, or `HeadlessChrome`
            `User-Agent`; clear that header and retry.
        '429':
          description: >-
            Too many requests from your IP. Rate limiting is applied at the CDN,
            so the body is HTML rather than the JSON error shape. Back off and
            retry.
components:
  schemas:
    V1FilePatchResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/APIError'
          description: >-
            Empty when the request succeeded. Otherwise one entry per failure,
            and the resource fields on the response are empty: `null` for single
            resources, `[]` for lists, with `pageInfo` omitted.
          example: []
        file:
          anyOf:
            - $ref: '#/components/schemas/V1FileReference'
            - type: 'null'
          description: The updated file. Null when the update failed.
      required:
        - errors
        - file
      additionalProperties: false
    APIResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/APIError'
          description: >-
            Empty when the request succeeded. Otherwise one entry per failure,
            and the resource fields on the response are empty: `null` for single
            resources, `[]` for lists, with `pageInfo` omitted.
          example: []
      required:
        - errors
      additionalProperties: false
      description: Every response carries an `errors` array alongside its resource fields.
    APIError:
      type: object
      properties:
        message:
          type: string
          description: Human-readable description of what went wrong.
          example: Required
        field:
          type: string
          description: The request field that caused the error, as a dot-separated path.
          example: data.type
      required:
        - message
        - field
      additionalProperties: false
      description: A single validation or processing failure.
    V1FileReference:
      type: object
      properties:
        id:
          type: string
          description: UUID of the file.
          example: f8a3b2c1-d4e5-4789-abcd-ef0123456789
      required:
        - id
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your account's API key, sent as `Authorization: Bearer <your API key>`.
        Keys are issued per environment, so a staging key will not work against
        production.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.