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

# Create Record

> Create a new record

<ParamField path="POST" type="endpoint">
  /api/v1/records
</ParamField>

Create a new record in Forerunner. The accepted body fields and response `data` schema depend on the `recordType`. Logs track contact inquiries, document your responses, and maintain records for CRS documentation.

<Note>
  This endpoint currently only supports creating records with a `recordType` of `Log`.
</Note>

## Body Parameters

<Tabs>
  <Tab title="Log">
    <ParamField body="recordType" type="string" required>
      Must be `Log`.
    </ParamField>

    <ParamField body="externalSystemId" type="string">
      Unique identifier from your system
    </ParamField>

    <ParamField body="propertyId" type="string">
      UUID of an existing property in Forerunner. When provided, the record is associated directly with this property instead of geocoding the address.
    </ParamField>

    <ParamField body="coordinates" type="array">
      Two-element array `[latitude, longitude]` in `EPSG:4326` format. Used to resolve a property when `propertyId` and `coordinates` are not provided.
    </ParamField>

    <ParamField body="data" type="object" required>
      Log-specific fields.
    </ParamField>

    <ParamField body="data.type" type="string" required>
      How the contact reached out. Valid values:

      * `web`
      * `walk-in`
      * `phone`
      * `written/email request`
    </ParamField>

    <ParamField body="data.date" type="string" required>
      Date of the inquiry. Accepts any date string that can be parsed as a date (e.g., `2024-03-20`, `2024-03-20T14:30:00Z`).
    </ParamField>

    <ParamField body="data.address" type="string" required>
      Fully qualified street address in the format: `{streetNumber} {streetName} {streetPostfix}, {city}, {state} {zip}` (e.g., `123 Main St, Springfield, IL 62701`). Forerunner uses this to associate the log with a property when `propertyId` and `coordinates` are not provided.
    </ParamField>

    <ParamField body="data.status" type="string">
      Current status of the log: `open`, `in_progress`, or `complete`. Defaults to `open`.
    </ParamField>

    <ParamField body="data.contactName" type="string">
      Full name of the contact
    </ParamField>

    <ParamField body="data.contactEmail" type="string">
      Email address for the contact
    </ParamField>

    <ParamField body="data.contactPhone" type="string">
      Phone number for the contact
    </ParamField>

    <ParamField body="data.contactType" type="string">
      Relationship of the contact to the property. Valid values:

      * `homeowner`
      * `property_owner`
      * `renter`
      * `surveyor`
      * `contractor`
      * `architect`
      * `insurance_agent`
      * `realtor`
      * `buyer`
      * `other`
    </ParamField>

    <ParamField body="data.firmPanel" type="string">
      FIRM panel number for the property (e.g., `17167C0033E`). Auto-computed from the property's coordinates if omitted.
    </ParamField>

    <ParamField body="data.floodZone" type="string">
      Flood zone designation for the property. Common values include `AE`, `VE`, `X`, `AO`, `A`, `AH`, and others. Auto-computed from the property's coordinates if omitted.
    </ParamField>

    <ParamField body="data.bfe" type="string">
      Base Flood Elevation value as a string (e.g., `"12.5"`). Auto-computed from the property's coordinates if omitted.
    </ParamField>

    <ParamField body="data.baseFloodDepth" type="string">
      Base flood depth value as a string. Auto-computed from the property's coordinates if omitted.
    </ParamField>

    <ParamField body="data.insuranceInfoGiven" type="string">
      How insurance information was provided to the contact: `verbally`, `handout`, or `email`
    </ParamField>

    <ParamField body="data.siteVisit" type="boolean">
      Whether a site visit occurred
    </ParamField>

    <ParamField body="data.propertyProtectionAdvice" type="boolean">
      Whether property protection advice was given to the contact
    </ParamField>

    <ParamField body="data.financialAdvice" type="boolean">
      Whether financial advice was given to the contact
    </ParamField>

    <ParamField body="data.coastalOrCBRS" type="boolean">
      Whether the property is in a coastal or CBRS area. Auto-computed from the property's coordinates if omitted.
    </ParamField>

    <ParamField body="data.pastFlood" type="boolean">
      Whether the property has experienced past flooding
    </ParamField>

    <ParamField body="data.erosion" type="boolean">
      Whether erosion is a concern for the property
    </ParamField>

    <ParamField body="data.requestedHelpWith" type="string">
      Description of what the contact requested help with
    </ParamField>

    <ParamField body="data.internalNotes" type="string">
      Internal notes about the interaction
    </ParamField>
  </Tab>
</Tabs>

## Response

<ResponseField name="record" type="object">
  The created record

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

    <ResponseField name="externalSystemId" type="string">
      External system identifier, if provided
    </ResponseField>

    <ResponseField name="data" type="object">
      Record fields. The structure depends on the `recordType`.
    </ResponseField>

    <ResponseField name="property" type="object">
      Associated property, if one was matched. See [Property object](/developers/api/properties/list#response) for the object schema.
    </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 POST https://app.withforerunner.com/api/v1/records \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "recordType": "Log",
      "data": {
        "type": "phone",
        "date": "2024-03-20",
        "status": "complete",
        "address": "456 Oak Ave, Springfield, IL",
        "contactName": "Jane Doe",
        "contactPhone": "(555) 987-6543",
        "contactEmail": "jane.doe@example.com",
        "contactType": "homeowner",
        "insuranceInfoGiven": "verbally",
        "siteVisit": false,
        "requestedHelpWith": "Flood zone status inquiry"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "record": {
      "id": "f8a3b2c1-d4e5-6789-abcd-ef0123456789",
      "externalSystemId": null,
      "data": {
        "date": "2024-03-20T00:00:00.000Z",
        "status": "complete",
        "type": "phone",
        "contactName": "Jane Doe",
        "contactEmail": "jane.doe@example.com",
        "contactPhone": "(555) 987-6543",
        "contactType": "homeowner",
        "address": "456 Oak Ave, Springfield, IL",
        "firmPanel": null,
        "floodZone": null,
        "bfe": null,
        "baseFloodDepth": null,
        "insuranceInfoGiven": "verbally",
        "siteVisit": false,
        "propertyProtectionAdvice": null,
        "financialAdvice": null,
        "coastalOrCBRS": null,
        "pastFlood": null,
        "erosion": null,
        "requestedHelpWith": "Flood zone status inquiry",
        "internalNotes": null,
        "sharedViaEmail": false,
        "viaPublicSite": false,
        "createdBy": null
      },
      "property": {
        "id": "f0e1d2c3-b4a5-6789-0fed-cba987654321",
        "address": "456 Oak Ave, Springfield, IL 62704",
        "coordinates": [39.7637, -89.6688],
        "url": "https://demoville.app.withforerunner.com/map?lat=39.7637&lng=-89.6688",
        "publicURL": "https://demoville.withforerunner.com/properties/f0e1d2c3-b4a5-6789-0fed-cba987654321"
      }
    },
    "errors": []
  }
  ```

  ```json Validation Error theme={null}
  {
    "record": null,
    "errors": [
      {
        "message": "Required",
        "field": "data.type"
      }
    ]
  }
  ```

  ```json Unsupported Record Type theme={null}
  {
    "record": null,
    "errors": [
      {
        "message": "Invalid recordType. Supported types: Log",
        "field": "recordType"
      }
    ]
  }
  ```
</ResponseExample>
