Web Visits
v1

Update an existing goal. All attributes are optional; only the attributes you send are changed. criterion replaces the stored criterion: send its operator, and a value unless the operator is is_present or is_empty, which take none. Its field can be omitted and cannot be changed — delete the goal and create a new one instead. Changes are not retroactive: page views the goal already marked keep it, and earlier page views are not re-checked.

The operator must be one the goal's field accepts; an unsupported one is rejected with a 422 naming the accepted operators:

fieldOperators
page_urlis, is_not, begins_with, not_begins_with, ends_with, contains, not_contains
pageis, is_not, begins_with, ends_with, contains, not_contains
form_submitis, is_not, is_present, is_empty
file_download_nameis, is_not, contains, is_present, is_empty
video_titleis, is_not, begins_with, contains, is_present, is_empty
video_urlis, is_not, begins_with, is_present, is_empty

:::info Requires the web_visits:write OAuth2 scope. :::

patch/v1/web-visits/goals/{id}

Request

  • Base URL
    https://api.leadfeeder.com
  • URL
    https://api.leadfeeder.com/v1/web-visits/goals/{id}
  • Auth
    • API key in header X-Api-Key
    • or OAuth 2
      Authorization code: https://api.leadfeeder.com/v1/oauth/authorize
      Token URL: https://api.leadfeeder.com/v1/oauth/token scopes: web_visits:write

Path parameters

idstring required

The goal ID.

Query parameters

account_idstring required

The Leadfeeder Account ID. The Account ID can be retrieved using the List Accounts endpoint.

Request body

Example request

{
  "data": {
    "attributes": {
      "criterion": {
        "field": "page_url",
        "operator": "contains",
        "value": "/pricing"
      },
      "enabled": true,
      "name": "Pricing page"
    },
    "type": "goal"
  }
}

Response

Success

Example response

{
  "data": {
    "attributes": {
      "created_at": "2026-10-01T10:00:00.000Z",
      "criterion": {
        "field": "page_url",
        "operator": "contains",
        "value": "/pricing"
      },
      "enabled": true,
      "name": "Pricing page",
      "updated_at": "2026-10-02T11:00:00.000Z"
    },
    "id": "4182",
    "relationships": {
      "custom_feed": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "type": "custom_feed"
      }
    },
    "type": "goal"
  },
  "meta": {
    "request_id": "cf054205-dd8c-4473-8689-07c30fe0789f"
  }
}

Changes

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      the ///// request property type changed from no type to string

    • breaking

      removed subschema #1 subschema #2 from the /// request property oneOf list

    • info

      added subschema #1: page_url: comparison subschema #2: page: comparison subschema #3: form_submit: comparison subschema #4: form_submit: presence subschema #5: file_download_name: comparison subschema #6: file_download_name: presence subschema #7: video_title: comparison subschema #8: video_title: presence subschema #9: video_url: comparison subschema #10: video_url: presence to the /// request property anyOf list