components:
  parameters:
    AccountId:
      description: The Leadfeeder Account ID. The Account ID can be retrieved using the **List Accounts** endpoint.
      example: "123456"
      in: query
      name: account_id
      required: true
      schema:
        type: string
    AccountIdOptional:
      description: The Leadfeeder Account ID. The Account ID can be retrieved using the **List Accounts** endpoint.
      example: "123456"
      in: query
      name: account_id
      schema:
        type: string
    CRMConnectionId:
      description: The CRM connection ID — the composite `<integration_connection_id>_<local_id>_<crm_record_uuid>` returned as the connection's `id`.
      example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
      in: path
      name: id
      required: true
      schema:
        type: string
    CRMRecordId:
      description: The Leadfeeder id (uuid) of the CRM record, as returned in a CRM job's `result.crm_record.id` or a CRM connection's `crm_record` relationship.
      example: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
      in: path
      name: id
      required: true
      schema:
        type: string
    CampaignId:
      description: The campaign ID.
      example: "1234"
      in: path
      name: id
      required: true
      schema:
        type: string
    CampaignInclude:
      description: |-
        Comma-separated list of related resources to inline inside each campaign's `relationships` block. Unknown values are silently ignored.

        Supported values:
        - `campaign_summary` — aggregated lifetime campaign performance metrics
          (impressions, clicks, costs, reach, …).

        - `campaign_settings` — campaign-level configuration toggles such as brand
          safety domain exclusion and auto-include behaviour.

        - `campaign_locations` — geographical targets attached to the campaign.
        - `list` — the audience list (target companies) backing the campaign.
        - `custom_feed` — the custom website-visit feed used to retarget visitors.

        By default (no `include`), each relationship in the response carries only an `id` / `type` reference (or `null` when not configured).
      example: campaign_summary,campaign_settings,campaign_locations,list,custom_feed
      in: query
      name: include
      schema:
        type: string
    Classification:
      description: The industry classification system the codes belong to.
      example: nace
      in: query
      name: classification
      required: true
      schema:
        enum:
          - wz
          - nace
          - internal
        type: string
    Code:
      description: Optional exact-match filter. When provided, only the industry whose `code` equals this value is returned (an empty list if there is no match).
      example: "62.01"
      in: query
      name: code
      required: false
      schema:
        type: string
    CompanyId:
      description: The company's ID. Note that the older string-based ID format continues to be supported.
      example: "159001425"
      in: path
      name: id
      required: true
      schema:
        type: string
    CompanyIds:
      description: Comma separated list of company IDs. A maximum of 100 IDs can be passed to this endpoint. Note that the older string-based ID format continues to be supported.
      example: 159001425,129011
      in: query
      name: ids
      required: true
      schema:
        type: string
    ContactId:
      description: The contact's ID. Note that the older string-based ID format continues to be supported.
      example: "3219787601"
      in: path
      name: id
      required: true
      schema:
        type: string
    ContactIds:
      description: Comma separated list of contact IDs. A maximum of 100 IDs can be passed to this endpoint. Note that the older string-based ID format continues to be supported.
      example: 3219787601,3219787635
      in: query
      name: ids
      required: true
      schema:
        type: string
    EndPeriod:
      description: Inclusive end of the reporting window (ISO 8601 calendar date, `YYYY-MM-DD`). Must be on or after `start_period`.
      example: "2026-04-30"
      in: query
      name: end_period
      required: true
      schema:
        format: date
        type: string
    FieldTypeOptional:
      description: Filter by field type. If omitted, returns all field types.
      example: text
      in: query
      name: filter[type]
      schema:
        enum:
          - text
          - number
          - boolean
          - date
          - contact_collection
          - ai_score
          - ai_text
          - ai_number
          - ai_boolean
        type: string
    Frequency:
      description: Bucket granularity for the returned stats series.
      example: day
      in: query
      name: frequency
      required: true
      schema:
        enum:
          - day
          - week
          - month
        type: string
    GeoCountryCodes:
      description: Comma-separated list of ISO-3166-1 alpha-2 country codes (e.g. `DE,AT`) to restrict suggestions to.
      example: DE,AT
      in: query
      name: country_codes
      schema:
        pattern: ^[A-Za-z]{2}(,[A-Za-z]{2})*$
        type: string
    GeoPageSize:
      description: Maximum number of suggestions to return. Values outside the 1–50 range are clamped to the nearest bound.
      example: 10
      in: query
      name: page[size]
      schema:
        default: 10
        maximum: 50
        minimum: 1
        type: integer
    GeoSearch:
      description: Text to match against city names and postal codes. See `search_fields` to restrict which fields are matched.
      example: Lon
      in: query
      name: search
      required: true
      schema:
        minLength: 3
        type: string
    GeoSearchFields:
      description: "Address fields the search text may match, as a comma-separated list: `postal_code`, `city`, or both. When omitted, both cities and postal codes are searched."
      example:
        - city
      explode: false
      in: query
      name: search_fields
      schema:
        items:
          enum:
            - postal_code
            - city
          type: string
        type: array
      style: form
    Ip:
      description: A valid IPv4 or IPv6 address, e.g. 185.70.216.139 or 2620:0:862:ed1a::1. The IP parameter in the URL should not be quoted (surrounded by " or '). For IPv6, shortened notation is supported, but literal addresses as a part of URI are not. I.e. 2620:0:862:ed1a::1 will succeed, but [2620:0:862:ed1a::1] will return an error response with HTTP status code 400.
      example: 185.70.216.139
      in: query
      name: ip
      required: true
      schema:
        type: string
    PageCursor:
      description: Cursor for pagination. Use this value to fetch the next page of results.
      example: WyAzNzAwMCwgIjIzNTYyMCJd
      in: query
      name: page[cursor]
      schema:
        type: string
    PageNum:
      description: Page of results to fetch.
      example: 1
      in: query
      name: page[num]
      schema:
        type: integer
    PageSize:
      description: The number of items per page. Maximum is 100.
      example: 20
      in: query
      name: page[size]
      schema:
        default: 20
        maximum: 100
        minimum: 1
        type: integer
    ScopeOptional:
      description: Filter by entities that apply to either company or contact. If omitted, returns both kinds of entities.
      example: company
      in: query
      name: filter[scope]
      schema:
        enum:
          - company
          - contact
        type: string
    ScopeRequired:
      description: Filter by entities that apply to either company or contact.
      example: company
      in: query
      name: filter[scope]
      required: true
      schema:
        enum:
          - company
          - contact
        type: string
    SortDirection:
      description: Sort direction. Defaults to `asc`.
      example: desc
      in: query
      name: sort[direction]
      schema:
        default: asc
        enum:
          - asc
          - desc
        type: string
        x-apidog-enum:
          - description: Ascending.
            value: asc
          - description: Descending.
            value: desc
    StartPeriod:
      description: Inclusive start of the reporting window (ISO 8601 calendar date, `YYYY-MM-DD`). Must be on or before `end_period`.
      example: "2026-04-01"
      in: query
      name: start_period
      required: true
      schema:
        format: date
        type: string
    TagId:
      description: The tag ID.
      example: 4b7e2c9f
      in: path
      name: id
      required: true
      schema:
        type: string
  schemas:
    AccountCompanyV1:
      properties:
        attributes:
          additionalProperties: false
          properties:
            name:
              description: The company name. May be `null` if the company has no name set.
              example: Dealfront Group GmbH
              type:
                - string
                - "null"
          required:
            - name
          type: object
        id:
          description: The company ID.
          example: "555001"
          type: string
        type:
          const: account_company
          description: The type of the object
          example: account_company
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    AccountSummaryV1:
      properties:
        attributes:
          additionalProperties: false
          properties:
            name:
              description: The account name.
              example: Dealfront Group GmbH
              type: string
          required:
            - name
          type: object
        id:
          description: The account ID.
          example: "36744212"
          type: string
        relationships:
          properties:
            account_company:
              description: The company the account belongs to. Present for every account that belongs to a company, and omitted for the rare account that is not attached to one. By default this field only contains the `id` and `type` fields, but you can load the company attributes by passing the `include=account_company` url parameter.
              oneOf:
                - additionalProperties: false
                  description: A bare reference to the company an account belongs to.
                  properties:
                    id:
                      description: The company ID.
                      example: "555001"
                      type: string
                    type:
                      const: account_company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/AccountCompanyV1"
            subscriptions:
              description: The account's current and upcoming subscriptions, ordered by `start_date`. A subscription is listed up to and including its `end_date`, so the array is empty when the account has no current or pending subscriptions. By default this field is not returned, but you can load it by passing the `include=subscriptions` url parameter.
              items:
                $ref: "#/components/schemas/SubscriptionV1"
              type: array
          type: object
        type:
          const: account_summary
          description: The type of the object
          example: account_summary
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    AccountV1:
      properties:
        attributes:
          properties:
            credits:
              properties:
                available:
                  description: The total credits available to the account, across every credit pool. See `credits_pools` for the per-pool breakdown.
                  example: 10000
                  type: number
                credits_pools:
                  description: The account's credits broken down by pool, mirroring how the platform's Credit Balance widget presents them. Each pool carries its own balance and its own renewal or expiry date. A pool the account was granted no credits in is left out, so the pools listed here can add up to less than the totals above, and the array is empty when the account holds no credits at all. Only returned when `account_id` is supplied.
                  items:
                    properties:
                      available:
                        description: The credits this pool was granted.
                        example: 50
                        type: number
                      expires_at:
                        description: The date this pool's remaining credits are forfeited. `null` for pools that do not expire, such as `recurring`.
                        example: null
                        format: date
                        type:
                          - string
                          - "null"
                      pool_type:
                        description: What kind of pool this is. `recurring` for the credits included in the subscription, which renew every billing cycle, and `one_off` for extra credits bought on top, which expire instead of renewing.
                        example: recurring
                        type: string
                      remaining:
                        description: How many of this pool's credits are remaining.
                        example: 48
                        type: number
                      renews_at:
                        description: The date this pool's balance resets to `available`. `null` for pools that do not renew, such as `one_off`.
                        example: "2027-06-17"
                        format: date
                        type:
                          - string
                          - "null"
                      used:
                        description: How many of this pool's credits were consumed up to now.
                        example: 2
                        type: number
                    required:
                      - pool_type
                      - available
                      - used
                      - remaining
                      - renews_at
                      - expires_at
                    type: object
                  type: array
                next_reset_on:
                  deprecated: true
                  description: Deprecated and no longer populated; always `null`. Read `credits_pools[].renews_at` instead, which carries the date each pool's credits renew. Retained for backward compatibility and removed in a future release.
                  example: null
                  format: date
                  type:
                    - string
                    - "null"
                remaining:
                  description: How many credits are remaining in the account, across every credit pool.
                  example: 9480
                  type: number
                used:
                  description: How many credits were consumed up to now in the account, across every credit pool.
                  example: 520
                  type: number
              required:
                - available
                - used
                - remaining
                - next_reset_on
                - credits_pools
              type: object
            name:
              description: The account name.
              example: Dealfront Group GmbH
              type: string
          required:
            - name
            - credits
          type: object
        id:
          description: The account ID.
          example: "36744212"
          type: string
        relationships:
          properties:
            account_company:
              description: The company the account belongs to. Present for every account that belongs to a company, and omitted for the rare account that is not attached to one. By default this field only contains the `id` and `type` fields, but you can load the company attributes by passing the `include=account_company` url parameter.
              oneOf:
                - additionalProperties: false
                  description: A bare reference to the company an account belongs to.
                  properties:
                    id:
                      description: The company ID.
                      example: "555001"
                      type: string
                    type:
                      const: account_company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/AccountCompanyV1"
            subscriptions:
              description: The account's current and upcoming subscriptions, ordered by `start_date`. A subscription is listed up to and including its `end_date`, so the array is empty when the account has no current or pending subscriptions. By default this field is not returned, but you can load it by passing the `include=subscriptions` url parameter.
              items:
                $ref: "#/components/schemas/SubscriptionV1"
              type: array
          type: object
        type:
          const: account
          description: The type of the object
          example: account
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    ApiUsageV1:
      properties:
        attributes:
          properties:
            endpoint_path:
              description: The API endpoint URL
              example: /ip/enrich
              type: string
            http_method:
              description: |
                The HTTP method used for this endpoint.
              enum:
                - GET
                - POST
                - PUT
                - PATCH
                - DELETE
                - HEAD
                - OPTIONS
              example: POST
              type: string
            last_accessed_at:
              description: The timestamp when this endpoint was last accessed, in ISO8601 format
              example: "2025-01-15T14:30:00Z"
              format: date-time
              type: string
            num_failed_requests:
              description: Total number of requests resulting in a non-200 SUCCESS response
              example: 2
              minimum: 0
              type: integer
            num_requests:
              description: Total number of requests returned 200 SUCCESS
              example: 10
              minimum: 0
              type: integer
            num_returned_entities:
              description: Number of entities returned as part of successful requests.
              example: 100
              minimum: 0
              type: integer
            num_successful_requests:
              description: Number of successful requests — for credit-based endpoints, this counts only when a credit is consumed; for IP endpoints, this counts only when a company match or IP data are returned.
              example: 5
              minimum: 0
              type: integer
            period:
              description: The period for which usage is reported, formatted as YYYY-MM
              example: 2025-01
              pattern: ^\d{4}-\d{2}$
              type: string
          required:
            - period
            - endpoint_path
            - num_requests
            - num_failed_requests
            - num_successful_requests
            - num_returned_entities
          type: object
        id:
          description: The unique identifier for the API usage record.
          example: 2025-01_ip/enrich
          type: string
        type:
          const: api_usage
          description: The type of the object
          example: api_usage
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    BatchAddTagsJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-05-13T12:00:18Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: "The tags and the companies the job was created with, at every status: the `items`, or the search selection as sent."
              properties:
                advanced_search:
                  description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                  example:
                    excluded_company_ids:
                      - "651713"
                    filters:
                      items:
                        - field: country_code
                          operator: in
                          type: filter
                          value:
                            - DE
                        - field: employee_count
                          operator: in_range
                          type: filter
                          value:
                            gte: 50
                      operator: and
                      type: group
                    page:
                      size: 1000
                    sort:
                      direction: desc
                      field: employee_count
                  properties:
                    excluded_company_ids:
                      description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                      example:
                        - "651713"
                      items:
                        type: string
                      type: array
                    filters:
                      description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                      example:
                        items:
                          - field: country_code
                            operator: in
                            type: filter
                            value:
                              - DE
                          - items:
                              - field: employee_count
                                operator: in_range
                                type: filter
                                value:
                                  gte: 50
                              - field: industries
                                operator: in
                                type: filter
                                value:
                                  classification: nace
                                  codes:
                                    - "62.01"
                            operator: or
                            type: group
                        operator: and
                        type: group
                      properties:
                        items:
                          description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                          items:
                            $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                          type: array
                        operator:
                          description: The logical operator combining the items.
                          enum:
                            - and
                            - or
                          example: and
                          type: string
                        type:
                          description: Indicates this is the root filter group.
                          enum:
                            - group
                          example: group
                          type: string
                      required:
                        - type
                        - operator
                        - items
                      type: object
                    page:
                      description: Bounds how many of the matching companies are selected.
                      properties:
                        size:
                          description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                          example: 1000
                          minimum: 1
                          type: integer
                      type: object
                    sort:
                      description: Ordering applied to the matching companies. Omit to use the default ordering.
                      properties:
                        direction:
                          default: asc
                          description: Sort direction. Defaults to `asc`.
                          enum:
                            - asc
                            - desc
                          example: desc
                          type: string
                        field:
                          description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                          example: employee_count,name
                          type: string
                      type: object
                  required:
                    - filters
                  type: object
                items:
                  description: The company references of the request. Absent for a job created from a search selection.
                  items:
                    properties:
                      id:
                        description: The Leadfeeder company ID.
                        example: "159001425"
                        type: string
                      type:
                        const: company
                        description: The entity type (always `company`).
                        example: company
                        type: string
                    type: object
                  type: array
                tags:
                  description: The tags the job adds.
                  items:
                    description: A bare reference to a tag by ID.
                    properties:
                      id:
                        description: The tag ID, as returned by the **Retrieve Tags** and **Get Tag Details** endpoints.
                        example: dd11fc370098e78e
                        type: string
                      type:
                        const: tag
                        example: tag
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - tags
              type: object
            created_at:
              description: When the job was created.
              example: "2026-05-13T12:00:00Z"
              format: date-time
              type: string
            errors:
              description: |-
                Empty unless `status` is `failed`, when it holds one error:

                - `job_failed`, "Tag assignment could not be applied": the tags couldn't be added.
                - For a job created from a search selection, the search's own code and title, such as `invalid_filters` when it rejects the filter tree, `invalid_parameter` when it rejects the sort field, `unprocessable_entity` when a list in the filters no longer exists, or `server_timeout` when it takes too long.
                - `advanced_search_failed`, "Advanced search failed": the search failed without an error of its own.
                - `invalid_parameter`, "Advanced search request was rejected": the search refused the request without an error of its own.

                Tags the job added before it failed stay on the companies.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
            summary:
              description: The outcome counts, once `status` is `completed`. A failed job can also have them, counting the companies it handled before it failed.
              properties:
                added:
                  description: Companies the tags were added to, including those that already had them.
                  example: 2
                  type: integer
                failed_count:
                  description: Companies the tags couldn't be added to, and `items` whose ID isn't a number.
                  example: 0
                  type: integer
              type: object
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: batch_add_tags_job
          example: batch_add_tags_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    BatchAddToListJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-05-13T12:00:18Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration. Present at every status, from the moment the job is created. Carries the `items` array (each repeated item once) or the search selection the job was created with — exactly one of the two.
              oneOf:
                - required:
                    - items
                - required:
                    - advanced_search
              properties:
                advanced_search:
                  allOf:
                    - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                      example:
                        excluded_company_ids:
                          - "651713"
                        filters:
                          items:
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                            - field: employee_count
                              operator: in_range
                              type: filter
                              value:
                                gte: 50
                          operator: and
                          type: group
                        page:
                          size: 1000
                        sort:
                          direction: desc
                          field: employee_count
                      properties:
                        excluded_company_ids:
                          description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                          example:
                            - "651713"
                          items:
                            type: string
                          type: array
                        filters:
                          description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                          example:
                            items:
                              - field: country_code
                                operator: in
                                type: filter
                                value:
                                  - DE
                              - items:
                                  - field: employee_count
                                    operator: in_range
                                    type: filter
                                    value:
                                      gte: 50
                                  - field: industries
                                    operator: in
                                    type: filter
                                    value:
                                      classification: nace
                                      codes:
                                        - "62.01"
                                operator: or
                                type: group
                            operator: and
                            type: group
                          properties:
                            items:
                              description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                              items:
                                $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                              type: array
                            operator:
                              description: The logical operator combining the items.
                              enum:
                                - and
                                - or
                              example: and
                              type: string
                            type:
                              description: Indicates this is the root filter group.
                              enum:
                                - group
                              example: group
                              type: string
                          required:
                            - type
                            - operator
                            - items
                          type: object
                        page:
                          description: Bounds how many of the matching companies are selected.
                          properties:
                            size:
                              description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                              example: 1000
                              minimum: 1
                              type: integer
                          type: object
                        sort:
                          description: Ordering applied to the matching companies. Omit to use the default ordering.
                          properties:
                            direction:
                              default: asc
                              description: Sort direction. Defaults to `asc`.
                              enum:
                                - asc
                                - desc
                              example: desc
                              type: string
                            field:
                              description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                              example: employee_count,name
                              type: string
                          type: object
                      required:
                        - filters
                      type: object
                    - description: The advanced-search selection supplied in the originating request.
                items:
                  description: The references supplied in the originating request, each repeated item once.
                  items:
                    properties:
                      id:
                        description: The Dealfront entity ID.
                        example: "159001425"
                        type: string
                      type:
                        description: The entity type (e.g. `company` or `contact`).
                        enum:
                          - company
                          - contact
                        example: company
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
                list_id:
                  description: The scope-prefixed list identifier the job operates on (e.g. `company_123` or `contact_456`).
                  example: company_123
                  type: string
              required:
                - list_id
              type: object
            created_at:
              description: When the job was created.
              example: "2026-05-13T12:00:00Z"
              format: date-time
              type: string
            errors:
              description: |-
                Empty unless `status` is `failed`, when it holds one error:

                - `list_capacity_exceeded`, "Applying these operations would exceed the maximum list size": the members would take the list past 1,000,000.
                - `list_not_found`, "The list could not be found": the list no longer exists when the job runs.
                - `list_access_denied`, "The list is no longer accessible": you can no longer change the list when the job runs, for example because you lost access to it.
                - `job_exhausted_retries`, "Membership update failed after exhausting retries": temporary errors persisted. Create the job again.
                - `job_failed`, "Membership update could not be applied": any other error.
                - For a job created from a search selection, the search's own code and title, such as `invalid_filters` when it rejects the filter tree, `invalid_parameter` when it rejects the sort, `unprocessable_entity` when a list in the filters no longer exists, or `server_timeout` when it takes too long.

                A failed job reports no counts. Members it added before failing stay on the list.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            results:
              description: Per-item outcome of the add job, in request order, each repeated item once. Present only when `status` is `completed` and the job was created with an explicit `items` array — a job created from a search selection reports `summary` counts only. Items that exist but couldn't be added are left out and counted in `summary.failed_count`.
              items:
                description: Per-item outcome of a batch add-to-list job.
                properties:
                  id:
                    description: The Dealfront company or contact ID that was processed.
                    example: "159001425"
                    type: string
                  status:
                    description: What the job did with this item.
                    enum:
                      - added
                      - already_present
                      - not_found
                    example: added
                    type: string
                    x-apidog-enum:
                      - description: Member was added to the list
                        value: added
                      - description: Member was already in the list (the add was a no-op)
                        value: already_present
                      - description: The referenced entity could not be found or its ID isn't a number
                        value: not_found
                  type:
                    description: The kind of entity this result item refers to.
                    enum:
                      - company
                      - contact
                    example: company
                    type: string
                required:
                  - id
                  - type
                  - status
                type: object
              type: array
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
            summary:
              description: Counts of items by outcome, plus the list size before and after the job applied. Present only when `status` is `completed`.
              properties:
                added:
                  description: Number of members added. For a job created from a search selection, the matches added.
                  example: 1
                  type: integer
                already_present:
                  description: Number of members already in the list (add no-op). For a job created from a search selection, the matches that were already on the list.
                  example: 1
                  type: integer
                failed_count:
                  description: Total number of items that exist but couldn't be added, which `results` leaves out. Always 0 for a job created from a search selection, which counts them in `not_found`.
                  example: 0
                  type: integer
                list_size_after:
                  description: Number of members on the list after the job applied, counting every member.
                  example: 52
                  type: integer
                list_size_before:
                  description: Number of members on the list when the job was created, not counting the members whose company or contact record no longer exists.
                  example: 51
                  type: integer
                not_found:
                  description: Number of referenced entities that could not be found, including references whose ID isn't a number. For a job created from a search selection, matches that could not be added are counted here.
                  example: 0
                  type: integer
                scope_mismatch:
                  description: "Number of references whose type did not match the list scope. Always 0: such a reference is rejected when the job is created."
                  example: 0
                  type: integer
              type: object
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          default: batch_add_to_list_job
          example: batch_add_to_list_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    BatchRemoveFromListJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-05-13T12:00:18Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration. Present at every status, from the moment the job is created. Carries the `items` array (each repeated item once) or the search selection the job was created with — exactly one of the two.
              oneOf:
                - required:
                    - items
                - required:
                    - advanced_search
              properties:
                advanced_search:
                  allOf:
                    - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                      example:
                        excluded_company_ids:
                          - "651713"
                        filters:
                          items:
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                            - field: employee_count
                              operator: in_range
                              type: filter
                              value:
                                gte: 50
                          operator: and
                          type: group
                        page:
                          size: 1000
                        sort:
                          direction: desc
                          field: employee_count
                      properties:
                        excluded_company_ids:
                          description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                          example:
                            - "651713"
                          items:
                            type: string
                          type: array
                        filters:
                          description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                          example:
                            items:
                              - field: country_code
                                operator: in
                                type: filter
                                value:
                                  - DE
                              - items:
                                  - field: employee_count
                                    operator: in_range
                                    type: filter
                                    value:
                                      gte: 50
                                  - field: industries
                                    operator: in
                                    type: filter
                                    value:
                                      classification: nace
                                      codes:
                                        - "62.01"
                                operator: or
                                type: group
                            operator: and
                            type: group
                          properties:
                            items:
                              description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                              items:
                                $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                              type: array
                            operator:
                              description: The logical operator combining the items.
                              enum:
                                - and
                                - or
                              example: and
                              type: string
                            type:
                              description: Indicates this is the root filter group.
                              enum:
                                - group
                              example: group
                              type: string
                          required:
                            - type
                            - operator
                            - items
                          type: object
                        page:
                          description: Bounds how many of the matching companies are selected.
                          properties:
                            size:
                              description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                              example: 1000
                              minimum: 1
                              type: integer
                          type: object
                        sort:
                          description: Ordering applied to the matching companies. Omit to use the default ordering.
                          properties:
                            direction:
                              default: asc
                              description: Sort direction. Defaults to `asc`.
                              enum:
                                - asc
                                - desc
                              example: desc
                              type: string
                            field:
                              description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                              example: employee_count,name
                              type: string
                          type: object
                      required:
                        - filters
                      type: object
                    - description: The advanced-search selection supplied in the originating request.
                items:
                  description: The references supplied in the originating request, each repeated item once.
                  items:
                    properties:
                      id:
                        description: The Dealfront entity ID.
                        example: "3170656125"
                        type: string
                      type:
                        description: The entity type (e.g. `company` or `contact`).
                        enum:
                          - company
                          - contact
                        example: contact
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
                list_id:
                  description: The scope-prefixed list identifier the job operates on (e.g. `company_123` or `contact_456`).
                  example: contact_456
                  type: string
              required:
                - list_id
              type: object
            created_at:
              description: When the job was created.
              example: "2026-05-13T12:00:00Z"
              format: date-time
              type: string
            errors:
              description: |-
                Empty unless `status` is `failed`, when it holds one error:

                - `list_not_found`, "The list could not be found": the list no longer exists when the job runs.
                - `list_access_denied`, "The list is no longer accessible": you can no longer change the list when the job runs, for example because you lost access to it.
                - `job_exhausted_retries`, "Membership update failed after exhausting retries": temporary errors persisted. Create the job again.
                - `job_failed`, "Membership update could not be applied": any other error.
                - For a job created from a search selection, the search's own code and title, such as `invalid_filters` when it rejects the filter tree, `invalid_parameter` when it rejects the sort, `unprocessable_entity` when the list, or a list in your filters, is deleted or no longer shared with you before the job runs, or `server_timeout` when it takes too long.

                A failed job reports no counts. Members it removed before failing stay off the list.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            results:
              description: Per-item outcome of the remove job, in request order, each repeated item once. Present only when `status` is `completed` and the job was created with an explicit `items` array — a job created from a search selection reports `summary` counts only.
              items:
                description: Per-item outcome of a batch remove-from-list job.
                properties:
                  id:
                    description: The Dealfront company or contact ID that was processed.
                    example: "3170656125"
                    type: string
                  status:
                    description: "Indicative, best-effort status for this item: the job doesn't check whether the item was on the list."
                    enum:
                      - removed
                      - not_found
                    example: removed
                    type: string
                    x-apidog-enum:
                      - description: The ID is a number, so the job removed the item if it was on the list.
                        value: removed
                      - description: The ID isn't a number, so nothing was removed for it.
                        value: not_found
                  type:
                    description: The kind of entity this result item refers to.
                    enum:
                      - company
                      - contact
                    example: contact
                    type: string
                required:
                  - id
                  - type
                  - status
                type: object
              type: array
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
            summary:
              description: "Counts of items by outcome, plus the list size after the job applied. Present only when `status` is `completed`. The outcome counts are best-effort: they aggregate the indicative per-item statuses and are not a guaranteed-exact classification."
              properties:
                failed_count:
                  description: "Total number of items that did not complete successfully. Always 0 for an `items` or `advanced_search` job: when the list's members can't be changed, the job fails instead."
                  example: 0
                  type: integer
                list_size_after:
                  description: Number of members on the list after the job applied.
                  example: 49
                  type: integer
                not_found:
                  description: Number of references whose ID isn't a number. Always 0 for a job created from a search selection.
                  example: 0
                  type: integer
                not_present:
                  description: "Number of members not in the list (remove no-op). Always 0: items that weren't on the list are counted in `removed`."
                  example: 0
                  type: integer
                removed:
                  description: Number of members removed, counting every item whose ID is a number, whether or not it was on the list. For a job created from an `advanced_search` selection, the matching companies the job asked to remove, not counting the excluded IDs.
                  example: 2
                  type: integer
                scope_mismatch:
                  description: "Number of references whose type did not match the list scope. Always 0: such a reference is rejected when the job is created."
                  example: 0
                  type: integer
              type: object
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
          type: string
        type:
          default: batch_remove_from_list_job
          example: batch_remove_from_list_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    BatchRemoveTagsJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-05-13T12:00:18Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: "The tags and the companies the job was created with, at every status: the `items`, or the search selection as sent."
              properties:
                advanced_search:
                  description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                  example:
                    excluded_company_ids:
                      - "651713"
                    filters:
                      items:
                        - field: country_code
                          operator: in
                          type: filter
                          value:
                            - DE
                        - field: employee_count
                          operator: in_range
                          type: filter
                          value:
                            gte: 50
                      operator: and
                      type: group
                    page:
                      size: 1000
                    sort:
                      direction: desc
                      field: employee_count
                  properties:
                    excluded_company_ids:
                      description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                      example:
                        - "651713"
                      items:
                        type: string
                      type: array
                    filters:
                      description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                      example:
                        items:
                          - field: country_code
                            operator: in
                            type: filter
                            value:
                              - DE
                          - items:
                              - field: employee_count
                                operator: in_range
                                type: filter
                                value:
                                  gte: 50
                              - field: industries
                                operator: in
                                type: filter
                                value:
                                  classification: nace
                                  codes:
                                    - "62.01"
                            operator: or
                            type: group
                        operator: and
                        type: group
                      properties:
                        items:
                          description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                          items:
                            $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                          type: array
                        operator:
                          description: The logical operator combining the items.
                          enum:
                            - and
                            - or
                          example: and
                          type: string
                        type:
                          description: Indicates this is the root filter group.
                          enum:
                            - group
                          example: group
                          type: string
                      required:
                        - type
                        - operator
                        - items
                      type: object
                    page:
                      description: Bounds how many of the matching companies are selected.
                      properties:
                        size:
                          description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                          example: 1000
                          minimum: 1
                          type: integer
                      type: object
                    sort:
                      description: Ordering applied to the matching companies. Omit to use the default ordering.
                      properties:
                        direction:
                          default: asc
                          description: Sort direction. Defaults to `asc`.
                          enum:
                            - asc
                            - desc
                          example: desc
                          type: string
                        field:
                          description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                          example: employee_count,name
                          type: string
                      type: object
                  required:
                    - filters
                  type: object
                items:
                  description: The company references of the request. Absent for a job created from a search selection.
                  items:
                    properties:
                      id:
                        description: The Leadfeeder company ID.
                        example: "129011"
                        type: string
                      type:
                        const: company
                        description: The entity type (always `company`).
                        example: company
                        type: string
                    type: object
                  type: array
                tags:
                  description: The tags the job removes.
                  items:
                    description: A bare reference to a tag by ID.
                    properties:
                      id:
                        description: The tag ID, as returned by the **Retrieve Tags** and **Get Tag Details** endpoints.
                        example: dd11fc370098e78e
                        type: string
                      type:
                        const: tag
                        example: tag
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - tags
              type: object
            created_at:
              description: When the job was created.
              example: "2026-05-13T12:00:00Z"
              format: date-time
              type: string
            errors:
              description: |-
                Empty unless `status` is `failed`, when it holds one error:

                - `job_failed`, "Tag removal could not be applied": the tags couldn't be removed.
                - For a job created from a search selection, the search's own code and title, such as `invalid_filters` when it rejects the filter tree, `invalid_parameter` when it rejects the sort field, `unprocessable_entity` when a list in the filters no longer exists, or `server_timeout` when it takes too long.
                - `advanced_search_failed`, "Advanced search failed": the search failed without an error of its own.
                - `invalid_parameter`, "Advanced search request was rejected": the search refused the request without an error of its own.

                Tags the job removed before it failed aren't put back.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
            summary:
              description: The outcome counts, once `status` is `completed`. A failed job can also have them, counting the companies it handled before it failed.
              properties:
                failed_count:
                  description: Companies the tags couldn't be removed from, and `items` whose ID isn't a number.
                  example: 0
                  type: integer
                removed:
                  description: Companies the tags were removed from, including those that didn't have them.
                  example: 2
                  type: integer
              type: object
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: batch_remove_tags_job
          example: batch_remove_tags_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    BuyerPersonaRequestV1:
      properties:
        data:
          properties:
            attributes:
              properties:
                filters:
                  description: Contact-level filter criteria that define the buyer persona, grouped by category. At least one category must be present and non-empty. Omit a category rather than sending it empty.
                  minProperties: 1
                  properties:
                    department:
                      description: Department filters.
                      items:
                        properties:
                          display_value:
                            description: Human-readable label for the department. Defaults to `search_value` when omitted.
                            example: Sales
                            type: string
                          negated:
                            default: false
                            description: When true, the filter excludes rather than includes contacts in this department.
                            type: boolean
                          search_value:
                            description: The department a contact works in.
                            enum:
                              - business_project_management_department
                              - consulting_department
                              - engineering_department
                              - finance_controlling_department
                              - hr_department
                              - it_department
                              - legal_compliance_department
                              - logistics_department
                              - management_department
                              - marketing_department
                              - media_communications_department
                              - product_department
                              - production_department
                              - purchasing_department
                              - qm_department
                              - rd_department
                              - sales_department
                              - students_apprentices
                              - support_department
                            example: sales_department
                            type: string
                        required:
                          - search_value
                        type: object
                      minItems: 1
                      type: array
                    job_title:
                      description: Job title keyword filters.
                      items:
                        properties:
                          display_value:
                            description: Human-readable label for the keyword. Defaults to `search_value` when omitted.
                            example: revenue operations
                            type: string
                          negated:
                            default: false
                            description: When true, the filter excludes rather than includes contacts whose title matches.
                            type: boolean
                          search_value:
                            description: Free text matched against the contact's job title.
                            example: revenue operations
                            type: string
                        required:
                          - search_value
                        type: object
                      minItems: 1
                      type: array
                    location:
                      description: Location filters.
                      items:
                        properties:
                          display_value:
                            description: Human-readable label for the place. Defaults to `search_value` when omitted.
                            example: Germany
                            type: string
                          negated:
                            default: false
                            description: When true, the filter excludes rather than includes contacts in this place.
                            type: boolean
                          search_value:
                            description: The place to match, in the form the entry's `type` expects.
                            example: DE
                            type: string
                          type:
                            default: country_code
                            description: What kind of place `search_value` names. `country_code` takes an ISO 3166-1 alpha-2 code (e.g. "DE"). `continent` takes one of `asia`, `north_america`, `africa`, `europe`, `south_america`, `antarctica`, `australia`. `world_region` takes one of `africa`, `latam`, `emea`, `amer`, `dach`, `apac`.
                            enum:
                              - country_code
                              - continent
                              - world_region
                            example: country_code
                            type: string
                        required:
                          - search_value
                        type: object
                      minItems: 1
                      type: array
                    seniority:
                      description: Seniority filters.
                      items:
                        properties:
                          display_value:
                            description: Human-readable label for the seniority. Defaults to `search_value` when omitted.
                            example: Top management
                            type: string
                          negated:
                            default: false
                            description: When true, the filter excludes rather than includes contacts at this level.
                            type: boolean
                          search_value:
                            description: How senior the contact is. Map job levels onto these three rather than inventing a code.
                            enum:
                              - top_management
                              - middle_management
                              - employees
                            example: top_management
                            type: string
                        required:
                          - search_value
                        type: object
                      minItems: 1
                      type: array
                  type: object
                name:
                  description: The human-readable name of the buyer persona
                  example: Sales Leaders
                  type: string
              type: object
            type:
              const: buyer_persona
              description: The type of the object
              example: buyer_persona
              type: string
          required:
            - type
            - attributes
          type: object
      required:
        - data
      type: object
    BuyerPersonaV1:
      properties:
        attributes:
          properties:
            app_url:
              description: Where the buyer persona can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/f/settings/website/123456/buyer-personas/42
              format: uri
              type:
                - string
                - "null"
            created_at:
              description: Date and time when the buyer persona was created
              example: "2024-12-10T15:57:25Z"
              format: date-time
              type: string
            filters:
              description: Filter criteria that define this buyer persona, grouped by filter category. Categories with no configured criteria are omitted. The object is empty when the buyer persona has no filters configured.
              properties:
                department:
                  description: Department filters.
                  items:
                    properties:
                      display_value:
                        description: The human-readable label of the filter value.
                        example: United States
                        type: string
                      negated:
                        description: When true, the filter excludes (rather than includes) matching results.
                        example: false
                        type: boolean
                      search_value:
                        description: The internal value used to match this filter (e.g. industry code, country code, employee range identifier).
                        example: US
                        type: string
                    required:
                      - display_value
                      - negated
                    type: object
                  type: array
                job_title:
                  description: Job title keyword filters.
                  items:
                    properties:
                      display_value:
                        description: The human-readable label of the filter value.
                        example: United States
                        type: string
                      negated:
                        description: When true, the filter excludes (rather than includes) matching results.
                        example: false
                        type: boolean
                      search_value:
                        description: The internal value used to match this filter (e.g. industry code, country code, employee range identifier).
                        example: US
                        type: string
                    required:
                      - display_value
                      - negated
                    type: object
                  type: array
                location:
                  description: Location filters.
                  items:
                    properties:
                      display_value:
                        description: The human-readable label of the filter value.
                        example: United States
                        type: string
                      negated:
                        description: When true, the filter excludes (rather than includes) matching results.
                        example: false
                        type: boolean
                      search_value:
                        description: The place this filter matches, in the form its `type` expects.
                        example: US
                        type: string
                      type:
                        description: "What kind of place `search_value` names. `country_code` is an ISO 3166-1 alpha-2 code, `continent` one of `asia`, `north_america`, `africa`, `europe`, `south_america`, `antarctica`, `australia`, and `world_region` one of `africa`, `latam`, `emea`, `amer`, `dach`, `apac`. `region` is legacy and read-only: it is rejected on create and update. May be absent on records created before the type was recorded; treat an absent value as `country_code`. Send it back unchanged when updating, or the filter is read as a country code and rejected."
                        enum:
                          - country_code
                          - continent
                          - world_region
                          - region
                        example: country_code
                        type: string
                    required:
                      - display_value
                      - negated
                    type: object
                  type: array
                seniority:
                  description: Seniority filters.
                  items:
                    properties:
                      display_value:
                        description: The human-readable label of the filter value.
                        example: United States
                        type: string
                      negated:
                        description: When true, the filter excludes (rather than includes) matching results.
                        example: false
                        type: boolean
                      search_value:
                        description: The internal value used to match this filter (e.g. industry code, country code, employee range identifier).
                        example: US
                        type: string
                    required:
                      - display_value
                      - negated
                    type: object
                  type: array
              type: object
            name:
              description: The human-readable name of the buyer persona
              example: Sales Managers
              type: string
          required:
            - name
            - created_at
            - filters
          type: object
        id:
          description: The unique identifier for the buyer persona
          example: "7421"
          type: string
        type:
          default: buyer_persona
          description: The type of the object
          example: buyer_persona
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CRMConnectionV1:
      properties:
        attributes:
          properties:
            enrichment_available:
              description: Whether enrichment data is available for this connection.
              type: boolean
            primary:
              type: boolean
            send_visits:
              type: boolean
          required:
            - send_visits
            - primary
          type: object
          x-apidog-orders:
            - send_visits
            - primary
            - enrichment_available
        id:
          description: The unique identifier for the crm connection
          type: string
        relationships:
          properties:
            crm_record:
              oneOf:
                - properties:
                    id:
                      type: string
                    type:
                      type: string
                  required:
                    - id
                    - type
                  type:
                    - object
                    - "null"
                  x-apidog-orders:
                    - id
                    - type
                - $ref: "#/components/schemas/CRMOrganizationV1"
                - $ref: "#/components/schemas/CRMContactV1"
                - $ref: "#/components/schemas/CRMLeadV1"
          required:
            - crm_record
          type: object
          x-apidog-orders:
            - crm_record
        type:
          const: crm_connection
          description: The type of the object
          example: crm_connection
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
      x-apidog-orders:
        - type
        - id
        - attributes
        - relationships
    CRMContactV1:
      properties:
        attributes:
          properties:
            city:
              type: string
            country:
              type: string
            crm_url:
              type: string
            email:
              type: string
            first_name:
              type: string
            job_title:
              type: string
            last_name:
              type: string
            remote_id:
              description: The record's id in the third-party CRM (distinct from the Leadfeeder uuid `id`).
              type: string
          type: object
          x-apidog-orders:
            - crm_url
            - first_name
            - last_name
            - email
            - country
            - city
            - job_title
            - remote_id
        id:
          description: The unique identifier for the crm contact
          type: string
        relationships:
          properties:
            crm_owner:
              oneOf:
                - properties:
                    id:
                      type: string
                    type:
                      examples:
                        - crm_user
                      type: string
                  required:
                    - type
                  type: object
                  x-apidog-orders:
                    - id
                    - type
                - $ref: "#/components/schemas/CRMUserV1"
          required:
            - crm_owner
          type: object
          x-apidog-orders:
            - crm_owner
        type:
          const: crm_contact
          description: The type of the object
          example: crm_contact
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
      x-apidog-orders:
        - type
        - id
        - attributes
        - relationships
    CRMGroupConnectionV1:
      properties:
        attributes:
          properties: {}
          type: object
          x-apidog-orders: []
        id:
          description: The unique identifier for the crm connection
          type: string
        relationships:
          properties:
            company:
              oneOf:
                - properties:
                    id:
                      type: string
                    type:
                      examples:
                        - company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                  x-apidog-orders:
                    - id
                    - type
                - $ref: "#/components/schemas/CompanyV1"
            crm_connection:
              oneOf:
                - properties:
                    id:
                      type: string
                    type:
                      examples:
                        - crm_connection
                      type: string
                  required:
                    - id
                    - type
                  type: object
                  x-apidog-orders:
                    - id
                    - type
                - $ref: "#/components/schemas/CRMConnectionV1"
          required:
            - crm_connection
            - company
          type: object
          x-apidog-orders:
            - crm_connection
            - company
        type:
          const: crm_group_connection
          description: The type of the object
          example: crm_group_connection
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
      x-apidog-orders:
        - type
        - id
        - attributes
        - relationships
      x-apidog-refs: {}
    CRMLeadV1:
      properties:
        attributes:
          properties:
            city:
              type: string
            country:
              type: string
            crm_url:
              type: string
            email:
              type: string
            first_name:
              type: string
            job_title:
              type: string
            last_name:
              type: string
            organization_name:
              type: string
            remote_id:
              description: The record's id in the third-party CRM (distinct from the Leadfeeder uuid `id`).
              type: string
          type: object
          x-apidog-orders:
            - crm_url
            - first_name
            - last_name
            - organization_name
            - email
            - country
            - city
            - job_title
            - remote_id
        id:
          description: The unique identifier for the crm lead
          type: string
        relationships:
          properties:
            crm_owner:
              oneOf:
                - properties:
                    id:
                      type: string
                    type:
                      examples:
                        - crm_user
                      type: string
                  type: object
                  x-apidog-orders:
                    - id
                    - type
                - $ref: "#/components/schemas/CRMUserV1"
          required:
            - crm_owner
          type: object
          x-apidog-orders:
            - crm_owner
        type:
          const: crm_lead
          description: The type of the object
          example: crm_lead
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
      x-apidog-orders:
        - type
        - id
        - attributes
        - relationships
    CRMOrganizationV1:
      properties:
        attributes:
          properties:
            city:
              type: string
            country:
              type: string
            crm_url:
              type: string
            name:
              type: string
            postal_code:
              type: string
            remote_id:
              description: The record's id in the third-party CRM (distinct from the Leadfeeder uuid `id`).
              type: string
            website:
              type: string
            zip_code:
              deprecated: true
              description: Deprecated and never populated; use `postal_code`. Retained for backward compatibility.
              type: string
          required:
            - name
            - crm_url
          type: object
          x-apidog-orders:
            - crm_url
            - name
            - country
            - city
            - postal_code
            - zip_code
            - website
            - remote_id
        id:
          description: The unique identifier for the crm organization
          type: string
        relationships:
          properties:
            crm_owner:
              oneOf:
                - properties:
                    id:
                      type: string
                    type:
                      examples:
                        - crm_user
                      title: ""
                      type:
                        - string
                        - "null"
                  type: object
                  x-apidog-orders:
                    - id
                    - type
                - $ref: "#/components/schemas/CRMUserV1"
          required:
            - crm_owner
          type: object
          x-apidog-orders:
            - crm_owner
        type:
          const: crm_organization
          description: The type of the object
          example: crm_organization
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
      x-apidog-orders:
        - type
        - id
        - attributes
        - relationships
    CRMSuggestionV1:
      properties:
        attributes:
          properties:
            match_score:
              type: number
          type: object
          x-apidog-orders:
            - match_score
        id:
          description: The unique identifier for the crm suggestion
          type: string
        relationships:
          properties:
            crm_record:
              oneOf:
                - properties:
                    id:
                      type: string
                    type:
                      type: string
                  required:
                    - id
                    - type
                  type:
                    - object
                    - "null"
                  x-apidog-orders:
                    - id
                    - type
                - $ref: "#/components/schemas/CRMOrganizationV1"
                - $ref: "#/components/schemas/CRMContactV1"
                - $ref: "#/components/schemas/CRMLeadV1"
          required:
            - crm_record
          type: object
          x-apidog-orders:
            - crm_record
        type:
          const: crm_suggestion
          description: The type of the object
          example: crm_suggestion
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
      x-apidog-orders:
        - type
        - id
        - attributes
        - relationships
    CRMUserV1:
      properties:
        attributes:
          properties:
            email:
              type: string
            first_name:
              deprecated: true
              description: Deprecated and never populated; use `name`. Retained for backward compatibility.
              type: string
            name:
              type: string
            remote_id:
              description: The crm user's id in the third-party CRM (distinct from the Leadfeeder uuid `id`).
              type: string
          type: object
          x-apidog-orders:
            - name
            - first_name
            - email
            - remote_id
        id:
          description: The Leadfeeder uuid of the crm user
          type: string
        relationships:
          properties:
            user:
              description: The Leadfeeder account user this crm user maps to, or null when there is no match.
              properties:
                id:
                  type: string
                type:
                  const: user
                  type: string
              type:
                - object
                - "null"
              x-apidog-orders:
                - id
                - type
          type: object
          x-apidog-orders:
            - user
        type:
          const: crm_user
          description: The type of the object
          example: crm_user
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
      x-apidog-orders:
        - type
        - id
        - attributes
        - relationships
    CampaignLocationV1:
      properties:
        attributes:
          properties:
            country_code:
              description: ISO 3166-1 alpha-2 country code of the target location.
              example: PT
              type: string
            location_type:
              description: Geographical granularity of the target location.
              enum:
                - global
                - region
                - country
                - city
              example: country
              type: string
            name:
              description: Human-readable name of the location (city, region, or country).
              example: Portugal
              type: string
          required:
            - name
            - location_type
            - country_code
          type: object
        id:
          description: Identifier of the campaign-location association.
          example: "98765"
          type: string
        type:
          const: campaign_location
          description: The type of the object.
          example: campaign_location
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CampaignSettingsV1:
      properties:
        attributes:
          properties:
            ads_visible_only_on_weekdays:
              description: When `true`, ads served by the campaign are limited to Monday–Friday delivery windows.
              example: false
              type: boolean
            automatically_include_new_target_companies:
              description: When `true`, companies that newly enter the target audience list are automatically added to the campaign's active targets.
              example: true
              type: boolean
            automatically_remove_target_companies:
              description: When `true`, companies removed from the target audience list are automatically deactivated as campaign targets.
              example: true
              type: boolean
            brand_safety_domains_exclusion_enabled:
              description: When `true`, Leadfeeder's brand-safety domain exclusion list is applied to the campaign, preventing ad delivery on flagged domains.
              example: true
              type: boolean
          required:
            - brand_safety_domains_exclusion_enabled
            - automatically_include_new_target_companies
            - automatically_remove_target_companies
            - ads_visible_only_on_weekdays
          type: object
        id:
          description: Identifier of the campaign settings resource. Matches the parent campaign's id.
          example: "1234"
          type: string
        type:
          const: campaign_settings
          description: The type of the object.
          example: campaign_settings
          type: string
      required:
        - type
        - attributes
      type: object
    CampaignStatsV1:
      properties:
        attributes:
          properties:
            currency:
              description: ISO 4217 currency code in which monetary values are reported.
              example: EUR
              type: string
            date:
              description: Start date of the stats bucket. For `frequency=week` this is the first day of the week, for `frequency=month` it is the first day of the month.
              example: "2026-04-15"
              format: date
              type: string
            ecpm:
              description: Effective cost per mille (per 1000 impressions) within the bucket.
              example: 12340
              format: float
              type: number
            ecpv:
              description: Effective cost per attributed visit within the bucket.
              example: 53.65
              format: float
              type: number
            impressions:
              description: Ad impressions delivered within the bucket.
              example: 100
              type: integer
            influenced_count:
              description: Distinct companies influenced within the bucket.
              example: 1
              type: integer
            reached_count:
              description: Distinct companies reached within the bucket.
              example: 1
              type: integer
            total_cost:
              description: Total spend within the bucket.
              example: 1234
              format: float
              type: number
            visits:
              description: Website visits attributed to the campaign within the bucket.
              example: 23
              type: integer
            vtr:
              description: "Visit-through rate (`visits / impressions`) within the bucket, expressed as a percentage: `23.0` means 23%."
              example: 23
              format: float
              type: number
          required:
            - date
            - impressions
            - visits
            - reached_count
            - influenced_count
            - ecpm
            - total_cost
            - ecpv
            - vtr
            - currency
          type: object
        id:
          description: Opaque, stable identifier for the stats bucket. Treat it as an opaque string; it is a Base64-encoded token derived from the campaign id and the bucket's date range.
          example: MTIzNHwyMDI2LTA0LTE1fDIwMjYtMDQtMTU=
          type: string
        type:
          const: campaign_stats
          description: The type of the object.
          example: campaign_stats
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CampaignSummaryV1:
      properties:
        attributes:
          properties:
            audience_count:
              description: Size of the audience list backing the campaign.
              example: 250
              type: integer
            clicks:
              description: Total ad clicks recorded over the campaign lifetime.
              example: 50
              type: integer
            cost_per_company:
              description: Total cost divided by reached_count.
              example: 3.13
              format: float
              type: number
            ctr:
              description: "Click-through rate (`clicks / impressions`) expressed as a percentage: `5.0` means 5%."
              example: 5
              format: float
              type: number
            currency:
              description: ISO 4217 currency code in which monetary values are reported.
              example: EUR
              type: string
            ecpc:
              description: Effective cost per click.
              example: 0.5
              format: float
              type: number
            ecpm:
              description: Effective cost per mille (per 1000 impressions).
              example: 25
              format: float
              type: number
            ecpv:
              description: Effective cost per attributed website visit.
              example: 2.5
              format: float
              type: number
            impressions:
              description: Total ad impressions delivered over the campaign lifetime.
              example: 1000
              type: integer
            influenced_count:
              description: Distinct companies attributed to the campaign through subsequent tracked engagement.
              example: 4
              type: integer
            reached_count:
              description: Distinct companies that received at least one impression.
              example: 8
              type: integer
            targeted_count:
              description: Number of companies currently targeted by the campaign.
              example: 120
              type: integer
            total_cost:
              description: Total spend over the campaign lifetime.
              example: 25
              format: float
              type: number
            visits_count:
              description: Website visits attributed to the campaign.
              example: 10
              type: integer
            vtr:
              description: "Visit-through rate (`visits_count / impressions`) expressed as a percentage: `1.0` means 1%."
              example: 1
              format: float
              type: number
          required:
            - clicks
            - impressions
            - targeted_count
            - audience_count
            - reached_count
            - influenced_count
            - visits_count
            - currency
            - ecpm
            - ecpc
            - ctr
            - total_cost
            - ecpv
            - vtr
            - cost_per_company
          type: object
        id:
          description: Identifier of the campaign summary resource. Matches the parent campaign's id.
          example: "1234"
          type: string
        type:
          const: campaign_summary
          description: The type of the object.
          example: campaign_summary
          type: string
      required:
        - type
        - attributes
      type: object
    CampaignV1:
      properties:
        attributes:
          properties:
            app_url:
              description: Where the campaign can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/a/123456/campaigns/42
              format: uri
              type:
                - string
                - "null"
            budget:
              description: "Configured budget value, expressed in the smallest indivisible unit consistent with the campaign's `currency`. The meaning depends on `budget_type`: total spend cap for `total`, daily cap for `daily`."
              example: 1000
              type: number
            budget_left:
              description: Remaining budget headroom (`total_budget - budget_spent`), in units of `currency`. Never negative.
              example: 1000
              format: float
              type: number
            budget_spent:
              description: Amount already spent by the campaign, in units of `currency`.
              example: 0
              format: float
              type: number
            budget_type:
              description: How the campaign's budget cap is applied.
              enum:
                - total
                - daily
              example: total
              type: string
            can_be_started:
              description: Whether the campaign currently passes all preflight checks required to transition out of `draft`. `false` indicates missing configuration (budget, audience, locations, …).
              example: false
              type: boolean
            created_at:
              description: Datetime when the campaign was created.
              example: "2026-04-01T09:15:00Z"
              format: date-time
              type: string
            currency:
              description: "ISO 4217 currency code for all monetary fields on the campaign (`budget`, `total_budget`, `budget_spent`, `budget_left`). Not user-controllable: it is inherited from the subscription that was active at the moment the campaign was started. Leadfeeder's billing system is currency-agnostic and assumes every chargeable campaign on an account uses the same currency as the current subscription — campaigns are not run across multiple currencies."
              example: EUR
              type: string
            end_date:
              description: Scheduled end datetime of the campaign. `null` for open-ended campaigns. Otherwise set from the moment an end date is configured, regardless of the campaign's lifecycle status.
              example: "2026-08-01T00:00:00Z"
              oneOf:
                - type: "null"
                - format: date-time
                  type: string
            location_type:
              description: Geographical granularity of the campaign's targeting.
              enum:
                - global
                - region
                - country
                - city
              example: global
              type: string
            name:
              description: Human-readable name of the campaign.
              example: Q2 EMEA enterprise push
              type: string
            start_date:
              description: |-
                Scheduled start datetime of the campaign. Always present — a campaign cannot be created without a start date.

                Caveat: if a campaign gets stuck in `scheduled` past its original start date (for example because of an unresolved billing issue on the account), `start_date` is updated in place to the date the campaign is unstuck and actually begins delivering. Treat this field as the campaign's effective start, not necessarily the originally-configured one.
              example: "2026-05-01T00:00:00Z"
              format: date-time
              type: string
            status:
              description: |-
                Lifecycle status of the campaign.

                - `draft` — campaign is still being configured. No delivery, no spend. Can be transitioned into `scheduled` / `running` once `can_be_started` is `true`.
                - `scheduled` — campaign is fully configured and queued; ads start delivering when `start_date` is reached. No spend yet.
                - `running` — campaign is actively serving ads and consuming budget.
                - `paused` — campaign was previously `scheduled` or `running` and has been paused by the user. Delivery is halted and no further budget is consumed; can be resumed back to `running`.
                - `stopped` — delivery is automatically halted by Leadfeeder because of an external blocker (most commonly an unresolved billing issue on the account). The campaign resumes automatically once the blocker is cleared; the user cannot transition out of this state directly. Surfaced both for campaigns whose underlying status is `stopped` and for campaigns that are technically `scheduled` while the account has a billing issue.
                - `terminated` — campaign was permanently stopped by the user before reaching `end_date`. Terminal state; cannot be resumed.
                - `ended` — campaign reached its scheduled `end_date` and completed naturally. Terminal state.
              enum:
                - draft
                - scheduled
                - running
                - paused
                - stopped
                - terminated
                - ended
              example: draft
              type: string
            targets_crm_open_opportunities:
              description: "`true` when the campaign's audience list is the dynamic \"CRM accounts with open opportunities\" list."
              example: false
              type: boolean
            total_budget:
              description: Effective total spend cap for the campaign, in units of `currency`. For `budget_type=total` this equals `budget`; for `budget_type=daily` it is the daily budget multiplied by the scheduled run length, or `null` for open-ended campaigns, whose run length is unbounded.
              example: 1000
              oneOf:
                - type: "null"
                - type: number
            updated_at:
              description: Datetime when the campaign was last updated.
              example: "2026-04-12T11:30:00Z"
              format: date-time
              type: string
          required:
            - name
            - status
            - start_date
            - end_date
            - location_type
            - budget_type
            - budget
            - total_budget
            - budget_spent
            - budget_left
            - currency
            - can_be_started
            - targets_crm_open_opportunities
            - created_at
            - updated_at
          type: object
        id:
          description: The unique identifier for the campaign.
          example: "1234"
          type: string
        relationships:
          description: Reference pointers to related resources. Each relationship carries `id` / `type` by default; when the matching value is requested through `include=`, the resource is inlined under the same key with its full `attributes` block.
          properties:
            campaign_locations:
              description: Geographical targets attached to the campaign. Each item is inlined with its `attributes` when `include=campaign_locations` is set; otherwise each entry is an `id` / `type` reference only.
              items:
                oneOf:
                  - additionalProperties: false
                    description: Reference returned by default — `id` / `type` only, when `include=campaign_locations` is not requested.
                    properties:
                      id:
                        example: "98765"
                        type: string
                      type:
                        const: campaign_location
                        type: string
                    required:
                      - id
                      - type
                    type: object
                  - $ref: "#/components/schemas/CampaignLocationV1"
              type: array
            campaign_settings:
              description: Campaign-level configuration toggles. Inlined as a full `campaign_settings` resource when `include=campaign_settings` is set; otherwise an `id` / `type` reference.
              oneOf:
                - additionalProperties: false
                  description: Reference returned by default — `id` / `type` only, when `include=campaign_settings` is not requested.
                  properties:
                    id:
                      example: "1234"
                      type: string
                    type:
                      const: campaign_settings
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CampaignSettingsV1"
            campaign_summary:
              description: Aggregated lifetime performance summary. Inlined as a full `campaign_summary` resource when `include=campaign_summary` is set; otherwise an `id` / `type` reference.
              oneOf:
                - additionalProperties: false
                  description: Reference returned by default — `id` / `type` only, when `include=campaign_summary` is not requested.
                  properties:
                    id:
                      example: "1234"
                      type: string
                    type:
                      const: campaign_summary
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CampaignSummaryV1"
            created_by:
              description: The user who created the campaign.
              oneOf:
                - description: No user associated with this campaign.
                  type: "null"
                - properties:
                    id:
                      description: The Leadfeeder user ID.
                      example: "12345"
                      type: string
                    type:
                      default: user
                      type: string
                  required:
                    - id
                    - type
                  type: object
            custom_feed:
              description: Custom website-visit feed used for retargeting. Inlined as a full `custom_feed` resource when `include=custom_feed` is set; otherwise an `id` / `type` reference.
              oneOf:
                - description: The campaign has no `feed_id` set, or the stored `feed_id` no longer resolves to a live custom feed.
                  type: "null"
                - additionalProperties: false
                  description: Reference returned by default — `id` / `type` only, when `include=custom_feed` is not requested.
                  properties:
                    id:
                      example: feed-100
                      type: string
                    type:
                      const: custom_feed
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CustomFeedV1"
            list:
              description: Audience list (target companies) backing the campaign. Inlined as a full `list` resource when `include=list` is set; otherwise an `id` / `type` reference.
              oneOf:
                - description: The campaign has no audience list assigned, or the assigned list could not be resolved (and `include=list` was not requested).
                  type: "null"
                - additionalProperties: false
                  description: Reference returned by default — `id` / `type` only, when `include=list` is not requested.
                  properties:
                    id:
                      example: company_42
                      type: string
                    type:
                      const: list
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/ListV1"
          required:
            - created_by
            - list
            - custom_feed
            - campaign_settings
            - campaign_summary
            - campaign_locations
          type: object
        type:
          const: campaign
          description: The type of the object.
          example: campaign
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    CompaniesAdvancedSearchFilterItem:
      oneOf:
        - description: Filter by company HQ country.
          example:
            field: country_code
            operator: in
            type: filter
            value:
              - DE
              - AT
              - CH
          properties:
            field:
              enum:
                - country_code
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: ISO 3166-1 alpha-2 codes.
              items:
                example: DE
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Country Code Filter
          type: object
        - description: Filter by company HQ state/region code.
          example:
            field: region_code
            operator: in
            type: filter
            value:
              - DE1
              - DE3
          properties:
            field:
              enum:
                - region_code
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: "NUTS codes for European countries (e.g. `DE1`, `FR1`); ISO 3166-2 codes with underscores in place of hyphens for countries outside Europe (e.g. `US_CA`). Mirrors the value vocabulary of `_RegionCode.yaml` used by Search Companies. A company has one region code, at the NUTS level its country uses: NUTS 1 for Germany and France, NUTS 2 for Austria (e.g. `AT13`). A code at another level, such as `DE21`, `FR10` or `AT1`, matches nothing."
              items:
                example: DE1
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Region Code Filter
          type: object
        - description: Filter by company HQ city. `in` — exact list of city names. `begins_with` — prefix match (case-insensitive; 3+ chars recommended for performance).
          example:
            field: city
            operator: in
            type: filter
            value:
              - Berlin
              - Munich
          properties:
            field:
              enum:
                - city
              type: string
            operator:
              enum:
                - in
                - begins_with
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              oneOf:
                - description: Exact city names — use with `in`.
                  items:
                    type: string
                  minItems: 1
                  type: array
                - description: City name prefix — use with `begins_with`.
                  minLength: 1
                  type: string
          required:
            - type
            - field
            - operator
            - value
          title: City Filter
          type: object
        - description: Filter by company HQ postal code. `in` — exact list (up to 8 000 values). `begins_with` — fast prefix match via `index_prefixes`. `in_range` — lexicographic range; combine with `country_code` for reliable ordering within one country.
          example:
            field: postal_code
            operator: begins_with
            type: filter
            value: "1"
          properties:
            field:
              enum:
                - postal_code
              type: string
            operator:
              enum:
                - in
                - begins_with
                - in_range
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              oneOf:
                - description: Exact postal codes — use with `in`.
                  items:
                    type: string
                  minItems: 1
                  type: array
                - description: Postal code prefix — use with `begins_with`.
                  minLength: 1
                  type: string
                - description: Lexicographic bounds — use with `in_range`.
                  minProperties: 1
                  properties:
                    gte:
                      example: "10000"
                      type: string
                    lte:
                      example: "19999"
                      type: string
                  type: object
          required:
            - type
            - field
            - operator
            - value
          title: Postal Code Filter
          type: object
        - description: Filter by distance from a geographic point (company HQ coordinates). `distance` is in kilometers and is clamped to a minimum of 0.01 km. Field names mirror `locations[].geo` in Search Companies.
          example:
            field: geo
            operator: within
            type: filter
            value:
              distance: 50
              latitude: 52.52
              longitude: 13.405
          properties:
            field:
              enum:
                - geo
              type: string
            label:
              description: Name of the place at the center point, for display only. The search ignores it.
              example: Stuttgart, Germany
              type: string
            operator:
              enum:
                - within
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              properties:
                distance:
                  description: Search radius in kilometers.
                  example: 50
                  format: double
                  minimum: 0.01
                  type: number
                latitude:
                  description: Latitude of the center point.
                  example: 52.52
                  format: double
                  type: number
                longitude:
                  description: Longitude of the center point.
                  example: 13.405
                  format: double
                  type: number
              required:
                - latitude
                - longitude
                - distance
              type: object
          required:
            - type
            - field
            - operator
            - value
          title: Geo Filter
          type: object
        - description: Filter by the exact numeric employee count. At least one of `gte`/`lte` is required.
          example:
            field: employee_count
            operator: in_range
            type: filter
            value:
              gte: 50
              lte: 500
          properties:
            field:
              enum:
                - employee_count
              type: string
            operator:
              enum:
                - in_range
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              minProperties: 1
              properties:
                gte:
                  example: 50
                  minimum: 0
                  type: integer
                lte:
                  example: 500
                  minimum: 0
                  type: integer
              type: object
          required:
            - type
            - field
            - operator
            - value
          title: Employee Count Filter
          type: object
        - description: Filter by a headcount bucket label. Accepts the same vocabulary as Search Companies — see `_CompanyEmployeeRange.yaml` (note the dotted thousands separator).
          example:
            field: employee_range
            operator: in
            type: filter
            value:
              - 11-100
              - 101-500
          properties:
            field:
              enum:
                - employee_range
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              items:
                description: A range indicator of the approximate headcount for this company.
                enum:
                  - 1-10
                  - 11-100
                  - 101-500
                  - 501-1.000
                  - 1.001-5.000
                  - 5.001-10.000
                  - 10.000+
                  - null
                example: 101-500
                type:
                  - string
                  - "null"
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Employee Range Filter
          type: object
        - description: Filter by the year the company was founded. Bounds are calendar years (integers) from 1000 to 9999; at least one of `gte`/`lte` is required.
          example:
            field: founded_year
            operator: in_range
            type: filter
            value:
              gte: 2010
              lte: 2020
          properties:
            field:
              enum:
                - founded_year
              type: string
            operator:
              enum:
                - in_range
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              minProperties: 1
              properties:
                gte:
                  example: 2010
                  type: integer
                lte:
                  example: 2020
                  type: integer
              type: object
          required:
            - type
            - field
            - operator
            - value
          title: Founded Year Filter
          type: object
        - description: Filter by annual revenue in EUR. At least one of `gte`/`lte` is required. Type matches `revenue.{min,max}` in Search Companies (integer EUR).
          example:
            field: revenue
            operator: in_range
            type: filter
            value:
              gte: 1000000
          properties:
            field:
              enum:
                - revenue
              type: string
            operator:
              enum:
                - in_range
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              minProperties: 1
              properties:
                gte:
                  example: 1000000
                  minimum: 0
                  type: integer
                lte:
                  example: 10000000
                  minimum: 0
                  type: integer
              type: object
          required:
            - type
            - field
            - operator
            - value
          title: Revenue Filter
          type: object
        - description: "Filter by the company's role within a corporate group. Allowed values: `standalone`, `group`, `subsidiary`."
          example:
            field: role
            operator: in
            type: filter
            value:
              - standalone
              - subsidiary
          properties:
            field:
              enum:
                - role
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              items:
                enum:
                  - standalone
                  - group
                  - subsidiary
                example: standalone
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Role Filter
          type: object
        - description: Filter by company name. `contains` — every word must appear in the name or the trade name, in any order; the last word can be partial ("Acme Sof" finds "Acme Software GmbH"). `exactly_matches` — case-insensitive exact match. `begins_with` — prefix match (case-insensitive). `ends_with` — suffix match (case-insensitive).
          example:
            field: name
            operator: begins_with
            type: filter
            value: Dealer
          properties:
            field:
              enum:
                - name
              type: string
            operator:
              enum:
                - contains
                - exactly_matches
                - begins_with
                - ends_with
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              minLength: 1
              type: string
          required:
            - type
            - field
            - operator
            - value
          title: Name Filter
          type: object
        - description: "Filter by the company's domains: the domain of its website and the others it's known by, such as its email domain. Values can be full web addresses or bare domains (`https://www.acme.com/about`, `acme.com`); each is matched by its domain, so any page on the same site matches. Values that are not valid web addresses are ignored."
          example:
            field: urls
            operator: in
            type: filter
            value:
              - acme.com
              - https://www.example.co.uk/shop
          properties:
            field:
              enum:
                - urls
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: Website addresses or domains.
              items:
                example: acme.com
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Websites Filter
          type: object
        - description: Filter by company keyword tags. Keywords are indexed per language (en/de/fr); all operators search across all three simultaneously. `in` — exact match against any of the given keywords. `begins_with` — prefix match (case-insensitive). `contains` — any-token text search.
          example:
            field: keywords
            operator: in
            type: filter
            value:
              - Software
              - SaaS
          properties:
            field:
              enum:
                - keywords
              type: string
            operator:
              enum:
                - in
                - begins_with
                - contains
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              oneOf:
                - description: Exact keyword list — use with `in`.
                  items:
                    type: string
                  minItems: 1
                  type: array
                - description: Single keyword or prefix/query string — use with `begins_with` or `contains`.
                  minLength: 1
                  type: string
          required:
            - type
            - field
            - operator
            - value
          title: Keywords Filter
          type: object
        - description: "Filter by industry codes. The `classification` discriminator selects the code system; `codes` is the list of codes to match. Hierarchy-aware: a code matches the company itself as well as any company whose industry descends from the supplied code. Shape mirrors `industries` in Search Companies."
          example:
            field: industries
            operator: in
            type: filter
            value:
              classification: nace
              codes:
                - "62.01"
                - "62.02"
          properties:
            field:
              enum:
                - industries
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              properties:
                classification:
                  description: Code system. `nace` — NACE Rev. 2 (e.g. `62.01`). `wz` — German WZ 2008 (e.g. `62.01.1`). `internal` — the industry taxonomy a company's `industries.industry` uses (e.g. `1594.6.4`).
                  enum:
                    - wz
                    - nace
                    - internal
                  example: nace
                  type: string
                codes:
                  description: "List of codes from the selected classification, as **Get Industries** lists them (`62.01`). They can also be written with underscores: `62_01`."
                  examples:
                    - - "62.01"
                    - - "62.01"
                      - "62.02"
                  items:
                    type: string
                  minItems: 1
                  type: array
              required:
                - classification
                - codes
              type: object
          required:
            - type
            - field
            - operator
            - value
          title: Industries Filter
          type: object
        - description: Filter by Ideal Customer Profile segment IDs. Each segment's stored criteria — country codes, industry codes and employee count ranges — are applied together. Passing several IDs matches companies fitting any one of the segments. Field name and value shape mirror `icp_ids` in Search Companies.
          example:
            field: icp_ids
            operator: in
            type: filter
            value:
              - "42"
              - "101"
          properties:
            field:
              enum:
                - icp_ids
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: ICP segment IDs as returned by the Ideal Customer Profiles endpoint.
              items:
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: ICP IDs Filter
          type: object
        - description: "Find companies similar to a set of seed companies you already know are a good fit. The seeds are described by a seed field and its values: the websites of companies you have in mind, your saved company lists, or the companies on CRM opportunities in given statuses. Up to 10,000 seed companies are considered. The seed companies themselves never appear in the results, and the results can be narrowed further with any other filter."
          example:
            field: lookalikes
            operator: in
            type: filter
            value:
              field: urls
              mode: balanced
              values:
                - stripe.com
                - notion.so
          properties:
            field:
              enum:
                - lookalikes
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              properties:
                field:
                  description: Where the seed companies come from.
                  enum:
                    - urls
                    - lists
                    - crm_opportunity_status
                  type: string
                  x-apidog-enum:
                    - description: Company website addresses or domains.
                      value: urls
                    - description: Saved company list IDs (prefixed with `company_`).
                      value: lists
                    - description: Companies on CRM opportunities with any of the given statuses (`won`, `open`, `lost`).
                      value: crm_opportunity_status
                mode:
                  default: balanced
                  description: How similar results must be.
                  enum:
                    - precise
                    - balanced
                    - broad
                  type: string
                  x-apidog-enum:
                    - description: Only the closest matches — fewer companies, higher confidence.
                      value: precise
                    - description: A healthy mix of relevance and reach. Recommended for most searches.
                      value: balanced
                    - description: More companies, looser match — the widest net for maximum reach.
                      value: broad
                values:
                  description: Values for the selected seed field — website addresses, list IDs, or opportunity statuses.
                  items:
                    type: string
                  minItems: 1
                  type: array
              required:
                - field
                - values
              type: object
          required:
            - type
            - field
            - operator
            - value
          title: Lookalikes Filter
          type: object
        - description: Filter by whether the company or its corporate group has website-visitor (IP) tracking data. `true` matches companies where either has IP data; `false` matches those where neither has. The `has_ip_addresses` filter of Search Companies has the same name but counts only the company's own IP data.
          example:
            field: has_ip_addresses
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_ip_addresses
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has IP Addresses Filter
          type: object
        - description: Filter by whether the company has any email address.
          example:
            field: has_email
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_email
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has Email Filter
          type: object
        - description: Filter by whether the company has a landline or mobile number. A fax number doesn't count.
          example:
            field: has_phone
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_phone
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has Phone Filter
          type: object
        - description: Filter by whether the company has a website URL.
          example:
            field: has_url
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_url
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has URL Filter
          type: object
        - description: Filter by whether the company has a Facebook profile.
          example:
            field: has_facebook
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_facebook
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has Facebook Filter
          type: object
        - description: Filter by whether the company has an Instagram profile.
          example:
            field: has_instagram
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_instagram
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has Instagram Filter
          type: object
        - description: Filter by whether the company has a LinkedIn profile.
          example:
            field: has_linkedin
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_linkedin
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has LinkedIn Filter
          type: object
        - description: Filter by whether the company has a Pinterest profile.
          example:
            field: has_pinterest
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_pinterest
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has Pinterest Filter
          type: object
        - description: Filter by whether the company has a Twitter/X profile.
          example:
            field: has_twitter
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_twitter
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has Twitter Filter
          type: object
        - description: Filter by whether the company has a Xing profile.
          example:
            field: has_xing
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_xing
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has Xing Filter
          type: object
        - description: Filter by whether the company has a YouTube channel.
          example:
            field: has_youtube
            operator: is
            type: filter
            value: true
          properties:
            field:
              enum:
                - has_youtube
              type: string
            operator:
              enum:
                - is
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              type: boolean
          required:
            - type
            - field
            - operator
            - value
          title: Has YouTube Filter
          type: object
        - description: Filter by the company's CRM connection status. A company has one status, so the values don't overlap. When `include_corporate_group` is true, the filter additionally applies to every company sharing a corporate group (HQ + subsidiaries) with a matching company — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it.
          example:
            field: crm_connection_status
            operator: in
            type: filter
            value:
              - has_primary_connection
              - empty
          properties:
            field:
              enum:
                - crm_connection_status
              type: string
            include_corporate_group:
              default: false
              description: When true, the filter also applies to every company that shares a corporate group (HQ + subsidiaries) with a matching company — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it.
              type: boolean
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              items:
                enum:
                  - has_connections
                  - has_primary_connection
                  - has_suggestions
                  - empty
                example: has_primary_connection
                type: string
              minItems: 1
              type: array
              x-apidog-enum:
                - description: The company has CRM connections, but none of them is primary.
                  value: has_connections
                - description: The company has a primary CRM connection.
                  value: has_primary_connection
                - description: The company has CRM connection suggestions but no confirmed connection.
                  value: has_suggestions
                - description: The company has no CRM connections or suggestions.
                  value: empty
          required:
            - type
            - field
            - operator
            - value
          title: CRM Connection Status Filter
          type: object
        - description: Filter by CRM opportunity status. When `include_corporate_group` is true, the filter additionally applies to every company sharing a corporate group (HQ + subsidiaries) with a matching company — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it.
          example:
            field: crm_opportunity_status
            operator: in
            type: filter
            value:
              - won
              - open
          properties:
            field:
              enum:
                - crm_opportunity_status
              type: string
            include_corporate_group:
              default: false
              description: When true, the filter also applies to every company that shares a corporate group (HQ + subsidiaries) with a matching company — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it.
              type: boolean
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: One or more of `won`, `open`, `lost` — selecting multiple ORs the buckets.
              items:
                enum:
                  - won
                  - open
                  - lost
                example: won
                type: string
              minItems: 1
              type: array
              x-apidog-enum:
                - description: The company has at least one won opportunity.
                  value: won
                - description: The company has at least one open (in-progress) opportunity.
                  value: open
                - description: The company has at least one lost opportunity.
                  value: lost
          required:
            - type
            - field
            - operator
            - value
          title: CRM Opportunity Status Filter
          type: object
        - description: Filter by company tag IDs — restricts results to companies tagged with any of the supplied tag IDs. When `include_corporate_group` is true, the filter additionally applies to every company sharing a corporate group (HQ + subsidiaries) with a tagged company — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it.
          example:
            field: tags
            operator: in
            type: filter
            value:
              - abc123
              - def456
          properties:
            field:
              enum:
                - tags
              type: string
            include_corporate_group:
              default: false
              description: When true, the filter also applies to every company that shares a corporate group (HQ + subsidiaries) with a matching company — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it.
              type: boolean
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: Tag IDs as returned by the Tags endpoint.
              items:
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Tags Filter
          type: object
        - description: Filter by saved company list IDs — restricts results to companies that are members of any of the supplied lists. When `include_corporate_group` is true, the filter additionally matches every company sharing a corporate group (HQ + subsidiaries) with a company on the supplied lists — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it. Prefer setting `include_corporate_group` on the filter item itself, like the tags and CRM filters; the form inside `value` is deprecated but still supported and behaves identically.
          example:
            field: lists
            operator: in
            type: filter
            value:
              include_corporate_group: true
              list_ids:
                - company_42
                - company_101
          properties:
            field:
              enum:
                - lists
              type: string
            include_corporate_group:
              default: false
              description: When true, the filter also applies to every company that shares a corporate group (HQ + subsidiaries) with a matching company — for an exclusion filter this removes the whole corporate group, for an inclusion filter it adds it.
              type: boolean
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              properties:
                include_corporate_group:
                  default: false
                  deprecated: true
                  description: Deprecated — set `include_corporate_group` on the filter item itself instead (next to `field` and `operator`), like the tags and CRM filters. This form keeps working and behaves identically.
                  type: boolean
                list_ids:
                  description: List IDs as returned by the Lists endpoint (prefixed with `company_`).
                  items:
                    example: company_123
                    type: string
                  minItems: 1
                  type: array
              required:
                - list_ids
              type: object
          required:
            - type
            - field
            - operator
            - value
          title: Lists Filter
          type: object
        - description: Filter by the department a contact works in. Matches companies that have at least one contact in any of the given departments. When combined with other `contact_*` filters via `and`, all must match the same contact.
          example:
            field: contact_departments
            operator: in
            type: filter
            value:
              - sales_department
              - marketing_department
          properties:
            field:
              enum:
                - contact_departments
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              allOf:
                - description: The departments the contact works in within the company.
                  example:
                    - marketing_department
                    - students_apprentices
                  items:
                    enum:
                      - management_department
                      - sales_department
                      - it_department
                      - business_project_management_department
                      - finance_controlling_department
                      - engineering_department
                      - hr_department
                      - marketing_department
                      - consulting_department
                      - media_communications_department
                      - support_department
                      - rd_department
                      - students_apprentices
                      - production_department
                      - logistics_department
                      - legal_compliance_department
                      - qm_department
                      - product_department
                      - purchasing_department
                    type: string
                  type: array
                  x-apidog-enum:
                    - name: Management Department
                      value: management_department
                    - name: Sales Department
                      value: sales_department
                    - name: IT Department
                      value: it_department
                    - name: Business Project Management Department
                      value: business_project_management_department
                    - name: Finance Controlling Department
                      value: finance_controlling_department
                    - name: Engineering Department
                      value: engineering_department
                    - name: HR Department
                      value: hr_department
                    - name: Marketing Department
                      value: marketing_department
                    - name: Consulting Department
                      value: consulting_department
                    - name: Media Communications Department
                      value: media_communications_department
                    - name: Support Department
                      value: support_department
                    - name: RD Department
                      value: rd_department
                    - name: Students Apprentices
                      value: students_apprentices
                    - name: Production Department
                      value: production_department
                    - name: Logistics Department
                      value: logistics_department
                    - name: Legal Compliance Department
                      value: legal_compliance_department
                    - name: QM Department
                      value: qm_department
                    - name: Product Department
                      value: product_department
                    - name: Purchasing Department
                      value: purchasing_department
                - minItems: 1
          required:
            - type
            - field
            - operator
            - value
          title: Contact Departments Filter
          type: object
        - description: Filter by a contact's seniority. Matches companies that have at least one contact at any of the given hierarchy levels. When combined with other `contact_*` filters via `and`, all must match the same contact.
          example:
            field: contact_hierarchy_level
            operator: in
            type: filter
            value:
              - top_management
              - middle_management
          properties:
            field:
              enum:
                - contact_hierarchy_level
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              items:
                enum:
                  - employees
                  - middle_management
                  - top_management
                example: top_management
                type: string
              minItems: 1
              type: array
              x-apidog-enum:
                - name: Employees
                  value: employees
                - name: Middle Management
                  value: middle_management
                - name: Top Management
                  value: top_management
          required:
            - type
            - field
            - operator
            - value
          title: Contact Hierarchy Level Filter
          type: object
        - description: Filter by a contact's job title. `in` — exact list of titles (use the values returned by job-title autocomplete). `begins_with` — prefix match (case-insensitive). `contains` — matches titles containing the given word or phrase (case-insensitive). Matches companies that have at least one contact whose title matches. When combined with other `contact_*` filters via `and`, all must match the same contact.
          example:
            field: contact_position
            operator: in
            type: filter
            value:
              - Managing Director
              - Head of Sales
          properties:
            field:
              enum:
                - contact_position
              type: string
            operator:
              enum:
                - in
                - begins_with
                - contains
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              oneOf:
                - description: Exact job titles — use with `in`.
                  items:
                    type: string
                  minItems: 1
                  type: array
                - description: Job title prefix or phrase — use with `begins_with` or `contains`.
                  minLength: 1
                  type: string
          required:
            - type
            - field
            - operator
            - value
          title: Contact Job Title Filter
          type: object
        - description: Filter by a contact's country. Matches companies that have at least one contact in any of the given countries. When combined with other `contact_*` filters via `and`, all must match the same contact.
          example:
            field: contact_country_code
            operator: in
            type: filter
            value:
              - DE
              - AT
          properties:
            field:
              enum:
                - contact_country_code
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: ISO 3166-1 alpha-2 codes.
              items:
                example: DE
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Contact Country Code Filter
          type: object
        - description: |-
            Filter by buyer persona. Matches companies that have at least one contact meeting all of a persona's criteria — its departments, seniority levels, job title keywords and locations. Job title keywords match anywhere in a contact's title, so "CTO" also matches "Group CTO EMEA".

            Passing several persona IDs matches companies having a contact who fits any one of them. A single persona's own criteria must all be met by the same contact, and when combined with other `contact_*` filters via `and` that contact must satisfy those too.
          example:
            field: contact_buyer_persona_ids
            operator: in
            type: filter
            value:
              - "7421"
          properties:
            field:
              enum:
                - contact_buyer_persona_ids
              type: string
            operator:
              enum:
                - in
              type: string
            type:
              enum:
                - filter
              type: string
            value:
              description: Buyer persona IDs as returned by the Buyer Personas endpoint.
              items:
                type: string
              minItems: 1
              type: array
          required:
            - type
            - field
            - operator
            - value
          title: Contact Buyer Persona IDs Filter
          type: object
        - description: Combines child filters or sub-groups with AND or OR logic. An empty group matches every company.
          example:
            items:
              - field: employee_count
                operator: in_range
                type: filter
                value:
                  gte: 50
              - field: revenue
                operator: in_range
                type: filter
                value:
                  gte: 1000000
            operator: or
            type: group
          properties:
            items:
              description: Nested filter items or sub-groups.
              items:
                $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
              type: array
            negated:
              default: false
              description: "When true, the combined result is negated. A negated group of only `contact_*` filters asks for a contact that doesn't fit: on its own it doesn't leave out the companies that also have a fitting contact, but next to other `contact_*` filters it asks the same contact to fit those and not fit the negated ones."
              type: boolean
            operator:
              description: Logical operator to combine child items.
              enum:
                - and
                - or
              type: string
            type:
              enum:
                - group
              type: string
          required:
            - type
            - operator
            - items
          title: Group
          type: object
    CompanyFinancialsV1:
      properties:
        attributes:
          properties:
            available_indicators:
              description: The available financial indicators for the given year.
              items:
                properties:
                  estimated:
                    description: Whether the value is estimated.
                    example: false
                    type: boolean
                  name:
                    description: The name of the financial indicator.
                    enum:
                      - accounts_receivable
                      - balance_sheet_total
                      - cash_and_cash_equivalents
                      - creditors_after_one_year
                      - creditors_within_one_year
                      - current_assets
                      - debt
                      - earnings
                      - earnings_cagr
                      - employees
                      - equity
                      - equity_ratio
                      - fixed_assets
                      - issued_share_capital
                      - liabilities
                      - materials_expenditure
                      - net_current_assets
                      - operation_expenses
                      - operation_result
                      - pension_provisions
                      - real_estate_expenditures
                      - return_on_equity
                      - return_on_sales
                      - revenue
                      - revenue_cagr
                      - revenue_per_employee
                      - salaries_paid
                      - salaries_per_employee
                      - tax_paid
                      - tax_ratio
                      - total_assets_less_current_liabilities
                    example: revenue_per_employee
                    type: string
                    x-apidog-enum:
                      - description: Money owed to the company by its customers for goods or services delivered but not yet paid for.
                        name: Accounts Receivable
                        value: accounts_receivable
                      - description: The total value of all assets on the company's balance sheet.
                        name: Balance Sheet Total
                        value: balance_sheet_total
                      - description: Liquid assets including cash on hand, cash in bank accounts, and short-term investments easily convertible to cash.
                        name: Cash and Cash Equivalents
                        value: cash_and_cash_equivalents
                      - description: Long-term debts and obligations that are due for payment more than one year from the balance sheet date.
                        name: Creditors After One Year
                        value: creditors_after_one_year
                      - description: Short-term debts and obligations that are due for payment within one year from the balance sheet date.
                        name: Creditors Within One Year
                        value: creditors_within_one_year
                      - description: Assets that are expected to be converted to cash or used up within one year, including inventory, accounts receivable, and cash.
                        name: Current Assets
                        value: current_assets
                      - description: Total amount of money borrowed by the company that must be repaid, including both short-term and long-term obligations.
                        name: Debt
                        value: debt
                      - description: The company's net profit or income after deducting all expenses, taxes, and costs from revenue.
                        name: Earnings
                        value: earnings
                      - description: Compound Annual Growth Rate of earnings, showing the mean annual growth rate of earnings over a specified period.
                        name: Earnings CAGR
                        value: earnings_cagr
                      - description: Total number of people employed by the company.
                        name: Employees
                        value: employees
                      - description: The residual interest in the assets of the company after deducting liabilities, representing ownership value.
                        name: Equity
                        value: equity
                      - description: The proportion of total assets financed by shareholders' equity, indicating financial stability and leverage.
                        name: Equity Ratio
                        value: equity_ratio
                      - description: Long-term tangible assets used in operations, such as property, plant, and equipment.
                        name: Fixed Assets
                        value: fixed_assets
                      - description: The total value of shares that have been issued and are owned by shareholders.
                        name: Issued Share Capital
                        value: issued_share_capital
                      - description: Total debts and obligations owed by the company to creditors and other parties.
                        name: Liabilities
                        value: liabilities
                      - description: Costs incurred for raw materials, components, and supplies used in production or operations.
                        name: Materials Expenditure
                        value: materials_expenditure
                      - description: Current assets minus current liabilities, indicating short-term financial health and liquidity.
                        name: Net Current Assets
                        value: net_current_assets
                      - description: Costs incurred in the normal course of business operations, excluding cost of goods sold.
                        name: Operation Expenses
                        value: operation_expenses
                      - description: Profit or loss from core business operations, excluding non-operating income and expenses.
                        name: Operation Result
                        value: operation_result
                      - description: Funds set aside to meet future pension obligations to employees.
                        name: Pension Provisions
                        value: pension_provisions
                      - description: Costs related to real estate investments, purchases, or improvements.
                        name: Real Estate Expenditures
                        value: real_estate_expenditures
                      - description: A measure of financial performance calculated by dividing net income by shareholders' equity.
                        name: Return on Equity
                        value: return_on_equity
                      - description: A profitability ratio calculated by dividing operating profit by net sales revenue.
                        name: Return on Sales
                        value: return_on_sales
                      - description: Total income generated from the sale of goods or services during a specific period.
                        name: Revenue
                        value: revenue
                      - description: Compound Annual Growth Rate of revenue, showing the mean annual growth rate of revenue over a specified period.
                        name: Revenue CAGR
                        value: revenue_cagr
                      - description: A productivity metric calculated by dividing total revenue by the number of employees.
                        name: Revenue per Employee
                        value: revenue_per_employee
                      - description: Total amount paid to employees as wages and salaries during a specific period.
                        name: Salaries Paid
                        value: salaries_paid
                      - description: Average salary cost per employee, calculated by dividing total salaries by number of employees.
                        name: Salaries per Employee
                        value: salaries_per_employee
                      - description: Total amount of taxes paid by the company during a specific period.
                        name: Tax Paid
                        value: tax_paid
                      - description: The proportion of earnings paid as taxes, indicating the effective tax rate.
                        name: Tax Ratio
                        value: tax_ratio
                      - description: A measure of long-term financial stability calculated by subtracting current liabilities from total assets.
                        name: Total Assets Less Current Liabilities
                        value: total_assets_less_current_liabilities
                  type:
                    description: The type of the financial indicator.
                    enum:
                      - currency
                      - percentage
                      - number
                    example: currency
                    type:
                      - string
                      - number
                    x-apidog-enum:
                      - description: Indicates that the `value` parameter holds a currency.
                        name: Currency
                        value: currency
                      - description: Indicates that the `value` parameter holds a percentage.
                        name: Percentage
                        value: percentage
                      - description: Indicates that the `value` parameter is a number.
                        name: Number
                        value: number
                  unit:
                    description: "The unit of the value. `null` for unitless indicators, such as plain counts (`type: number`, e.g. `employees`)."
                    example: EUR
                    type:
                      - string
                      - "null"
                  value:
                    description: The value of the financial indicator.
                    example: 1234567
                    type: number
                required:
                  - name
                  - type
                  - value
                  - unit
                  - estimated
                type: object
              type: array
            consolidated:
              description: Indicates if the financial indicators are consolidated.
              example: true
              type: boolean
            year:
              description: Which year the financial indicators are for.
              example: 2024
              type: number
          required:
            - year
            - consolidated
            - available_indicators
          type: object
        id:
          example: "129011_2024"
          type: string
        type:
          const: company_financials
          description: The type of the object
          example: company_financials
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CompanyIndustryV1:
      properties:
        attributes:
          properties:
            code:
              description: Code of the industry within the requested classification.
              example: "62.01"
              type: string
            name:
              description: Name of the industry.
              example: Computer programming activities
              type: string
            parent_code:
              description: Parent code of the industry. Omitted for top-level industries, which have no parent.
              example: "62"
              type: string
            parent_name:
              description: Parent name of the industry. Omitted for top-level industries, which have no parent.
              example: Computer programming, consultancy and related activities
              type: string
          required:
            - code
            - name
          type: object
        id:
          description: The unique identifier for the company industry.
          example: nace_62.01
          type: string
        type:
          const: company_industry
          description: The type of the object
          example: company_industry
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CompanyIpV1:
      properties:
        attributes:
          properties:
            has_other_group_companies_with_ips:
              description: Whether there are other companies in the same group that also have IP data available.
              example: false
              type: boolean
            ips:
              description: A list of IP addresses or IP ranges ordered by confidence score (from very high to low). Single IPs are represented as a plain address (e.g. "192.0.2.1"), ranges as "start-end" (e.g. "192.0.2.1-192.0.2.255").
              example:
                - 192.0.2.1
                - 10.0.0.1-10.0.0.255
              items:
                type: string
              type: array
            ips_extended:
              description: A list of IP addresses or IP ranges in the extended format with additional information such as geo location. The addresses are ordered by confidence score (from very high to low).
              items:
                $ref: "#/components/schemas/IpAddressExtendedV1"
              type: array
          required:
            - ips
            - ips_extended
            - has_other_group_companies_with_ips
          type: object
        id:
          description: The Leadfeeder company ID.
          example: "129011"
          type: string
        meta:
          properties:
            total_count:
              description: The total number of IP ranges on file for this company.
              example: 42
              type: integer
          required:
            - total_count
          type: object
        relationships:
          properties:
            company:
              description: The company the IP data belongs to. By default this field only contains the `id` and `type` fields, but you can load all company attributes by passing the `include=company` URL parameter.
              oneOf:
                - additionalProperties: false
                  properties:
                    id:
                      description: The Leadfeeder company ID.
                      example: "129011"
                      type: string
                    type:
                      const: company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CompanyV1"
          required:
            - company
          type: object
        type:
          description: The type of the object.
          enum:
            - company_ip
          example: company_ip
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
        - meta
      type: object
    CompanyLocationV1:
      properties:
        attributes:
          properties:
            app_url:
              description: Where the company's lead in the All companies feed can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/f/123456/feed/all-companies/lead/5b4f313e-46de-11e8-b981-05bebed8e58b_1d2c3b4a-5e6f-7a8b-9c0d-1e2f3a4b5c6d
              format: uri
              type:
                - string
                - "null"
          required:
            - app_url
          type: object
        id:
          description: The unique identifier for the company location.
          example: 5b4f313e-46de-11e8-b981-05bebed8e58b
          type: string
        relationships:
          properties:
            company:
              description: The company the contact is associated with. By default this field only contains the `id` and `type` fields, but you can load all company attributes by passing the `include=company` url parameter.
              oneOf:
                - additionalProperties: false
                  properties:
                    id:
                      description: The Leadfeeder company ID.
                      example: "129011"
                      type: string
                    type:
                      const: company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CompanyV1"
            location:
              $ref: "#/components/schemas/LocationV1"
          required:
            - company
            - location
          type: object
        type:
          const: company_location
          description: The type of the object
          example: company_location
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    CompanyMatchV1:
      properties:
        attributes:
          properties:
            match_score:
              description: The probability that we have matched the correct company. The field is returned as a float value and ranges between 0 and 1, with 1 being the equivalent of a 100% match probability.
              example: 0.95
              format: float
              type: number
          required:
            - match_score
          type: object
        id:
          type: string
        relationships:
          properties:
            company_summary:
              $ref: "#/components/schemas/CompanySummaryV1"
          required:
            - company_summary
          type: object
        type:
          const: company_match
          description: The type of the object
          example: company_match
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    CompanySummaryV1:
      properties:
        attributes:
          properties:
            address:
              description: Where the company is located.
              properties:
                city:
                  description: The city name.
                  example: Karlsruhe
                  type:
                    - string
                    - "null"
                country:
                  description: The country name.
                  example: Germany
                  type:
                    - string
                    - "null"
                country_code:
                  description: This field indicates the country supported for Leadfeeder operations and requires a two letter country code according to ISO 3166 Alpha-2 (see [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)).
                  example: DE
                  type:
                    - string
                    - "null"
              required:
                - city
                - country
                - country_code
              type: object
            employee_range:
              description: A range indicator of the approximate headcount for this company.
              enum:
                - 1-10
                - 11-100
                - 101-500
                - 501-1.000
                - 1.001-5.000
                - 5.001-10.000
                - 10.000+
                - null
              example: 101-500
              type:
                - string
                - "null"
            industries:
              description: A list of the company's industries.
              properties:
                industry:
                  description: A list of the company's internal industry classifications, each with a human-readable `name` and an internal `code` identifier.
                  example:
                    - code: 1594.6.4
                      name: Software Development
                  items:
                    properties:
                      code:
                        description: The unique identifier for the industry.
                        example: 62.01.9
                        type: string
                      name:
                        description: The name of the industry.
                        example: Computer programming activities
                        type: string
                    required:
                      - name
                      - code
                    type: object
                  type: array
              required:
                - industry
              type: object
            logo_url:
              description: The URL of the company's logo.
              example: https://app.dealfront.com/logos/200/694ad7b1-lf-logo-2026-04-16.jpg
              format: uri
              type:
                - string
                - "null"
            meta:
              properties:
                do_not_contact:
                  description: This field is set to true when the company does not want to be contacted for advertisement.
                  example: false
                  type: boolean
                has_contacts:
                  description: Indicates if contacts are available for the company.
                  example: false
                  type: boolean
                has_fax:
                  description: Indicates if you will get back a fax number with the full company object.
                  example: false
                  type: boolean
                has_financials_earnings:
                  description: Indicates if you will get back the earnings value with the full company object.
                  example: true
                  type: boolean
                has_financials_net_worth:
                  description: Indicates if you will get back the net worth value with the full company object.
                  example: true
                  type: boolean
                has_financials_revenue:
                  description: Indicates if you will get back the revenue with the full company object.
                  example: true
                  type: boolean
                has_ip_addresses:
                  description: Indicates if the company has its own IP data available. Its corporate group's IP data doesn't count.
                  example: true
                  type: boolean
                has_mail:
                  description: Indicates if you will get back an email address with the full company object.
                  example: true
                  type: boolean
                has_phones:
                  description: Indicates if you will get back a landline or mobile phone number with the full company object.
                  example: true
                  type: boolean
                has_register_id:
                  description: Indicates if you will get back a register id with the full company object.
                  example: true
                  type: boolean
                has_social_accounts:
                  description: Indicates if you will get back one or more social accounts with the full company object.
                  example: true
                  type: boolean
                has_updated_id:
                  description: This field will be true if the ID of that company has changed internally. This can happen for example if two companies are merged together. If you've stored a reference to the company ID in your system you should update it with the most current ID that's sent back in the `id` field.
                  example: false
                  type: boolean
                has_vat_id:
                  description: Indicates if you will get back a vat id with the full company object.
                  example: true
                  type: boolean
              required:
                - do_not_contact
                - has_updated_id
                - has_phones
                - has_fax
                - has_mail
                - has_contacts
                - has_social_accounts
                - has_register_id
                - has_vat_id
                - has_financials_revenue
                - has_financials_earnings
                - has_financials_net_worth
                - has_ip_addresses
              type: object
            name:
              description: The legal name of the company
              example: Dealfront Group GmbH
              type: string
            register:
              properties:
                status:
                  description: The company's status in the commercial register.
                  enum:
                    - active
                    - in_liquidation
                    - out_of_business
                    - non_company
                    - legacy
                    - null
                  example: active
                  type:
                    - string
                    - "null"
              type: object
            revenue:
              properties:
                currency:
                  description: Currency of the financial value.
                  example: EUR
                  type:
                    - string
                    - "null"
                estimated:
                  description: Whether the financial value was actually reported or is just an estimation.
                  example: false
                  type: boolean
                value:
                  description: The amount of the financial value.
                  example: 9694333
                  type:
                    - number
                    - "null"
                value_eur:
                  description: The amount of the financial value, converted to EUR.
                  example: 9694333
                  type:
                    - number
                    - "null"
                year:
                  description: Year when the financial values was reported (or estimated).
                  example: 2020
                  type:
                    - number
                    - "null"
              required:
                - currency
                - year
                - value
                - value_eur
                - estimated
              type:
                - object
                - "null"
            role:
              description: This field indicates the role of the company within its group structure.
              enum:
                - single_entity
                - group
                - group_member
                - null
              example: group_member
              type:
                - string
                - "null"
              x-apidog-enum:
                - description: The company is not part of a group.
                  name: Standalone company
                  value: single_entity
                - description: The company is the parent of a group.
                  name: Parent company
                  value: group
                - description: The company is a subsidiary within a company group.
                  name: Subsidiary company
                  value: group_member
            url:
              description: The URL of the company website.
              example: https://www.leadfeeder.com/welcome
              type:
                - string
                - "null"
          required:
            - name
            - url
            - logo_url
            - address
            - industries
            - employee_range
            - revenue
            - role
            - register
            - meta
          type: object
        id:
          description: The Leadfeeder company ID.
          example: "129011"
          type: string
        relationships:
          properties:
            group_company:
              description: The group company head. The field may be null if the company is a single entity.
              oneOf:
                - additionalProperties: false
                  description: The group company head. The field may be null if the company is a single entity.
                  properties:
                    id:
                      description: The Leadfeeder company ID.
                      example: "129011"
                      type: string
                    type:
                      const: company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - type: "null"
          required:
            - group_company
          type: object
        type:
          const: company_summary
          description: The type of the object
          example: company_summary
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    CompanyV1:
      properties:
        attributes:
          properties:
            address:
              properties:
                city:
                  description: The city name.
                  example: Karlsruhe
                  type:
                    - string
                    - "null"
                country:
                  description: The country name.
                  example: Germany
                  type:
                    - string
                    - "null"
                country_code:
                  description: This field indicates the country supported for Leadfeeder operations and requires a two letter country code according to ISO 3166 Alpha-2 (see [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)).
                  example: DE
                  type:
                    - string
                    - "null"
                geo:
                  properties:
                    latitude:
                      description: The latitude of the geographical point.
                      example: 49.01
                      type:
                        - number
                        - "null"
                    longitude:
                      description: The longitude of the geographical point.
                      example: 8.43
                      type:
                        - number
                        - "null"
                  type:
                    - object
                    - "null"
                postal_code:
                  description: The postal code related to the company's physical location. The format varies by country.
                  example: "76131"
                  type:
                    - string
                    - "null"
                region:
                  description: The name of the region in native language."
                  example: Baden-Württemberg
                  type:
                    - string
                    - "null"
                region_code:
                  description: The code for the region. For European companies the NUTS1-3 schema is used. For companies outside of Europe values that comply with ISO 3166-2 with underscores are returned.
                  example: DE1
                  type:
                    - string
                    - "null"
                street_address:
                  description: The company's primary street address.
                  example: Durlacher Allee 73
                  type:
                    - string
                    - "null"
                street_name:
                  description: The street name part of the company's primary address.
                  example: Durlacher Allee
                  type:
                    - string
                    - "null"
                street_number:
                  description: The street number part of the company's primary address. This field does not necessarily contain a number, values like 1st, 23-35 or 13A are also common.
                  example: "73"
                  type:
                    - string
                    - "null"
              type: object
            alternative_names:
              description: An array of alternate / previous spellings of the company name.
              example:
                - Echobot Media Technologies GmbH
                - Dealfront
              items:
                type: string
              type: array
            alternative_urls:
              description: A set of alternative URLs related to the company.
              example:
                - https://echobot.de
                - https://dealfront.com
              items:
                description: The URL of the company website.
                example: https://www.leadfeeder.com/welcome
                type:
                  - string
                  - "null"
              type: array
            app_url:
              description: The URL of the company's profile inside the Leadfeeder platform.
              example: https://app.leadfeeder.com/h/company/129011
              format: uri
              type: string
            custom_fields:
              additionalProperties:
                description: |
                  A custom field value assigned to a company or contact. The `custom_fields` attribute is a map where each key is the custom field's `id` (its internal API name) and the value is an object describing the field type, its value, and an optional AI-generated reason.
                properties:
                  reason:
                    description: |
                      An AI-generated explanation for the assigned value. Present only for AI-powered custom field types (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`).
                    example: The company provides API-driven identity management and security solutions. While it operates in a sector relevant to digital footprint and market activity, it does not explicitly analyze growth trajectories, headcount trends, or market momentum as described in the search query.
                    type:
                      - string
                      - "null"
                  type:
                    description: The data type of the custom field
                    enum:
                      - ai_boolean
                      - ai_number
                      - ai_score
                      - ai_text
                      - boolean
                      - contact_collection
                      - date
                      - number
                      - text
                    example: ai_score
                    type: string
                  value:
                    description: |
                      The value of the custom field. The concrete type depends on the `type` property. For `text`, `ai_text`, and `date` types the value is a string. For `number`, `ai_number`, and `ai_score` types the value is an integer. For `boolean` and `ai_boolean` types the value is a boolean. For `contact_collection` the value is an array of objects with an `id` property.
                    oneOf:
                      - description: Used for `text`, `ai_text`, and `date` types
                        example: Germany
                        type: string
                      - description: Used for `number`, `ai_number`, and `ai_score` types
                        example: 3
                        type: integer
                      - description: Used for `boolean` and `ai_boolean` types
                        example: false
                        type: boolean
                      - description: Used for `contact_collection` type
                        items:
                          properties:
                            id:
                              description: The contact ID
                              example: "3170656125"
                              type: string
                          required:
                            - id
                          type: object
                        type: array
                required:
                  - type
                  - value
                type: object
              description: A dictionary of custom field values, indexed by their unique field IDs.
              type: object
            description:
              description: A text containing information about the company (native language)
              example: Dealfront is the Go-to-Market Platform giving sales and marketing teams the data, applications, and insights they need to win any European market
              type:
                - string
                - "null"
            earnings:
              properties:
                currency:
                  description: Currency of the financial value.
                  example: EUR
                  type:
                    - string
                    - "null"
                estimated:
                  description: Whether the financial value was actually reported or is just an estimation.
                  example: false
                  type: boolean
                value:
                  description: The amount of the financial value.
                  example: 9694333
                  type:
                    - number
                    - "null"
                year:
                  description: Year when the financial values was reported (or estimated).
                  example: 2020
                  type:
                    - number
                    - "null"
              required:
                - currency
                - year
                - value
                - estimated
              type:
                - object
                - "null"
            emails:
              description: Email address(es) for the company (eg. info@, service@ or support@).
              items:
                properties:
                  address:
                    description: A standard e-mail address.
                    example: info@leadfeeder.com
                    type: string
                required:
                  - address
                type: object
              type: array
            employee_count:
              description: The currently known headcount for this company.
              example: 271
              type:
                - integer
                - "null"
            employee_range:
              description: A range indicator of the approximate headcount for this company.
              enum:
                - 1-10
                - 11-100
                - 101-500
                - 501-1.000
                - 1.001-5.000
                - 5.001-10.000
                - 10.000+
                - null
              example: 101-500
              type:
                - string
                - "null"
            founded_year:
              description: A number representing the year when the company was founded.
              example: 2017
              type:
                - integer
                - "null"
            industries:
              description: A list of the company's industries.
              properties:
                industry:
                  description: A list of the company's internal industry classifications, each with a human-readable `name` and an internal `code` identifier.
                  example:
                    - code: "62.01"
                      name: Software Development
                  items:
                    properties:
                      code:
                        description: The unique identifier for the industry.
                        example: 62.01.9
                        type: string
                      name:
                        description: The name of the industry.
                        example: Computer programming activities
                        type: string
                    required:
                      - name
                      - code
                    type: object
                  type: array
                nace:
                  description: A list of the company's NACE industry classifications, each with a human-readable `name` and a NACE `code`.
                  items:
                    properties:
                      code:
                        description: The unique identifier for the industry.
                        example: 62.01.9
                        type: string
                      name:
                        description: The name of the industry.
                        example: Computer programming activities
                        type: string
                    required:
                      - name
                      - code
                    type: object
                  type: array
                wz:
                  description: A list of the company's WZ industry classifications, each with a human-readable `name` and a WZ `code`.
                  items:
                    properties:
                      code:
                        description: The unique identifier for the industry.
                        example: 62.01.9
                        type: string
                      name:
                        description: The name of the industry.
                        example: Computer programming activities
                        type: string
                    required:
                      - name
                      - code
                    type: object
                  type: array
              required:
                - nace
                - wz
                - industry
              type: object
            intent:
              properties:
                last_updated_at:
                  description: The timestamp indicating when the intent score was last calculated or updated.
                  example: "2026-03-05T12:41:44Z"
                  type:
                    - string
                    - "null"
                score:
                  description: A decimal score (0-10) representing the level of buying intent predicted for the company, based on tracked activity over the past 90 days.
                  example: 7.5
                  type:
                    - number
                    - "null"
                score_tier:
                  description: A categorical representation of the intent score, grouped into predefined tiers (`high`, `medium`, `low`) based on internal scoring thresholds.
                  example: high
                  type:
                    - string
                    - "null"
              required:
                - score
                - score_tier
                - last_updated_at
              type: object
            keywords:
              description: An array of keywords about the company and its products that have been extracted from the website. They will be returned in your user's language.
              example:
                - Strategy
                - Technology
                - Software Solutions
                - Marketing
                - B2b
              items:
                type: string
              type: array
            legal_form:
              description: The company's legal form (i.e. GmbH, SARL or Limited).
              example: Limited
              type:
                - string
                - "null"
            logo_url:
              description: The URL of the company's logo.
              example: https://app.dealfront.com/logos/200/694ad7b1-lf-logo-2026-04-16.jpg
              format: uri
              type:
                - string
                - "null"
            meta:
              properties:
                do_not_contact:
                  description: This field is set to true when the company does not want to be contacted for advertisement.
                  example: false
                  type: boolean
                has_updated_id:
                  description: This field will be true if the ID of that company has changed internally. This can happen for example if two companies are merged together. If you've stored a reference to the company ID in your system you should update it with the most current ID that's sent back in the `id` field.
                  example: false
                  type: boolean
                num_contacts:
                  description: The amount of contacts that we can provide for this company.
                  example: 99
                  type:
                    - integer
                    - "null"
              required:
                - has_updated_id
                - do_not_contact
                - num_contacts
              type: object
            name:
              description: The legal name of the company
              example: Dealfront Group GmbH
              type: string
            net_worth:
              properties:
                currency:
                  description: Currency of the financial value.
                  example: EUR
                  type:
                    - string
                    - "null"
                estimated:
                  description: Whether the financial value was actually reported or is just an estimation.
                  example: false
                  type: boolean
                value:
                  description: The amount of the financial value.
                  example: 9694333
                  type:
                    - number
                    - "null"
                year:
                  description: Year when the financial values was reported (or estimated).
                  example: 2020
                  type:
                    - number
                    - "null"
              required:
                - currency
                - year
                - value
                - estimated
              type:
                - object
                - "null"
            orientation:
              description: The target audience(s) of the company. The value 'B2B' indicates that the company is primarily focused on business customers, while 'B2C' indicates a focus on individual consumers. The value 'OTHER' means it’s a public (likely non-commercial) service or institution.
              example:
                - B2B
              items:
                enum:
                  - B2B
                  - B2C
                  - OTHER
                type: string
              type: array
            phones:
              description: The central phone number(s) of the company.
              items:
                properties:
                  blacklisted:
                    description: Whether the company is not allowed to be contacted because it's part of a register like https://www.tpsonline.org.uk/pages/what_is_tps in the UK.
                    example: false
                    type: boolean
                  number:
                    description: E.164 representation of a phone number.
                    example: +49 721 50057501
                    type: string
                  type:
                    description: The type of phone number.
                    enum:
                      - landline
                      - mobile
                      - fax
                    example: landline
                    type: string
                required:
                  - number
                  - type
                  - blacklisted
                type: object
              type: array
            previous_ids:
              description: A list of former ids that the company was known by in the past. The ID may have changed for example due to a merger with another company. The list is empty if there are no previous IDs.
              example:
                - "185907485"
                - "221290577"
                - "223757669"
                - "223760732"
              items:
                description: The Leadfeeder company ID.
                example: "129011"
                type: string
              type: array
            register:
              properties:
                id:
                  description: The company's registration number from the commercial register.
                  example: HRB711540
                  type:
                    - string
                    - "null"
                location:
                  description: The company's register location.
                  example: Mannheim
                  type:
                    - string
                    - "null"
                status:
                  description: The company's status in the commercial register.
                  enum:
                    - active
                    - in_liquidation
                    - out_of_business
                    - non_company
                    - legacy
                    - null
                  example: active
                  type:
                    - string
                    - "null"
              required:
                - id
                - location
                - status
              type: object
            revenue:
              properties:
                currency:
                  description: Currency of the financial value.
                  example: EUR
                  type:
                    - string
                    - "null"
                estimated:
                  description: Whether the financial value was actually reported or is just an estimation.
                  example: false
                  type: boolean
                value:
                  description: The amount of the financial value.
                  example: 9694333
                  type:
                    - number
                    - "null"
                value_eur:
                  description: The amount of the financial value, converted to EUR.
                  example: 9694333
                  type:
                    - number
                    - "null"
                year:
                  description: Year when the financial values was reported (or estimated).
                  example: 2020
                  type:
                    - number
                    - "null"
              required:
                - currency
                - year
                - value
                - value_eur
                - estimated
              type:
                - object
                - "null"
            role:
              description: This field indicates the role of the company within its group structure.
              enum:
                - single_entity
                - group
                - group_member
                - null
              example: group_member
              type:
                - string
                - "null"
              x-apidog-enum:
                - description: The company is not part of a group.
                  name: Standalone company
                  value: single_entity
                - description: The company is the parent of a group.
                  name: Parent company
                  value: group
                - description: The company is a subsidiary within a company group.
                  name: Subsidiary company
                  value: group_member
            social_media_profiles:
              description: List of social media pages.
              example:
                facebook:
                  - url: https://www.facebook.com/getdealfront
                instagram:
                  - url: https://instagram.com/getdealfront
                linkedin:
                  - url: https://www.linkedin.com/company/dealfront
                pinterest: []
                twitter:
                  - url: https://twitter.com/getdealfront
                xing: []
                youtube: []
              properties:
                facebook:
                  items:
                    properties:
                      url:
                        type: string
                    type: object
                  type: array
                instagram:
                  items:
                    properties:
                      url:
                        type: string
                    type: object
                  type: array
                linkedin:
                  items:
                    properties:
                      url:
                        type: string
                    type: object
                  type: array
                pinterest:
                  items:
                    properties:
                      url:
                        type: string
                    type: object
                  type: array
                twitter:
                  items:
                    properties:
                      url:
                        type: string
                    type: object
                  type: array
                xing:
                  items:
                    properties:
                      url:
                        type: string
                    type: object
                  type: array
                youtube:
                  items:
                    properties:
                      url:
                        type: string
                    type: object
                  type: array
              type: object
            url:
              description: The URL of the company website.
              example: https://www.leadfeeder.com/welcome
              type:
                - string
                - "null"
            vat_id:
              description: The company's VAT ID (tax ID).
              example: DE276265194
              type:
                - string
                - "null"
            web_engagement:
              description: Web engagement data for a company.
              properties:
                last_visit_date:
                  description: The datetime of the last visit to the company's website.
                  example: "2026-03-05T12:41:44Z"
                  format: date-time
                  type:
                    - string
                    - "null"
              required:
                - last_visit_date
              type: object
          required:
            - address
            - alternative_names
            - alternative_urls
            - app_url
            - custom_fields
            - description
            - earnings
            - emails
            - employee_count
            - employee_range
            - founded_year
            - industries
            - keywords
            - legal_form
            - logo_url
            - meta
            - name
            - net_worth
            - orientation
            - phones
            - previous_ids
            - register
            - revenue
            - role
            - social_media_profiles
            - url
            - vat_id
            - web_engagement
            - intent
          type: object
        id:
          description: The Leadfeeder company ID.
          example: "129011"
          type: string
        relationships:
          properties:
            crm_connections:
              description: CRM connections associated with the company. By default this field is not displayed, but you can load it by passing the `include=crm_connections` url parameter.
              items:
                $ref: "#/components/schemas/CRMConnectionV1"
              type: array
            crm_group_connections:
              description: CRM group connections associated with the company. By default this field is not displayed, but you can load it by passing the `include=crm_group_connections` url parameter.
              items:
                $ref: "#/components/schemas/CRMGroupConnectionV1"
              type: array
            crm_suggestions:
              description: CRM suggestions associated with the company. By default this field is not displayed, but you can load it by passing the `include=crm_suggestions` url parameter.
              items:
                $ref: "#/components/schemas/CRMSuggestionV1"
              type: array
            group_company:
              description: The group company head. The field may be null if the company is a single entity.  By default this field only contains the `id` and `type` fields, but you can load all  company attributes by passing the `include=group_company` url parameter.
              oneOf:
                - additionalProperties: false
                  description: The group company head. The field may be null if the company is a single entity.
                  properties:
                    id:
                      description: The Leadfeeder company ID.
                      example: "129011"
                      type: string
                    type:
                      const: company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CompanyV1"
                - type: "null"
            icps:
              description: Ideal Customer Profiles (ICPs) defined in the account that this company matches. By default this field is not displayed, but you can load it by passing the `include=icps` url parameter.
              items:
                $ref: "#/components/schemas/ICPV1"
              type: array
            lists:
              description: Lists that include this company. By default this field is not displayed, but you can load it by passing the `include=lists` url parameter.
              items:
                $ref: "#/components/schemas/ListV1"
              type: array
            tags:
              description: Tags assigned to the company. By default this field is not displayed, but you can load it by passing the `include=tags` url parameter.
              items:
                $ref: "#/components/schemas/TagV1"
              type: array
            web_visits:
              description: Web visits associated with the company.  It returns first 20 visits from last 7 days. By default this field is not displayed, but you can load it by passing the `include=web_visits` url parameter.
              items:
                $ref: "#/components/schemas/WebVisitV1"
              type: array
          required:
            - group_company
          type: object
        type:
          const: company
          description: The type of the object
          example: company
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    ConnectCRMRecordJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-09-23T12:00:12Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration.
              properties:
                company_id:
                  description: The Leadfeeder company ID.
                  example: "159001425"
                  type: string
                contact_id:
                  description: The Leadfeeder contact ID.
                  example: "3219787601"
                  type: string
                crm_record_remote_id:
                  description: The target record's id in the third-party CRM (its native/remote id, not the Leadfeeder uuid returned by read endpoints). If the record is not yet mirrored in Leadfeeder it is synced on demand before connecting.
                  example: 0012o00003ABCdeEAF
                  type: string
                remote_type:
                  description: The type of a CRM record.
                  enum:
                    - crm_organization
                    - crm_lead
                    - crm_contact
                  example: crm_organization
                  type: string
                  x-apidog-enum:
                    - description: An Organization / Account record (e.g. a Salesforce Account or a Pipedrive Organization).
                      value: crm_organization
                    - description: A Lead record, in CRMs that have a separate Lead object (e.g. Salesforce, Zoho).
                      value: crm_lead
                    - description: A Contact / Person record (e.g. a Salesforce Contact or a Pipedrive Person).
                      value: crm_contact
              type: object
            created_at:
              description: When the job was created.
              example: "2026-09-23T12:00:00Z"
              format: date-time
              type: string
            errors:
              description: Empty unless `status` is `failed`.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            result:
              description: Outcome of a CRM job. Present only when `status` is `completed`.
              properties:
                crm_connection:
                  description: The resulting CRM connection, usable with `PATCH /v1/crm-connections/{id}`.
                  properties:
                    id:
                      description: The CRM connection ID.
                      example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      const: crm_connection
                      example: crm_connection
                      type: string
                  required:
                    - type
                    - id
                  type: object
                crm_record:
                  description: The CRM record the job created or acted on. Fetch it via the matching `GET /v1/crm-organizations/{id}`, `GET /v1/crm-leads/{id}` or `GET /v1/crm-contacts/{id}` endpoint.
                  properties:
                    id:
                      description: The Leadfeeder id (uuid) of the CRM record.
                      example: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      description: The type of a CRM record.
                      enum:
                        - crm_organization
                        - crm_lead
                        - crm_contact
                      example: crm_organization
                      type: string
                      x-apidog-enum:
                        - description: An Organization / Account record (e.g. a Salesforce Account or a Pipedrive Organization).
                          value: crm_organization
                        - description: A Lead record, in CRMs that have a separate Lead object (e.g. Salesforce, Zoho).
                          value: crm_lead
                        - description: A Contact / Person record (e.g. a Salesforce Contact or a Pipedrive Person).
                          value: crm_contact
                  required:
                    - type
                    - id
                  type: object
              type: object
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: connect_crm_record_job
          example: connect_crm_record_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    ConnectedListV1:
      properties:
        attributes:
          properties:
            name:
              description: The display name of the connected list.
              example: All companies (last 30 days)
              type: string
          required:
            - name
          type: object
        id:
          description: The unique identifier of the connection between the custom feed and the list.
          example: "512"
          type: string
        relationships:
          properties:
            list:
              allOf:
                - additionalProperties: false
                  description: A bare reference to a list by ID.
                  properties:
                    id:
                      description: The list ID, as returned by the **Retrieve Lists** and **Get List Details** endpoints.
                      example: company_123
                      type: string
                    type:
                      const: list
                      example: list
                      type: string
                  required:
                    - type
                    - id
                  type: object
              description: The Leadfeeder list that the custom feed keeps in sync.
          required:
            - list
          type: object
        type:
          const: connected_list
          description: The type of the object
          example: connected_list
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    ContactFilterGroupsV1:
      additionalProperties: false
      description: Restricts which contacts are collected during `contact_collection` enrichment. Group the conditions by dimension — `location`, `seniority`, `department`, and `job_title_keywords`. Provide at least one group; omit a group to leave that dimension unconstrained. Each condition can be inclusive or exclusive via its `negated` flag. This is independent of the company selection (`company_ids` / `list_id` / `advanced_search`), which chooses the companies; these conditions choose the contacts within them.
      example:
        department:
          - negated: false
            search_value: sales_department
            type: department
        location:
          - negated: false
            search_value: DE
            type: country_code
        seniority:
          - negated: false
            search_value: top_management
            type: seniority
      minProperties: 1
      properties:
        department:
          description: Restrict contacts by department. `search_value` is a department identifier (e.g. `sales_department`).
          items:
            allOf:
              - additionalProperties: false
                properties:
                  negated:
                    description: When `false`, contacts matching this condition are kept. When `true`, matching contacts are excluded instead.
                    type: boolean
                  search_value:
                    description: The value to match. Its meaning depends on `type` (a country code, a seniority level, a department, or a job-title keyword) — see the group descriptions for the accepted values.
                    type: string
                  type:
                    description: The kind of condition. Each filter group allows its own set of values — see the group descriptions on `ContactFilterGroupsV1`.
                    type: string
                required:
                  - type
                  - negated
                  - search_value
                type: object
              - properties:
                  type:
                    enum:
                      - department
                    type: string
                type: object
          type: array
        job_title_keywords:
          description: Restrict contacts by keywords matched against their job title. `search_value` is a free-text keyword (e.g. `procurement`).
          items:
            allOf:
              - additionalProperties: false
                properties:
                  negated:
                    description: When `false`, contacts matching this condition are kept. When `true`, matching contacts are excluded instead.
                    type: boolean
                  search_value:
                    description: The value to match. Its meaning depends on `type` (a country code, a seniority level, a department, or a job-title keyword) — see the group descriptions for the accepted values.
                    type: string
                  type:
                    description: The kind of condition. Each filter group allows its own set of values — see the group descriptions on `ContactFilterGroupsV1`.
                    type: string
                required:
                  - type
                  - negated
                  - search_value
                type: object
              - properties:
                  type:
                    enum:
                      - job_title_keywords
                    type: string
                type: object
          type: array
        location:
          description: Restrict contacts by location. `search_value` is an ISO 3166-1 alpha-2 country code when `type` is `country_code` (e.g. `DE`), or the corresponding code when `type` is `continent`, `region`, or `world_region`.
          items:
            allOf:
              - additionalProperties: false
                properties:
                  negated:
                    description: When `false`, contacts matching this condition are kept. When `true`, matching contacts are excluded instead.
                    type: boolean
                  search_value:
                    description: The value to match. Its meaning depends on `type` (a country code, a seniority level, a department, or a job-title keyword) — see the group descriptions for the accepted values.
                    type: string
                  type:
                    description: The kind of condition. Each filter group allows its own set of values — see the group descriptions on `ContactFilterGroupsV1`.
                    type: string
                required:
                  - type
                  - negated
                  - search_value
                type: object
              - properties:
                  type:
                    enum:
                      - country_code
                      - continent
                      - region
                      - world_region
                    type: string
                type: object
          type: array
        seniority:
          description: Restrict contacts by seniority level. `search_value` is a seniority identifier (e.g. `top_management`).
          items:
            allOf:
              - additionalProperties: false
                properties:
                  negated:
                    description: When `false`, contacts matching this condition are kept. When `true`, matching contacts are excluded instead.
                    type: boolean
                  search_value:
                    description: The value to match. Its meaning depends on `type` (a country code, a seniority level, a department, or a job-title keyword) — see the group descriptions for the accepted values.
                    type: string
                  type:
                    description: The kind of condition. Each filter group allows its own set of values — see the group descriptions on `ContactFilterGroupsV1`.
                    type: string
                required:
                  - type
                  - negated
                  - search_value
                type: object
              - properties:
                  type:
                    enum:
                      - seniority
                    type: string
                type: object
          type: array
      type: object
    ContactPreviewV1:
      description: A contact selected by a contacts preview. A preview reveals no contact details, so it carries only the fields that identify the contact. Each text is truncated so that its JSON-encoded form is at most 40 bytes, not counting the enclosing quotes.
      properties:
        attributes:
          properties:
            full_name:
              description: The contact's display name. `null` when the source has none.
              example: Jane Doe
              type:
                - string
                - "null"
            position:
              description: The contact's position within the company. `null` when the contact has no known job title; otherwise `title` is always a string.
              properties:
                title:
                  description: "The contact's job title: the English title where a translation is available, otherwise the title in its original language. A preview returns no `language_code`, so it does not say which of the two it is."
                  example: Head of Procurement
                  type: string
              required:
                - title
              type:
                - object
                - "null"
          required:
            - full_name
            - position
          type: object
        id:
          description: The Leadfeeder contact ID.
          example: "435834"
          type: string
        type:
          const: contact_preview
          description: The type of the object. A preview carries a subset of the contact resource, so it has its own type.
          example: contact_preview
          type: string
      required:
        - id
        - type
        - attributes
      type: object
    ContactSummaryV1:
      properties:
        attributes:
          properties:
            full_name:
              example: John Doe
              type: string
            gender:
              description: The contact's gender.
              enum:
                - male
                - female
                - other
                - null
              example: male
              type:
                - string
                - "null"
            hierarchy_level:
              description: The hierarchy level the contact has in the company.
              enum:
                - employees
                - top_management
                - middle_management
                - null
              example: employees
              type:
                - string
                - "null"
            meta:
              properties:
                has_mail:
                  description: Indicates if you will get back an email address with the full contact object.
                  example: true
                  type: boolean
                has_phones:
                  description: Indicates if you will get back a landline or mobile phone number with the full contact object.
                  example: true
                  type: boolean
                has_social_accounts:
                  description: Indicates if you will get back one or more social accounts with the full contact object.
                  example: true
                  type: boolean
              type: object
            position:
              description: Information about the contact's position within the company.
              properties:
                language_code:
                  description: A two digit language code indicating the language of the original job title according to ISO 639-1 (see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)
                  example: DE
                  type:
                    - string
                    - "null"
                title:
                  description: The contact's job title.
                  example: Geschäftsführer
                  type:
                    - string
                    - "null"
              type:
                - object
                - "null"
          required:
            - full_name
            - gender
            - hierarchy_level
            - meta
            - position
          type: object
        id:
          description: The Leadfeeder contact ID.
          example: "435834"
          type: string
        relationships:
          properties:
            company:
              properties:
                id:
                  description: The Leadfeeder company ID.
                  example: "129011"
                  type: string
                type:
                  const: company_summary
                  type: string
              required:
                - id
                - type
              type: object
          required:
            - company
          type: object
        type:
          const: contact_summary
          description: The type of the object
          example: contact_summary
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    ContactV1:
      properties:
        attributes:
          properties:
            address:
              description: Information about the contact's place of work based on sources like LinkedIn.com.
              properties:
                city:
                  description: The city name.
                  example: Karlsruhe
                  type:
                    - string
                    - "null"
                country:
                  description: The country name.
                  example: Germany
                  type:
                    - string
                    - "null"
                country_code:
                  description: This field indicates the country supported for Leadfeeder operations and requires a two letter country code according to ISO 3166 Alpha-2 (see [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)).
                  example: DE
                  type:
                    - string
                    - "null"
                region:
                  description: The name of the region in native language."
                  example: Baden-Württemberg
                  type:
                    - string
                    - "null"
                region_code:
                  description: The code for the region. For European companies the NUTS1-3 schema is used. For companies outside of Europe values that comply with ISO 3166-2 with underscores are returned.
                  example: DE1
                  type:
                    - string
                    - "null"
              type: object
            affiliation:
              description: Determines how the contact is related to the company.
              enum:
                - employee
                - group_employee
                - related
              example: employee
              type:
                - string
                - "null"
              x-apidog-enum:
                - description: The contact is an employee of the company.
                  name: Employee
                  value: employee
                - description: The contact works for some organization in the same company group.
                  name: Group employee
                  value: group_employee
                - description: The contact has some relation to the company.
                  name: Related
                  value: related
            custom_fields:
              additionalProperties:
                description: |
                  A custom field value assigned to a company or contact. The `custom_fields` attribute is a map where each key is the custom field's `id` (its internal API name) and the value is an object describing the field type, its value, and an optional AI-generated reason.
                properties:
                  reason:
                    description: |
                      An AI-generated explanation for the assigned value. Present only for AI-powered custom field types (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`).
                    example: The company provides API-driven identity management and security solutions. While it operates in a sector relevant to digital footprint and market activity, it does not explicitly analyze growth trajectories, headcount trends, or market momentum as described in the search query.
                    type:
                      - string
                      - "null"
                  type:
                    description: The data type of the custom field
                    enum:
                      - ai_boolean
                      - ai_number
                      - ai_score
                      - ai_text
                      - boolean
                      - contact_collection
                      - date
                      - number
                      - text
                    example: ai_score
                    type: string
                  value:
                    description: |
                      The value of the custom field. The concrete type depends on the `type` property. For `text`, `ai_text`, and `date` types the value is a string. For `number`, `ai_number`, and `ai_score` types the value is an integer. For `boolean` and `ai_boolean` types the value is a boolean. For `contact_collection` the value is an array of objects with an `id` property.
                    oneOf:
                      - description: Used for `text`, `ai_text`, and `date` types
                        example: Germany
                        type: string
                      - description: Used for `number`, `ai_number`, and `ai_score` types
                        example: 3
                        type: integer
                      - description: Used for `boolean` and `ai_boolean` types
                        example: false
                        type: boolean
                      - description: Used for `contact_collection` type
                        items:
                          properties:
                            id:
                              description: The contact ID
                              example: "3170656125"
                              type: string
                          required:
                            - id
                          type: object
                        type: array
                required:
                  - type
                  - value
                type: object
              description: A dictionary of custom field values, indexed by their unique field IDs.
              type: object
            departments:
              description: The departments the contact works in within the company.
              example:
                - marketing_department
                - students_apprentices
              items:
                enum:
                  - management_department
                  - sales_department
                  - it_department
                  - business_project_management_department
                  - finance_controlling_department
                  - engineering_department
                  - hr_department
                  - marketing_department
                  - consulting_department
                  - media_communications_department
                  - support_department
                  - rd_department
                  - students_apprentices
                  - production_department
                  - logistics_department
                  - legal_compliance_department
                  - qm_department
                  - product_department
                  - purchasing_department
                type: string
              type: array
              x-apidog-enum:
                - name: Management Department
                  value: management_department
                - name: Sales Department
                  value: sales_department
                - name: IT Department
                  value: it_department
                - name: Business Project Management Department
                  value: business_project_management_department
                - name: Finance Controlling Department
                  value: finance_controlling_department
                - name: Engineering Department
                  value: engineering_department
                - name: HR Department
                  value: hr_department
                - name: Marketing Department
                  value: marketing_department
                - name: Consulting Department
                  value: consulting_department
                - name: Media Communications Department
                  value: media_communications_department
                - name: Support Department
                  value: support_department
                - name: RD Department
                  value: rd_department
                - name: Students Apprentices
                  value: students_apprentices
                - name: Production Department
                  value: production_department
                - name: Logistics Department
                  value: logistics_department
                - name: Legal Compliance Department
                  value: legal_compliance_department
                - name: QM Department
                  value: qm_department
                - name: Product Department
                  value: product_department
                - name: Purchasing Department
                  value: purchasing_department
            emails:
              description: The contact's e-mail addresses.
              items:
                properties:
                  address:
                    description: A standard e-mail address.
                    example: info@leadfeeder.com
                    type: string
                  source:
                    description: The identifier of the source of data.
                    example: fullenrich
                    type:
                      - string
                      - "null"
                required:
                  - address
                  - source
                type: object
              type: array
            first_name:
              description: The contact's first name.
              example: John
              type:
                - string
                - "null"
            gender:
              description: The contact's gender.
              enum:
                - male
                - female
                - other
                - null
              example: male
              type:
                - string
                - "null"
            hierarchy_level:
              description: The hierarchy level the contact has in the company.
              enum:
                - employees
                - top_management
                - middle_management
                - null
              example: employees
              type:
                - string
                - "null"
            last_name:
              description: The contact's surname.
              example: Doe
              type:
                - string
                - "null"
            phones:
              description: The contact's direct phone numbers within the company.
              items:
                properties:
                  blacklisted:
                    description: Whether the company is not allowed to be contacted because it's part of a register like https://www.tpsonline.org.uk/pages/what_is_tps in the UK. When null, it means the blacklisted status is unknown.
                    example: false
                    type:
                      - boolean
                      - "null"
                  number:
                    description: E.164 representation of a phone number.
                    example: +49 721 50057501
                    type: string
                  source:
                    description: The identifier of the source of data.
                    example: fullenrich
                    type:
                      - string
                      - "null"
                  type:
                    description: The type of phone number.
                    enum:
                      - landline
                      - mobile
                      - fax
                    example: landline
                    type: string
                required:
                  - number
                  - type
                  - blacklisted
                  - source
                type: object
              type: array
            position:
              description: Information about the contact's position within the company.
              properties:
                language_code:
                  description: A two digit language code indicating the language of the original job title according to ISO 639-1 (see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)
                  example: DE
                  type:
                    - string
                    - "null"
                title:
                  description: The contact's job title.
                  example: Geschäftsführer
                  type:
                    - string
                    - "null"
              type:
                - object
                - "null"
            public_sources:
              items:
                description: Detailed sources where information related to the contact was found.
                properties:
                  type:
                    description: The type of the source.
                    enum:
                      - homepage
                      - web
                      - register
                    example: homepage
                    type: string
                  url:
                    description: The URL to the website page for the source.
                    example: https://crowdfunding.dossier.at/unterstuetzerinnen/
                    type: string
                type: object
              type: array
            social_media_profiles:
              description: List of social media pages.
              example:
                facebook:
                  - source: fullenrich
                    url: https://www.facebook.com/getdealfront
                instagram:
                  - source: null
                    url: https://instagram.com/getdealfront
                linkedin:
                  - source: fullenrich
                    url: https://www.linkedin.com/company/dealfront
                pinterest: []
                twitter:
                  - source: null
                    url: https://twitter.com/getdealfront
                xing: []
                youtube: []
              properties:
                facebook:
                  items:
                    properties:
                      source:
                        description: The identifier of the source of data.
                        example: fullenrich
                        type:
                          - string
                          - "null"
                      url:
                        type: string
                    type: object
                  type: array
                instagram:
                  items:
                    properties:
                      source:
                        description: The identifier of the source of data.
                        example: fullenrich
                        type:
                          - string
                          - "null"
                      url:
                        type: string
                    type: object
                  type: array
                linkedin:
                  items:
                    properties:
                      source:
                        description: The identifier of the source of data.
                        example: fullenrich
                        type:
                          - string
                          - "null"
                      url:
                        type: string
                    type: object
                  type: array
                pinterest:
                  items:
                    properties:
                      source:
                        description: The identifier of the source of data.
                        example: fullenrich
                        type:
                          - string
                          - "null"
                      url:
                        type: string
                    type: object
                  type: array
                twitter:
                  items:
                    properties:
                      source:
                        description: The identifier of the source of data.
                        example: fullenrich
                        type:
                          - string
                          - "null"
                      url:
                        type: string
                    type: object
                  type: array
                xing:
                  items:
                    properties:
                      source:
                        description: The identifier of the source of data.
                        example: fullenrich
                        type:
                          - string
                          - "null"
                      url:
                        type: string
                    type: object
                  type: array
                youtube:
                  items:
                    properties:
                      source:
                        description: The identifier of the source of data.
                        example: fullenrich
                        type:
                          - string
                          - "null"
                      url:
                        type: string
                    type: object
                  type: array
              type: object
            title:
              description: The contact's title
              example: Dr.
              type:
                - string
                - "null"
          required:
            - address
            - affiliation
            - custom_fields
            - departments
            - emails
            - first_name
            - gender
            - hierarchy_level
            - last_name
            - phones
            - position
            - public_sources
            - social_media_profiles
            - title
          type: object
        id:
          description: The Leadfeeder contact ID.
          example: "435834"
          type: string
        relationships:
          properties:
            buyer_personas:
              description: Buyer personas defined in the account that this contact matches. By default this field is not displayed, but you can load it by passing the `include=buyer_personas` url parameter.
              items:
                $ref: "#/components/schemas/BuyerPersonaV1"
              type: array
            company:
              description: The company the contact is associated with. By default this field only contains the `id` and `type` fields, but you can load all company attributes by passing the `include=company` url parameter.
              oneOf:
                - additionalProperties: false
                  properties:
                    id:
                      description: The Leadfeeder company ID.
                      example: "129011"
                      type: string
                    type:
                      const: company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CompanyV1"
            lists:
              description: Lists that include this contact. By default this field is not displayed, but you can load it by passing the `include=lists` url parameter.
              items:
                $ref: "#/components/schemas/ListV1"
              type: array
          required:
            - company
          type: object
        type:
          const: contact
          description: The type of the object
          example: contact
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    CookieConsentSettingsV1:
      properties:
        attributes:
          properties:
            consent_management_enabled:
              description: When `true`, the Leadfeeder tracker does not set its cookie on page load until the visitor grants consent. Enable this when the account uses a cookie consent banner.
              example: false
              type: boolean
          required:
            - consent_management_enabled
          type: object
        id:
          description: The account ID these settings belong to.
          example: "123456"
          type: string
        type:
          const: cookie_consent_settings
          example: cookie_consent_settings
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CountryV1:
      properties:
        attributes:
          properties:
            code:
              description: ISO-3166-1 alpha-2 country code.
              example: AT
              type: string
            name:
              description: Country name.
              example: Austria
              type: string
            regions:
              description: Administrative regions for the country, sorted by `code`. Empty if no regions are tracked for the country.
              items:
                properties:
                  code:
                    description: Region code. For European countries the NUTS1-3 schema is used (e.g. `AT11`, `DE2`). For countries outside Europe, values comply with ISO 3166-2 using underscores in place of hyphens (e.g. `US_CA`, `US_AK`).
                    example: AT11
                    type: string
                  name:
                    description: Region name.
                    example: Burgenland
                    type: string
                required:
                  - code
                  - name
                type: object
              type: array
          required:
            - code
            - name
            - regions
          type: object
        id:
          description: ISO-3166-1 alpha-2 country code.
          example: AT
          type: string
        type:
          const: country
          description: The type of the object
          example: country
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CreateCRMContactJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-09-23T12:00:12Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration.
              properties:
                contact_id:
                  description: The Leadfeeder contact ID.
                  example: "3219787601"
                  type: string
                crm_owner_id:
                  description: "Optional owner for the created record: the Leadfeeder id (uuid) of a CRM user."
                  example: 4d5e6f70-8192-4a3b-9c4d-5e6f708192a3
                  type: string
                custom_values:
                  additionalProperties: true
                  description: Optional CRM field values to set on the created record, keyed by the field's API name in the connected CRM (e.g. `Industry__c` in Salesforce).
                  example:
                    Industry__c: SaaS
                  type: object
              type: object
            created_at:
              description: When the job was created.
              example: "2026-09-23T12:00:00Z"
              format: date-time
              type: string
            credits:
              description: Credit consumption details
              properties:
                consumed:
                  description: Credits consumed so far. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.3
                  type: number
                estimated:
                  description: Credits estimated for the job. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.6
                  type: number
              type: object
            errors:
              description: Empty unless `status` is `failed`.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            result:
              description: Outcome of a CRM job. Present only when `status` is `completed`.
              properties:
                crm_connection:
                  description: The resulting CRM connection, usable with `PATCH /v1/crm-connections/{id}`.
                  properties:
                    id:
                      description: The CRM connection ID.
                      example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      const: crm_connection
                      example: crm_connection
                      type: string
                  required:
                    - type
                    - id
                  type: object
                crm_record:
                  description: The CRM record the job created or acted on. Fetch it via the matching `GET /v1/crm-organizations/{id}`, `GET /v1/crm-leads/{id}` or `GET /v1/crm-contacts/{id}` endpoint.
                  properties:
                    id:
                      description: The Leadfeeder id (uuid) of the CRM record.
                      example: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      description: The type of a CRM record.
                      enum:
                        - crm_organization
                        - crm_lead
                        - crm_contact
                      example: crm_organization
                      type: string
                      x-apidog-enum:
                        - description: An Organization / Account record (e.g. a Salesforce Account or a Pipedrive Organization).
                          value: crm_organization
                        - description: A Lead record, in CRMs that have a separate Lead object (e.g. Salesforce, Zoho).
                          value: crm_lead
                        - description: A Contact / Person record (e.g. a Salesforce Contact or a Pipedrive Person).
                          value: crm_contact
                  required:
                    - type
                    - id
                  type: object
              type: object
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: create_crm_contact_job
          example: create_crm_contact_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CreateCRMLeadJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-09-23T12:00:12Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration.
              properties:
                company_id:
                  description: The Leadfeeder company ID.
                  example: "159001425"
                  type: string
                contact_id:
                  description: The Leadfeeder contact ID.
                  example: "3219787601"
                  type: string
                crm_owner_id:
                  description: "Optional owner for the created record: the Leadfeeder id (uuid) of a CRM user."
                  example: 4d5e6f70-8192-4a3b-9c4d-5e6f708192a3
                  type: string
                custom_values:
                  additionalProperties: true
                  description: Optional CRM field values to set on the created record, keyed by the field's API name in the connected CRM (e.g. `Industry__c` in Salesforce).
                  example:
                    Industry__c: SaaS
                  type: object
              type: object
            created_at:
              description: When the job was created.
              example: "2026-09-23T12:00:00Z"
              format: date-time
              type: string
            credits:
              description: Credit consumption details
              properties:
                consumed:
                  description: Credits consumed so far. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.3
                  type: number
                estimated:
                  description: Credits estimated for the job. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.6
                  type: number
              type: object
            errors:
              description: Empty unless `status` is `failed`.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            result:
              description: Outcome of a CRM job. Present only when `status` is `completed`.
              properties:
                crm_connection:
                  description: The resulting CRM connection, usable with `PATCH /v1/crm-connections/{id}`.
                  properties:
                    id:
                      description: The CRM connection ID.
                      example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      const: crm_connection
                      example: crm_connection
                      type: string
                  required:
                    - type
                    - id
                  type: object
                crm_record:
                  description: The CRM record the job created or acted on. Fetch it via the matching `GET /v1/crm-organizations/{id}`, `GET /v1/crm-leads/{id}` or `GET /v1/crm-contacts/{id}` endpoint.
                  properties:
                    id:
                      description: The Leadfeeder id (uuid) of the CRM record.
                      example: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      description: The type of a CRM record.
                      enum:
                        - crm_organization
                        - crm_lead
                        - crm_contact
                      example: crm_organization
                      type: string
                      x-apidog-enum:
                        - description: An Organization / Account record (e.g. a Salesforce Account or a Pipedrive Organization).
                          value: crm_organization
                        - description: A Lead record, in CRMs that have a separate Lead object (e.g. Salesforce, Zoho).
                          value: crm_lead
                        - description: A Contact / Person record (e.g. a Salesforce Contact or a Pipedrive Person).
                          value: crm_contact
                  required:
                    - type
                    - id
                  type: object
              type: object
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: create_crm_lead_job
          example: create_crm_lead_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CreateCRMOrganizationJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-09-23T12:00:12Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration.
              properties:
                company_id:
                  description: The Leadfeeder company ID.
                  example: "159001425"
                  type: string
                crm_owner_id:
                  description: "Optional owner for the created record: the Leadfeeder id (uuid) of a CRM user."
                  example: 4d5e6f70-8192-4a3b-9c4d-5e6f708192a3
                  type: string
                custom_values:
                  additionalProperties: true
                  description: Optional CRM field values to set on the created record, keyed by the field's API name in the connected CRM (e.g. `Industry__c` in Salesforce).
                  example:
                    Industry__c: SaaS
                  type: object
                name:
                  description: Optional name override for the created record.
                  example: Acme GmbH
                  type: string
              type: object
            created_at:
              description: When the job was created.
              example: "2026-09-23T12:00:00Z"
              format: date-time
              type: string
            credits:
              description: Credit consumption details
              properties:
                consumed:
                  description: Credits consumed so far. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.3
                  type: number
                estimated:
                  description: Credits estimated for the job. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.6
                  type: number
              type: object
            errors:
              description: Empty unless `status` is `failed`.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            result:
              description: Outcome of a CRM job. Present only when `status` is `completed`.
              properties:
                crm_connection:
                  description: The resulting CRM connection, usable with `PATCH /v1/crm-connections/{id}`.
                  properties:
                    id:
                      description: The CRM connection ID.
                      example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      const: crm_connection
                      example: crm_connection
                      type: string
                  required:
                    - type
                    - id
                  type: object
                crm_record:
                  description: The CRM record the job created or acted on. Fetch it via the matching `GET /v1/crm-organizations/{id}`, `GET /v1/crm-leads/{id}` or `GET /v1/crm-contacts/{id}` endpoint.
                  properties:
                    id:
                      description: The Leadfeeder id (uuid) of the CRM record.
                      example: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      description: The type of a CRM record.
                      enum:
                        - crm_organization
                        - crm_lead
                        - crm_contact
                      example: crm_organization
                      type: string
                      x-apidog-enum:
                        - description: An Organization / Account record (e.g. a Salesforce Account or a Pipedrive Organization).
                          value: crm_organization
                        - description: A Lead record, in CRMs that have a separate Lead object (e.g. Salesforce, Zoho).
                          value: crm_lead
                        - description: A Contact / Person record (e.g. a Salesforce Contact or a Pipedrive Person).
                          value: crm_contact
                  required:
                    - type
                    - id
                  type: object
              type: object
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: create_crm_organization_job
          example: create_crm_organization_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    CustomFeedFolderV1:
      properties:
        attributes:
          properties:
            created_at:
              description: Datetime when the folder was created.
              example: "2026-01-10T08:00:00.000Z"
              format: date-time
              type: string
            name:
              description: The name of the folder.
              example: Marketing Feeds
              type: string
            preset_folder:
              description: If this is a preset feed folder, the name of the preset folder. Otherwise null.
              example: High-Intent Pages
              type:
                - string
                - "null"
            updated_at:
              description: Datetime when the folder was last updated.
              example: "2026-01-15T12:00:00.000Z"
              format: date-time
              type: string
          required:
            - name
            - preset_folder
            - created_at
            - updated_at
          type: object
        id:
          description: The unique identifier for the custom feed folder.
          example: "42"
          type: string
        relationships:
          properties:
            custom_feeds:
              description: The custom feeds belonging to this folder.
              items:
                properties:
                  id:
                    description: The ID of the custom feed.
                    example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    type: string
                  type:
                    example: custom_feed
                    type: string
                required:
                  - id
                  - type
                type: object
              type: array
          required:
            - custom_feeds
          type: object
        type:
          const: custom_feed_folder
          description: The type of the object
          example: custom_feed_folder
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    CustomFeedRequestV1:
      properties:
        data:
          properties:
            attributes:
              properties:
                advanced_filters:
                  description: |-
                    Advanced filter tree, shared by the Custom Feed endpoints and the Search Web Visits endpoint. This is NOT a free-form recursive tree — it has a FIXED shape that must be followed exactly or the request is rejected with `422 invalid_filters`:

                    1. The root is always `{ type: group, operator: and }`.
                    2. Its `items` array holds EXACTLY TWO groups, in this order: `[0]` the INCLUDE bucket `{ type: group, operator: or }` and `[1]` the EXCLUDE bucket `{ type: group, operator: or, negated: true }`. The exclude bucket is mandatory even when nothing is excluded — pass it with `items: []`.
                    3. Inside each bucket, `items` is a list of AND rows `{ type: group, operator: and }`.
                    4. Inside each AND row, `items` is a list of OR groups `{ type: group, operator: or }`.
                    5. Inside each OR group, `items` is a list of leaf conditions `{ type: filter, field, operator, value }`.

                    So the nesting is always `and → [ or(include), or(exclude, negated) ] → and → or → filter`. Never put a `filter` directly under an AND row or a bucket, and never add `negated` to the root.
                  properties:
                    items:
                      description: 'Exactly two groups: `[0]` the include bucket (operator "or") and `[1]` the exclude bucket (operator "or", negated true). Pass the exclude bucket with `items: []` when nothing is excluded.'
                      example:
                        - items: []
                          negated: false
                          operator: or
                          type: group
                        - items: []
                          negated: true
                          operator: or
                          type: group
                      maxItems: 2
                      minItems: 2
                      prefixItems:
                        - properties:
                            items:
                              description: AND rows whose matches are INCLUDED.
                              items:
                                properties:
                                  items:
                                    description: One or more OR groups, AND-ed together.
                                    items:
                                      properties:
                                        items:
                                          description: One or more leaf conditions, OR-ed together.
                                          items:
                                            properties:
                                              display_value:
                                                description: Human-readable label for the value, shown in the UI. Set it equal to `value` when in doubt (e.g. value "DE" → display_value "Germany").
                                                example: Germany
                                                type: string
                                              field:
                                                description: |
                                                  The field name to which the filter is applied. Available fields include:

                                                  **Company/Organization:**
                                                  - `organization` - Company name, matched against the name and trade name. Not an ID: use `contains` with part of the name. To narrow to known companies by ID, use the Search Web Visits `filters.company_ids` instead
                                                  - `legal_organization` - Legal company name, matched like `organization`
                                                  - `website_address` - Company website URL
                                                  - `employee_count` - Number of employees (exact)
                                                  - `industry_code` - Industry code

                                                  **Location (Company HQ):**
                                                  - `country_code` - ISO country code
                                                  - `city` - City name
                                                  - `region` - State/region
                                                  - `continent` - Continent
                                                  - `world_region` - World region
                                                  - `hq_region`, `hq_country_code`, `hq_continent`, `hq_world_region`, `hq_postal_code` - Headquarters location

                                                  **Location (Visit-based):**
                                                  - `visit_city`, `visit_region`, `visit_country_code`, `visit_continent`, `visit_world_region` - Visit location data

                                                  **Traffic Source:**
                                                  - `source_medium` - Combined traffic source and medium
                                                  - `referrer` - Referring source
                                                  - `referring_url` - Full referring URL
                                                  - `medium` - Traffic medium (organic, cpc, referral, etc.)
                                                  - `campaign` - Campaign name
                                                  - `campaign_type` - Type of campaign
                                                  - `keyword` - Search keyword

                                                  **Visit Behavior:**
                                                  - `device_type` - Device type (desktop, mobile, tablet)
                                                  - `visit_length` - Duration of visit
                                                  - `visit_pageviews` - Number of page views in visit
                                                  - `visits` - Number of visits
                                                  - `pageviews` - Page views count
                                                  - `quality` - Visit quality score

                                                  **Page & Content:**
                                                  - `page` - Page title
                                                  - `page_url` - Full page URL
                                                  - `landing_page_path` - Landing page path
                                                  - `hostname` - Website hostname
                                                  - `file_download_name` - Downloaded file name
                                                  - `form_id` - Form identifier
                                                  - `form_submit` - Form submission event
                                                  - `video_title`, `video_url` - Video engagement

                                                  **CRM Integration:**
                                                  - `crm_connection` - Has CRM connection
                                                  - `crm_opportunity` - CRM entity IDs
                                                  - `crm_lead_owner`, `crm_opportunity_owner`, `crm_organization_owner` - CRM owners
                                                  - `crm_lead_created_in_leadfeeder`, `crm_opportunity_created_in_leadfeeder`, `crm_organization_created_in_leadfeeder` - Created in Leadfeeder
                                                  - `crm_stage` - CRM pipeline stages
                                                  - `crm_opportunity_status` - Opportunity details
                                                  - `crm_task_status` - Task status

                                                  **People & Contacts:**
                                                  - `person_name`, `person_email`, `person_search` - Contact information
                                                  - `identified_visitors` - Identified visitor data

                                                  **Organization & Management:**
                                                  - `followed` - Is being followed
                                                  - `assignee` - Assigned user
                                                  - `tag` - Tags
                                                  - `icp_segment` - ICP segment
                                                  - `lead_id` - Lead identifier
                                                  - `goal` - Goal tracking

                                                  **Marketing Automation:**
                                                  - `ems_campaign`, `ems_list` - Email marketing segments
                                                  - `event_ems_click_campaign`, `event_ems_click_list` - Email click events
                                                  - `companies_list` - Company lists

                                                  **Advertising:**
                                                  - `ad_content` - Ad content/creative
                                                  - `ad_group` - Ad group identifier

                                                  **Special Filters:**
                                                  - `sent_to_im` - Sent to integration/messaging
                                                  - `emailed` - Has been emailed
                                                example: country_code
                                                type: string
                                              operator:
                                                description: 'The operator applied to the field. Not every operator is valid for every field — the accepted set is field-specific, and using an unsupported one returns `422 invalid_filters` ("Unsupported operator"). General rules of thumb: numeric fields (e.g. `employee_count`, `visits`, `pageviews`) use `at_least` / `less_than` with an integer value; short string/enum fields (e.g. `country_code`, `region`, `device_type`) use `is` / `is_not`; URL/text fields (e.g. `page_url`, `referring_url`, `keyword`) use `contains` / `begins_with` / `ends_with` (and their `not_` variants); presence checks (`is_present` / `is_empty`) only apply to fields that can be empty. For the authoritative per-field operator and value list see https://docs.leadfeeder.com/api/public/custom-feed-filter-reference-363484m0'
                                                enum:
                                                  - all_are
                                                  - at_least
                                                  - begins_with
                                                  - contains
                                                  - ends_with
                                                  - includes
                                                  - is
                                                  - is_current_user
                                                  - is_empty
                                                  - is_not
                                                  - is_present
                                                  - less_than
                                                  - none_is
                                                  - not_begins_with
                                                  - not_contains
                                                  - not_includes
                                                example: is
                                                type: string
                                              type:
                                                const: filter
                                                description: Indicates this is a leaf filter condition
                                                example: filter
                                                type: string
                                              value:
                                                description: The value used in the filter condition. Type depends on the field and operator (integer for numeric fields, string otherwise). Use ISO codes for `country_code` (e.g. "DE") and put the readable name in `display_value`.
                                                example: DE
                                                oneOf:
                                                  - type: string
                                                  - type: integer
                                                  - type: "null"
                                            required:
                                              - type
                                              - field
                                              - operator
                                              - value
                                            title: Filter condition
                                            type: object
                                          type: array
                                        operator:
                                          const: or
                                          description: A lead matches if ANY child condition matches.
                                          type: string
                                        type:
                                          const: group
                                          type: string
                                      required:
                                        - type
                                        - operator
                                        - items
                                      title: OR group (conditions)
                                      type: object
                                    type: array
                                  operator:
                                    const: and
                                    description: A lead matches only if EVERY child OR group matches.
                                    type: string
                                  type:
                                    const: group
                                    type: string
                                required:
                                  - type
                                  - operator
                                  - items
                                title: AND group
                                type: object
                              type: array
                            negated:
                              description: Optional here; omit or set false for the include bucket.
                              example: false
                              type: boolean
                            operator:
                              const: or
                              type: string
                            type:
                              const: group
                              type: string
                          required:
                            - type
                            - operator
                            - items
                          title: Include bucket
                          type: object
                        - properties:
                            items:
                              description: AND rows whose matches are EXCLUDED. Use `[]` when nothing should be excluded.
                              items:
                                properties:
                                  items:
                                    description: One or more OR groups, AND-ed together.
                                    items:
                                      properties:
                                        items:
                                          description: One or more leaf conditions, OR-ed together.
                                          items:
                                            properties:
                                              display_value:
                                                description: Human-readable label for the value, shown in the UI. Set it equal to `value` when in doubt (e.g. value "DE" → display_value "Germany").
                                                example: Germany
                                                type: string
                                              field:
                                                description: |
                                                  The field name to which the filter is applied. Available fields include:

                                                  **Company/Organization:**
                                                  - `organization` - Company name, matched against the name and trade name. Not an ID: use `contains` with part of the name. To narrow to known companies by ID, use the Search Web Visits `filters.company_ids` instead
                                                  - `legal_organization` - Legal company name, matched like `organization`
                                                  - `website_address` - Company website URL
                                                  - `employee_count` - Number of employees (exact)
                                                  - `industry_code` - Industry code

                                                  **Location (Company HQ):**
                                                  - `country_code` - ISO country code
                                                  - `city` - City name
                                                  - `region` - State/region
                                                  - `continent` - Continent
                                                  - `world_region` - World region
                                                  - `hq_region`, `hq_country_code`, `hq_continent`, `hq_world_region`, `hq_postal_code` - Headquarters location

                                                  **Location (Visit-based):**
                                                  - `visit_city`, `visit_region`, `visit_country_code`, `visit_continent`, `visit_world_region` - Visit location data

                                                  **Traffic Source:**
                                                  - `source_medium` - Combined traffic source and medium
                                                  - `referrer` - Referring source
                                                  - `referring_url` - Full referring URL
                                                  - `medium` - Traffic medium (organic, cpc, referral, etc.)
                                                  - `campaign` - Campaign name
                                                  - `campaign_type` - Type of campaign
                                                  - `keyword` - Search keyword

                                                  **Visit Behavior:**
                                                  - `device_type` - Device type (desktop, mobile, tablet)
                                                  - `visit_length` - Duration of visit
                                                  - `visit_pageviews` - Number of page views in visit
                                                  - `visits` - Number of visits
                                                  - `pageviews` - Page views count
                                                  - `quality` - Visit quality score

                                                  **Page & Content:**
                                                  - `page` - Page title
                                                  - `page_url` - Full page URL
                                                  - `landing_page_path` - Landing page path
                                                  - `hostname` - Website hostname
                                                  - `file_download_name` - Downloaded file name
                                                  - `form_id` - Form identifier
                                                  - `form_submit` - Form submission event
                                                  - `video_title`, `video_url` - Video engagement

                                                  **CRM Integration:**
                                                  - `crm_connection` - Has CRM connection
                                                  - `crm_opportunity` - CRM entity IDs
                                                  - `crm_lead_owner`, `crm_opportunity_owner`, `crm_organization_owner` - CRM owners
                                                  - `crm_lead_created_in_leadfeeder`, `crm_opportunity_created_in_leadfeeder`, `crm_organization_created_in_leadfeeder` - Created in Leadfeeder
                                                  - `crm_stage` - CRM pipeline stages
                                                  - `crm_opportunity_status` - Opportunity details
                                                  - `crm_task_status` - Task status

                                                  **People & Contacts:**
                                                  - `person_name`, `person_email`, `person_search` - Contact information
                                                  - `identified_visitors` - Identified visitor data

                                                  **Organization & Management:**
                                                  - `followed` - Is being followed
                                                  - `assignee` - Assigned user
                                                  - `tag` - Tags
                                                  - `icp_segment` - ICP segment
                                                  - `lead_id` - Lead identifier
                                                  - `goal` - Goal tracking

                                                  **Marketing Automation:**
                                                  - `ems_campaign`, `ems_list` - Email marketing segments
                                                  - `event_ems_click_campaign`, `event_ems_click_list` - Email click events
                                                  - `companies_list` - Company lists

                                                  **Advertising:**
                                                  - `ad_content` - Ad content/creative
                                                  - `ad_group` - Ad group identifier

                                                  **Special Filters:**
                                                  - `sent_to_im` - Sent to integration/messaging
                                                  - `emailed` - Has been emailed
                                                example: country_code
                                                type: string
                                              operator:
                                                description: 'The operator applied to the field. Not every operator is valid for every field — the accepted set is field-specific, and using an unsupported one returns `422 invalid_filters` ("Unsupported operator"). General rules of thumb: numeric fields (e.g. `employee_count`, `visits`, `pageviews`) use `at_least` / `less_than` with an integer value; short string/enum fields (e.g. `country_code`, `region`, `device_type`) use `is` / `is_not`; URL/text fields (e.g. `page_url`, `referring_url`, `keyword`) use `contains` / `begins_with` / `ends_with` (and their `not_` variants); presence checks (`is_present` / `is_empty`) only apply to fields that can be empty. For the authoritative per-field operator and value list see https://docs.leadfeeder.com/api/public/custom-feed-filter-reference-363484m0'
                                                enum:
                                                  - all_are
                                                  - at_least
                                                  - begins_with
                                                  - contains
                                                  - ends_with
                                                  - includes
                                                  - is
                                                  - is_current_user
                                                  - is_empty
                                                  - is_not
                                                  - is_present
                                                  - less_than
                                                  - none_is
                                                  - not_begins_with
                                                  - not_contains
                                                  - not_includes
                                                example: is
                                                type: string
                                              type:
                                                const: filter
                                                description: Indicates this is a leaf filter condition
                                                example: filter
                                                type: string
                                              value:
                                                description: The value used in the filter condition. Type depends on the field and operator (integer for numeric fields, string otherwise). Use ISO codes for `country_code` (e.g. "DE") and put the readable name in `display_value`.
                                                example: DE
                                                oneOf:
                                                  - type: string
                                                  - type: integer
                                                  - type: "null"
                                            required:
                                              - type
                                              - field
                                              - operator
                                              - value
                                            title: Filter condition
                                            type: object
                                          type: array
                                        operator:
                                          const: or
                                          description: A lead matches if ANY child condition matches.
                                          type: string
                                        type:
                                          const: group
                                          type: string
                                      required:
                                        - type
                                        - operator
                                        - items
                                      title: OR group (conditions)
                                      type: object
                                    type: array
                                  operator:
                                    const: and
                                    description: A lead matches only if EVERY child OR group matches.
                                    type: string
                                  type:
                                    const: group
                                    type: string
                                required:
                                  - type
                                  - operator
                                  - items
                                title: AND group
                                type: object
                              type: array
                            negated:
                              const: true
                              description: Must be true — this marks the exclude bucket.
                              example: true
                              type: boolean
                            operator:
                              const: or
                              type: string
                            type:
                              const: group
                              type: string
                          required:
                            - type
                            - operator
                            - negated
                            - items
                          title: Exclude bucket
                          type: object
                      type: array
                    operator:
                      const: and
                      description: The root group is always AND.
                      example: and
                      type: string
                    type:
                      const: group
                      description: The root filter type is always a group.
                      example: group
                      type: string
                    version:
                      const: 1
                      description: Optional schema version; the only supported value is 1.
                      example: 1
                      type: integer
                  required:
                    - type
                    - operator
                    - items
                  type: object
                name:
                  description: Name of the custom feed (max 60 characters)
                  example: All companies
                  maxLength: 60
                  type: string
                notifications:
                  description: Notification subscriptions for this custom feed
                  items:
                    oneOf:
                      - properties:
                          medium:
                            description: The delivery channel for the notification
                            enum:
                              - email
                              - slack
                            example: email
                            type: string
                          sending_interval:
                            description: How often the notification is sent
                            enum:
                              - day
                              - week
                            example: day
                            type: string
                          user_id:
                            description: The Leadfeeder user ID of the subscribed user
                            example: 12345
                            type: integer
                        required:
                          - sending_interval
                          - medium
                          - user_id
                        title: User subscription
                        type: object
                      - properties:
                          email:
                            description: Email address of the subscriber
                            example: subscriber@example.com
                            type: string
                          medium:
                            description: The delivery channel for the notification
                            enum:
                              - email
                              - slack
                            example: email
                            type: string
                          sending_interval:
                            description: How often the notification is sent
                            enum:
                              - day
                              - week
                            example: day
                            type: string
                        required:
                          - sending_interval
                          - medium
                          - email
                        title: Email subscription
                        type: object
                  type: array
              required:
                - name
              type: object
            relationships:
              properties:
                folder:
                  default: null
                  description: |
                    Folder assignment for the custom feed. Pass `null` (or omit) to
                    leave the feed unfiled, or pass an object referencing a folder ID.
                  oneOf:
                    - type: "null"
                    - properties:
                        id:
                          description: The ID of the folder
                          type: string
                        type:
                          description: Resource type identifier
                          enum:
                            - custom_feed_folder
                          type: string
                      required:
                        - id
                        - type
                      type: object
              type: object
            type:
              const: custom_feed
              description: The type of the object
              example: custom_feed
              type: string
          required:
            - type
            - attributes
          type: object
      required:
        - data
      type: object
    CustomFeedV1:
      properties:
        attributes:
          properties:
            advanced_filters:
              description: Advanced filters configuration for the custom feed. Returns null if no filters are configured.
              oneOf:
                - type: "null"
                - properties:
                    items:
                      description: List of filter groups or conditions
                      items:
                        oneOf:
                          - properties:
                              display_value:
                                description: Optional display value for UI presentation
                                example: Germany
                                type: string
                              field:
                                description: |
                                  The field name to which the filter is applied. Available fields include:

                                  **Company/Organization:**
                                  - `organization` - Company name, matched against the name and trade name. Not an ID: use `contains` with part of the name. To narrow to known companies by ID, use the Search Web Visits `filters.company_ids` instead
                                  - `legal_organization` - Legal company name, matched like `organization`
                                  - `website_address` - Company website URL
                                  - `employee_count` - Number of employees (exact)
                                  - `industry_code` - Industry code

                                  **Location (Company HQ):**
                                  - `country_code` - ISO country code
                                  - `city` - City name
                                  - `region` - State/region
                                  - `continent` - Continent
                                  - `world_region` - World region
                                  - `hq_region`, `hq_country_code`, `hq_continent`, `hq_world_region`, `hq_postal_code` - Headquarters location

                                  **Location (Visit-based):**
                                  - `visit_city`, `visit_region`, `visit_country_code`, `visit_continent`, `visit_world_region` - Visit location data

                                  **Traffic Source:**
                                  - `source_medium` - Combined traffic source and medium
                                  - `referrer` - Referring source
                                  - `referring_url` - Full referring URL
                                  - `medium` - Traffic medium (organic, cpc, referral, etc.)
                                  - `campaign` - Campaign name
                                  - `campaign_type` - Type of campaign
                                  - `keyword` - Search keyword

                                  **Visit Behavior:**
                                  - `device_type` - Device type (desktop, mobile, tablet)
                                  - `visit_length` - Duration of visit
                                  - `visit_pageviews` - Number of page views in visit
                                  - `visits` - Number of visits
                                  - `pageviews` - Page views count
                                  - `quality` - Visit quality score

                                  **Page & Content:**
                                  - `page` - Page title
                                  - `page_url` - Full page URL
                                  - `landing_page_path` - Landing page path
                                  - `hostname` - Website hostname
                                  - `file_download_name` - Downloaded file name
                                  - `form_id` - Form identifier
                                  - `form_submit` - Form submission event
                                  - `video_title`, `video_url` - Video engagement

                                  **CRM Integration:**
                                  - `crm_connection` - Has CRM connection
                                  - `crm_opportunity` - CRM entity IDs
                                  - `crm_lead_owner`, `crm_opportunity_owner`, `crm_organization_owner` - CRM owners
                                  - `crm_lead_created_in_leadfeeder`, `crm_opportunity_created_in_leadfeeder`, `crm_organization_created_in_leadfeeder` - Created in Leadfeeder
                                  - `crm_stage` - CRM pipeline stages
                                  - `crm_opportunity_status` - Opportunity details
                                  - `crm_task_status` - Task status

                                  **People & Contacts:**
                                  - `person_name`, `person_email`, `person_search` - Contact information
                                  - `identified_visitors` - Identified visitor data

                                  **Organization & Management:**
                                  - `followed` - Is being followed
                                  - `assignee` - Assigned user
                                  - `tag` - Tags
                                  - `icp_segment` - ICP segment
                                  - `lead_id` - Lead identifier
                                  - `goal` - Goal tracking

                                  **Marketing Automation:**
                                  - `ems_campaign`, `ems_list` - Email marketing segments
                                  - `event_ems_click_campaign`, `event_ems_click_list` - Email click events
                                  - `companies_list` - Company lists

                                  **Advertising:**
                                  - `ad_content` - Ad content/creative
                                  - `ad_group` - Ad group identifier

                                  **Special Filters:**
                                  - `sent_to_im` - Sent to integration/messaging
                                  - `emailed` - Has been emailed
                                example: country_code
                                type: string
                              operator:
                                description: The logical operator applied to the filter
                                enum:
                                  - all_are
                                  - at_least
                                  - begins_with
                                  - contains
                                  - ends_with
                                  - includes
                                  - is
                                  - is_current_user
                                  - is_empty
                                  - is_not
                                  - is_present
                                  - less_than
                                  - none_is
                                  - not_begins_with
                                  - not_contains
                                  - not_includes
                                example: includes
                                type: string
                              type:
                                description: Indicates this is a filter condition
                                enum:
                                  - filter
                                example: filter
                                type: string
                              value:
                                description: The value used in the filter condition. Type depends on the field and operator.
                                example: DE
                                oneOf:
                                  - type: string
                                  - type: integer
                                  - type: "null"
                            required:
                              - type
                              - field
                              - operator
                              - value
                            title: Filter
                            type: object
                          - properties:
                              items:
                                description: Nested filter conditions or groups
                                items:
                                  type: object
                                type: array
                              negated:
                                description: Whether this filter group is negated
                                example: false
                                type: boolean
                              operator:
                                description: The logical operator to combine items
                                enum:
                                  - and
                                  - or
                                example: or
                                type: string
                              type:
                                description: Indicates this is a filter group
                                enum:
                                  - group
                                example: group
                                type: string
                            required:
                              - type
                              - operator
                              - items
                            title: Group
                            type: object
                      type: array
                    operator:
                      description: The logical operator to apply to items
                      enum:
                        - and
                        - or
                      example: and
                      type: string
                    type:
                      description: The filter type
                      enum:
                        - group
                      example: group
                      type: string
                  required:
                    - type
                    - operator
                  type: object
            app_url:
              description: Where the custom feed can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/f/123456/feed/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0
              format: uri
              type:
                - string
                - "null"
            created_at:
              description: Datetime when the custom feed was created.
              example: "2026-01-15T10:30:00.000Z"
              format: date-time
              type: string
            deletable:
              description: Whether this custom feed can be deleted.
              example: true
              type: boolean
            name:
              description: Name of the custom feed.
              example: All companies
              type: string
            notifications:
              description: Notification subscriptions configured for this custom feed.
              items:
                oneOf:
                  - properties:
                      medium:
                        description: The delivery channel for the notification.
                        enum:
                          - email
                          - slack
                        example: email
                        type: string
                      sending_interval:
                        description: How often the notification is sent.
                        enum:
                          - day
                          - week
                        example: day
                        type: string
                      user_id:
                        description: The Leadfeeder user ID of the subscribed user.
                        example: 12345
                        type: integer
                    required:
                      - sending_interval
                      - medium
                      - user_id
                    title: User subscription
                    type: object
                  - properties:
                      email:
                        description: Email address of the subscriber.
                        example: subscriber@example.com
                        type: string
                      medium:
                        description: The delivery channel for the notification.
                        enum:
                          - email
                          - slack
                        example: email
                        type: string
                      sending_interval:
                        description: How often the notification is sent.
                        enum:
                          - day
                          - week
                        example: day
                        type: string
                    required:
                      - sending_interval
                      - medium
                      - email
                    title: Email subscription
                    type: object
              type: array
            updated_at:
              description: Datetime when the custom feed was last updated.
              example: "2026-01-20T14:00:00.000Z"
              format: date-time
              type: string
            viewable:
              description: Whether this custom feed can be viewed.
              example: true
              type: boolean
          required:
            - name
            - created_at
            - updated_at
            - deletable
            - viewable
            - notifications
          type: object
        id:
          description: The unique identifier for the custom feed.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          type: string
        relationships:
          properties:
            connected_list:
              description: The connection that keeps a Leadfeeder list in sync with the companies the custom feed matches. Inlined as a full `connected_list` resource when `include=connected_list` is set; otherwise an `id` / `type` reference. Omitted when a custom feed is embedded in another resource, such as a campaign.
              oneOf:
                - description: The custom feed is not connected to a list.
                  type: "null"
                - additionalProperties: false
                  description: Reference returned by default — `id` / `type` only, when `include=connected_list` is not requested.
                  properties:
                    id:
                      example: "512"
                      type: string
                    type:
                      const: connected_list
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/ConnectedListV1"
            created_by:
              description: The user who originally created the custom feed.
              oneOf:
                - description: No user associated with this custom feed
                  type: "null"
                - properties:
                    id:
                      description: The Leadfeeder user ID.
                      example: "12345"
                      type: string
                    type:
                      default: user
                      type: string
                  required:
                    - id
                    - type
                  type: object
            folder:
              oneOf:
                - description: No folder assigned to this custom feed
                  type: "null"
                - properties:
                    id:
                      description: The ID of the folder.
                      example: "42"
                      type: string
                    type:
                      example: custom_feed_folder
                      type: string
                  required:
                    - id
                    - type
                  type: object
          required:
            - created_by
          type: object
        type:
          const: custom_feed
          description: The type of the object
          example: custom_feed
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    CustomFieldV1:
      properties:
        attributes:
          properties:
            configuration:
              allOf:
                - description: Configuration for AI and contact_collection field types. Must be a JSON object. Silently ignored for simple field types (`text`, `number`, `boolean`, `date`).
                  oneOf:
                    - additionalProperties: false
                      description: Configuration for AI field types. The `prompt` property is required.
                      properties:
                        prompt:
                          description: The AI prompt text.
                          type: string
                        prompt_category:
                          description: Optional topical category for the AI prompt. Constrains the prompt to a known group used by xenon to organize prompts across the system.
                          enum:
                            - job_listings
                            - news
                            - funding
                            - growth
                            - technologies
                            - legal_compliance
                            - marketing
                            - leadership_changes
                            - research_and_development
                            - products
                          example: technologies
                          type: string
                        prompt_with_external_data:
                          description: Whether the AI prompt should use external data.
                          type: boolean
                      required:
                        - prompt
                      title: AI configuration
                      type: object
                    - additionalProperties: false
                      description: Configuration for contact_collection field type. All properties are optional. contacts_to_enrich cannot exceed num_contacts_max_per_company.
                      properties:
                        buyer_persona_id:
                          description: Buyer persona identifier used to scope contact discovery (max 50 characters).
                          maxLength: 50
                          type: string
                        contacts_to_enrich:
                          description: Number of contacts to enrich; required when find_more_contacts_details is true; cannot exceed num_contacts_max_per_company
                          minimum: 1
                          type: integer
                        enrich_emails:
                          description: Include email enrichment in CCR
                          type: boolean
                        enrich_phones:
                          description: Include phone enrichment in CCR
                          type: boolean
                        find_more_contacts_details:
                          description: Enable Company Contacts Reveal (CCR) enrichment
                          type: boolean
                        num_contacts_max_per_company:
                          description: Maximum contacts per company
                          type: integer
                      title: Contact collection configuration
                      type: object
                - description: Type-specific configuration. Present for AI field types (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`) and `contact_collection`. Absent for simple field types (`text`, `number`, `boolean`, `date`).
            created_at:
              description: Date and time when the custom field was created
              example: "2024-12-10T15:57:25Z"
              format: date-time
              type: string
            name:
              description: The human-readable name of the custom field
              example: Prospect
              type: string
            read_only:
              type: boolean
            scope:
              description: The entity type this custom field applies to
              enum:
                - company
                - contact
              example: company
              type: string
            source:
              description: The origin of the custom field
              enum:
                - system
                - user
                - crm
                - user/ai_refinement
              example: user
              type: string
              x-apidog-enum:
                - description: Created by the system
                  value: system
                - description: Created by a user
                  value: user
                - description: Imported from a CRM
                  value: crm
                - description: Created by a user via AI refinement
                  value: user/ai_refinement
            type:
              description: The data type of the custom field
              enum:
                - text
                - number
                - boolean
                - date
                - contact_collection
                - ai_score
                - ai_text
                - ai_number
                - ai_boolean
              example: text
              type: string
              x-apidog-enum:
                - description: A free-form text value
                  value: text
                - description: A numeric value
                  value: number
                - description: A true/false value
                  value: boolean
                - description: A date value
                  value: date
                - description: A collection of contacts
                  value: contact_collection
                - description: An AI-generated score value
                  value: ai_score
                - description: An AI-generated text value
                  value: ai_text
                - description: An AI-generated numeric value
                  value: ai_number
                - description: An AI-generated true/false value
                  value: ai_boolean
            updated_at:
              description: Date and time when the custom field was last updated
              example: "2024-11-24T11:50:00Z"
              format: date-time
              type: string
          required:
            - name
            - scope
            - type
            - read_only
            - source
            - created_at
          type: object
        id:
          description: The internal name of the custom field. It is based on the initial human-readable name of the field and assigned by the system automatically. It cannot be changed later.
          example: score
          type: string
        relationships:
          properties:
            created_by:
              properties:
                id:
                  description: The Leadfeeder user ID.
                  example: "12345"
                  type: string
                type:
                  default: user
                  type: string
              required:
                - id
                - type
              type: object
          required:
            - created_by
          type: object
        type:
          const: custom_field
          description: The type of the object
          example: custom_field
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    DataProcessingSettingsV1:
      properties:
        attributes:
          properties:
            changelog:
              description: Full change history ordered most-recent-first. Each entry records the value set, who set it, and when.
              items:
                properties:
                  changed_at:
                    description: ISO 8601 timestamp of when the change was made.
                    example: "2026-06-01T12:00:00Z"
                    format: date-time
                    type: string
                  changed_by_email:
                    description: Email address of the user who made the change.
                    example: jane.smith@example.com
                    format: email
                    type: string
                  changed_by_name:
                    description: Full name of the user who made the change.
                    example: Jane Smith
                    type: string
                  enabled:
                    description: The value that was set in this change.
                    example: true
                    type: boolean
                required:
                  - enabled
                  - changed_by_email
                  - changed_by_name
                  - changed_at
                type: object
              type: array
            enabled:
              description: Whether third-party data enrichment providers are allowed for this account. `null` means the setting has never been explicitly configured.
              example: true
              type:
                - boolean
                - "null"
          required:
            - enabled
            - changelog
          type: object
        id:
          description: The account ID this configuration belongs to.
          example: "123456"
          type: string
        type:
          const: data_processing_settings
          example: data_processing_settings
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    DisconnectCRMRecordJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-09-23T12:00:12Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration.
              properties:
                crm_connection_id:
                  description: The CRM connection ID, as returned by the company or contact CRM connection reads.
                  example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                  type: string
              type: object
            created_at:
              description: When the job was created.
              example: "2026-09-23T12:00:00Z"
              format: date-time
              type: string
            errors:
              description: Empty unless `status` is `failed`.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: disconnect_crm_record_job
          example: disconnect_crm_record_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    EnrichCRMRecordJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-09-23T12:00:12Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: Echoed request configuration.
              properties:
                crm_connection_id:
                  description: The CRM connection ID, as returned by the company or contact CRM connection reads.
                  example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                  type: string
              type: object
            created_at:
              description: When the job was created.
              example: "2026-09-23T12:00:00Z"
              format: date-time
              type: string
            credits:
              description: Credit consumption details
              properties:
                consumed:
                  description: Credits consumed so far. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.3
                  type: number
                estimated:
                  description: Credits estimated for the job. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.6
                  type: number
              type: object
            errors:
              description: Empty unless `status` is `failed`.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            result:
              description: Outcome of a CRM job. Present only when `status` is `completed`.
              properties:
                crm_connection:
                  description: The resulting CRM connection, usable with `PATCH /v1/crm-connections/{id}`.
                  properties:
                    id:
                      description: The CRM connection ID.
                      example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      const: crm_connection
                      example: crm_connection
                      type: string
                  required:
                    - type
                    - id
                  type: object
                crm_record:
                  description: The CRM record the job created or acted on. Fetch it via the matching `GET /v1/crm-organizations/{id}`, `GET /v1/crm-leads/{id}` or `GET /v1/crm-contacts/{id}` endpoint.
                  properties:
                    id:
                      description: The Leadfeeder id (uuid) of the CRM record.
                      example: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: string
                    type:
                      description: The type of a CRM record.
                      enum:
                        - crm_organization
                        - crm_lead
                        - crm_contact
                      example: crm_organization
                      type: string
                      x-apidog-enum:
                        - description: An Organization / Account record (e.g. a Salesforce Account or a Pipedrive Organization).
                          value: crm_organization
                        - description: A Lead record, in CRMs that have a separate Lead object (e.g. Salesforce, Zoho).
                          value: crm_lead
                        - description: A Contact / Person record (e.g. a Salesforce Contact or a Pipedrive Person).
                          value: crm_contact
                  required:
                    - type
                    - id
                  type: object
              type: object
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400-e29b-41d4-a716-446655440000
          type: string
        type:
          const: enrich_crm_record_job
          example: enrich_crm_record_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    EnrichedIpV1:
      properties:
        attributes:
          properties:
            company_type:
              description: Indicates whether the IP address is associated with a company or another entity (e.g. an ISP).
              enum:
                - shared_network
                - company
              type: string
              x-apidog-enum:
                - description: Refers to organizations or entities that often manage public or shared networks. This includes ISPs, universities, malls, hospitals, coworking spaces, and marketing or traffic-generation SaaS platforms.
                  name: Shared-network
                  value: shared_network
                - description: A legal entity listed in the Leadfeeder companies database. These are typically B2B organizations with structured business data.
                  name: Company
                  value: company
            confidence_score:
              description: The confidence score of the IP address.
              enum:
                - very_high
                - high
                - medium
                - low
              type: string
              x-apidog-enum:
                - description: Indicates highly reliable data based on recent, consistent traffic observations using multiple sources that strongly link the IP address to the specified company. In addition public IP address records verified by our data quality processes.
                  name: Very high
                  value: very_high
                - description: Indicates reliable identification over a sustained period, with a low margin of error (less than a few percent).
                  name: High
                  value: high
                - description: Represents IP address connections where the ownership of the IP address has been changing more frequently or where there is a chance of multiple companies sharing the same IP address.
                  name: Medium
                  value: medium
                - description: Connections with a higher margin of error due to lack of most recent data points. Public data that has not been fully verified through Leadfeeder's data quality processes also receives a low score.
                  name: Low
                  value: low
            ip_address:
              description: The IP address
              example: 185.70.216.139
              type: string
            location:
              $ref: "#/components/schemas/IpLocationV1"
          required:
            - ip_address
            - company_type
            - confidence_score
            - location
          type: object
        id:
          example: "18570216139"
          type: string
        relationships:
          oneOf:
            - properties:
                company:
                  $ref: "#/components/schemas/CompanyV1"
                  description: The company associated with the IP address.  This field is null if the IP address is not associated with a company.
              required:
                - company
            - properties:
                network:
                  $ref: "#/components/schemas/NetworkV1"
                  description: The network associated with the IP address.
              required:
                - network
          type: object
        type:
          const: enriched_ip
          description: The type of the object
          example: enriched_ip
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    EnrichmentJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-03-10T12:05:30Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: "The settings the job was created with: `custom_field_id`, `enrichment_strategy`, `company_ids`, `list_id` and `advanced_search`, each when it was sent."
              properties:
                advanced_search:
                  allOf:
                    - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                      example:
                        excluded_company_ids:
                          - "651713"
                        filters:
                          items:
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                            - field: employee_count
                              operator: in_range
                              type: filter
                              value:
                                gte: 50
                          operator: and
                          type: group
                        page:
                          size: 1000
                        sort:
                          direction: desc
                          field: employee_count
                      properties:
                        excluded_company_ids:
                          description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                          example:
                            - "651713"
                          items:
                            type: string
                          type: array
                        filters:
                          description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                          example:
                            items:
                              - field: country_code
                                operator: in
                                type: filter
                                value:
                                  - DE
                              - items:
                                  - field: employee_count
                                    operator: in_range
                                    type: filter
                                    value:
                                      gte: 50
                                  - field: industries
                                    operator: in
                                    type: filter
                                    value:
                                      classification: nace
                                      codes:
                                        - "62.01"
                                operator: or
                                type: group
                            operator: and
                            type: group
                          properties:
                            items:
                              description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                              items:
                                $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                              type: array
                            operator:
                              description: The logical operator combining the items.
                              enum:
                                - and
                                - or
                              example: and
                              type: string
                            type:
                              description: Indicates this is the root filter group.
                              enum:
                                - group
                              example: group
                              type: string
                          required:
                            - type
                            - operator
                            - items
                          type: object
                        page:
                          description: Bounds how many of the matching companies are selected.
                          properties:
                            size:
                              description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                              example: 1000
                              minimum: 1
                              type: integer
                          type: object
                        sort:
                          description: Ordering applied to the matching companies. Omit to use the default ordering.
                          properties:
                            direction:
                              default: asc
                              description: Sort direction. Defaults to `asc`.
                              enum:
                                - asc
                                - desc
                              example: desc
                              type: string
                            field:
                              description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                              example: employee_count,name
                              type: string
                          type: object
                      required:
                        - filters
                      type: object
                  description: The `advanced_search` the job was created with, as sent.
                  type: object
                company_ids:
                  description: Specific company IDs targeted (mutually exclusive with list_id)
                  items:
                    type: string
                  type: array
                custom_field_id:
                  description: The custom field being enriched
                  type: string
                enrichment_strategy:
                  description: Which records to enrich
                  enum:
                    - missing_values
                    - all
                    - preview
                  example: missing_values
                  type: string
                  x-apidog-enum:
                    - description: Only enrich records that don't have a value yet. It can't be used with `advanced_search`.
                      value: missing_values
                    - description: Enrich all records regardless of existing values
                      value: all
                    - description: Dry run — sample up to 100 companies and return per-company results on the job resource, without writing custom field values or modifying lists. Applies to job creation only.
                      value: preview
                list_id:
                  description: The `list_id` the job was created with.
                  type: string
              type: object
            created_at:
              description: When the job was created
              example: "2026-03-10T12:00:00Z"
              format: date-time
              type: string
            credits:
              description: Credit consumption details
              properties:
                consumed:
                  description: Credits consumed so far. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.3
                  type: number
                estimated:
                  description: Credits estimated for the job. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.6
                  type: number
              type: object
            errors:
              description: Empty unless `status` is `failed`. When a job created from a search selection fails because the search rejected its filters or sort, or failed itself, it holds the search's own code and title, such as `invalid_filters` or `server_timeout`. When the account doesn't have enough credits to pay for the run, the job fails before any company is enriched and holds `insufficient_credits`, with a title that states the credits the run needs and the credits the account has left. No credits are consumed. Create the job again once the account has enough credits.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            results:
              description: "Per-company results. Present only for completed `preview` runs; regular runs write their values to the custom field instead. A scalar preview returns `score` and `reason`; a contacts preview (of a `contact_collection` field, or a prompt-only preview with `output_type: contact_collection`) returns `contacts` instead."
              items:
                properties:
                  company_id:
                    description: The company the result is for
                    example: "651713"
                    type: string
                  company_name:
                    description: "The company's name, on every preview result. `null` when no name is known for the company. On a contacts preview it is truncated so that its JSON-encoded form is at most 40 bytes, not counting the enclosing quotes. On a contacts preview, an account without the `target` entitlement gets the name masked: its first three characters followed by one `*` per remaining character, as in company search results."
                    example: Acme GmbH
                    type:
                      - string
                      - "null"
                  contacts:
                    description: The contacts the AI selected for this company. Present only on a contacts preview, in place of `score` and `reason`. When the AI finds no contacts for a company, the array is empty and `outcome` is still `success`. Contact details are not revealed by a preview, so only the identifying fields of each contact are returned.
                    example:
                      - attributes:
                          full_name: Jane Doe
                          position:
                            title: Head of Procurement
                        id: "435834"
                        type: contact_preview
                      - attributes:
                          full_name: John Smith
                          position: null
                        id: "435901"
                        type: contact_preview
                    items:
                      $ref: "#/components/schemas/ContactPreviewV1"
                    type: array
                  outcome:
                    description: Whether the AI produced an answer for this company
                    enum:
                      - success
                      - no_data
                    example: success
                    type: string
                    x-apidog-enum:
                      - description: The AI produced an answer
                        value: success
                      - description: The AI found nothing for this company
                        value: no_data
                  reason:
                    description: The AI's explanation for the answer
                    example: Fits the target profile
                    type: string
                  score:
                    description: The AI answer. Also aliased under the output type's short name (`text`, `number`, `boolean`, or `score`).
                    example: 8
                required:
                  - company_id
                  - company_name
                  - outcome
                type: object
              type: array
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
            summary:
              description: Record processing summary
              properties:
                failed:
                  description: Records that failed enrichment
                  type: integer
                succeeded:
                  description: Records enriched successfully
                  type: integer
                total:
                  description: Total records to process
                  type: integer
              type: object
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_21662
          type: string
        type:
          default: enrichment_job
          example: enrichment_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    ErrorObjectV1:
      properties:
        code:
          description: A short error code identifying the type of error.
          type: string
        detail:
          description: Additional information about the error, if available.
          type: string
        source:
          additionalProperties: false
          description: Locates the part of the request the error refers to, when the error applies to a specific field rather than the request as a whole.
          properties:
            pointer:
              description: A JSON Pointer to the offending request member (e.g. `/data/attributes/custom_fields/company_score`).
              type: string
          required:
            - pointer
          type: object
        title:
          description: A human-readable message providing more details about the error.
          type: string
      required:
        - code
        - title
      type: object
    FindContactDataJobV1:
      properties:
        attributes:
          properties:
            completed_at:
              description: When the job finished (null until the job reaches `completed` or `failed`).
              example: "2026-03-10T12:01:42Z"
              format: date-time
              type:
                - string
                - "null"
            configuration:
              description: "Echoed request configuration. Reflects the caller's input shape: either `contact_ids` or `list_id`."
              properties:
                contact_ids:
                  description: Contact IDs submitted for enrichment. Mutually exclusive with `list_id`.
                  items:
                    type: string
                  type: array
                list_id:
                  description: List ID targeted for enrichment. Mutually exclusive with `contact_ids`.
                  type: string
              type: object
            created_at:
              description: When the job was created
              example: "2026-03-10T12:00:00Z"
              format: date-time
              type: string
            credits:
              description: Credit consumption details
              properties:
                consumed:
                  description: Credits consumed so far. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.3
                  type: number
                estimated:
                  description: Credits estimated for the job. Some job types are priced per record at a fractional rate, so this can be a decimal.
                  example: 0.6
                  type: number
              type: object
            errors:
              description: |-
                Empty unless `status` is `failed`. When the job failed because no contact could be enriched, it holds one error:

                - `insufficient_credits`, "There weren't enough credits to find contact data.": the account ran out of credits.
                - `access_denied`, "Access to contact data was denied.": the account isn't allowed to find contact data.
              items:
                properties:
                  code:
                    description: Machine-readable error code
                    example: job_failed
                    type: string
                  title:
                    description: Human-readable error description
                    example: External contact data provider timeout
                    type: string
                required:
                  - code
                  - title
                type: object
              type: array
            status:
              description: Current status of the job
              enum:
                - running
                - completed
                - failed
              example: running
              type: string
              x-apidog-enum:
                - description: Job is currently executing
                  value: running
                - description: Job finished successfully
                  value: completed
                - description: Job execution failed
                  value: failed
            summary:
              description: Record processing summary
              properties:
                failed:
                  description: Records that failed enrichment
                  type: integer
                succeeded:
                  description: Records enriched successfully
                  type: integer
                total:
                  description: Total records to process
                  type: integer
              type: object
          required:
            - status
            - configuration
            - errors
            - created_at
            - completed_at
          type: object
        id:
          description: Unique job identifier
          example: job_550e8400
          type: string
        type:
          default: find_contact_data_job
          example: find_contact_data_job
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    GeoSuggestionV1:
      properties:
        attributes:
          properties:
            city:
              description: City name.
              example: London
              type: string
            country_code:
              description: ISO-3166-1 alpha-2 country code.
              example: GB
              type: string
            latitude:
              description: Latitude of the suggested location.
              example: 51.51
              format: double
              maximum: 90
              minimum: -90
              type: number
            longitude:
              description: Longitude of the suggested location.
              example: -0.13
              format: double
              maximum: 180
              minimum: -180
              type: number
            postal_code:
              description: Postal code of the suggested location, when the match is a postal-code area. `null` for city-level matches.
              example: "60311"
              type:
                - string
                - "null"
          required:
            - city
            - country_code
            - latitude
            - longitude
          type: object
        id:
          description: A response-scoped UUID. It's new on every request — do not cache or persist it.
          example: 9b3f0a1c-2b7e-4e6f-9c1b-7f1a2c3d4e5f
          type: string
        type:
          const: geo_suggestion
          example: geo_suggestion
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    GoalCreateRequestV1:
      properties:
        data:
          properties:
            attributes:
              properties:
                criterion:
                  allOf:
                    - anyOf:
                        - description: Compares the page URL with a non-empty `value`.
                          properties:
                            field:
                              const: page_url
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                                - not_begins_with
                                - ends_with
                                - contains
                                - not_contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "page_url: comparison"
                        - description: Compares the page title with a non-empty `value`.
                          properties:
                            field:
                              const: page
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                                - ends_with
                                - contains
                                - not_contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "page: comparison"
                        - description: Compares the URL of the page a form was submitted on with a non-empty `value`.
                          properties:
                            field:
                              const: form_submit
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "form_submit: comparison"
                        - description: Matches whether the page view is a form submission at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: form_submit
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "form_submit: presence"
                        - description: Compares the downloaded file's name with a non-empty `value`.
                          properties:
                            field:
                              const: file_download_name
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "file_download_name: comparison"
                        - description: Matches whether the page view is a file download at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: file_download_name
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "file_download_name: presence"
                        - description: Compares the video title with a non-empty `value`.
                          properties:
                            field:
                              const: video_title
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                                - contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "video_title: comparison"
                        - description: Matches whether the page view has a video title at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: video_title
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "video_title: presence"
                        - description: Compares the video URL with a non-empty `value`.
                          properties:
                            field:
                              const: video_url
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "video_url: comparison"
                        - description: Matches whether the page view has a video URL at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: video_url
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "video_url: presence"
                      description: The page-view condition that marks a page view as meeting the goal. Each `field` accepts its own set of operators; the `anyOf` branches list them.
                      properties:
                        field:
                          description: What the goal's condition looks at.
                          enum:
                            - page_url
                            - page
                            - form_submit
                            - file_download_name
                            - video_title
                            - video_url
                          example: page_url
                          type: string
                          x-apidog-enum:
                            - description: The page URL
                              value: page_url
                            - description: The page title
                              value: page
                            - description: The URL of the page a form was submitted on
                              value: form_submit
                            - description: The name of the downloaded file
                              value: file_download_name
                            - description: The title of the played video
                              value: video_title
                            - description: The URL of the played video
                              value: video_url
                        operator:
                          description: How `value` is compared. Each `field` accepts its own set of operators; an unsupported pairing is rejected with a 422 naming the accepted operators.
                          enum:
                            - is
                            - is_not
                            - begins_with
                            - not_begins_with
                            - ends_with
                            - contains
                            - not_contains
                            - is_present
                            - is_empty
                          example: contains
                          type: string
                          x-apidog-enum:
                            - description: Equals `value`
                              value: is
                            - description: Does not equal `value`
                              value: is_not
                            - description: Starts with `value`
                              value: begins_with
                            - description: Does not start with `value`
                              value: not_begins_with
                            - description: Ends with `value`
                              value: ends_with
                            - description: Contains `value`
                              value: contains
                            - description: Does not contain `value`
                              value: not_contains
                            - description: The page view has the field at all; takes no `value`
                              value: is_present
                            - description: The page view lacks the field; takes no `value`
                              value: is_empty
                        value:
                          description: The value compared against. Required for every operator except `is_present` and `is_empty`, which take none. `contains`, `begins_with` and `ends_with` need some text besides `/` and `*`.
                          example: /pricing
                          type:
                            - string
                            - "null"
                      required:
                        - operator
                      type: object
                    - required:
                        - field
                  description: The page-view condition that marks a page view as meeting the goal.
                enabled:
                  default: true
                  description: Whether the goal is active. A disabled goal stops matching new page views.
                  example: true
                  type: boolean
                name:
                  description: The human-readable name of the goal.
                  example: Pricing page
                  maxLength: 255
                  type: string
              required:
                - name
                - criterion
              type: object
            type:
              const: goal
              description: The type of the object
              example: goal
              type: string
          required:
            - type
            - attributes
          type: object
      required:
        - data
      type: object
    GoalUpdateRequestV1:
      properties:
        data:
          properties:
            attributes:
              properties:
                criterion:
                  allOf:
                    - anyOf:
                        - description: Compares the page URL with a non-empty `value`.
                          properties:
                            field:
                              const: page_url
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                                - not_begins_with
                                - ends_with
                                - contains
                                - not_contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "page_url: comparison"
                        - description: Compares the page title with a non-empty `value`.
                          properties:
                            field:
                              const: page
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                                - ends_with
                                - contains
                                - not_contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "page: comparison"
                        - description: Compares the URL of the page a form was submitted on with a non-empty `value`.
                          properties:
                            field:
                              const: form_submit
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "form_submit: comparison"
                        - description: Matches whether the page view is a form submission at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: form_submit
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "form_submit: presence"
                        - description: Compares the downloaded file's name with a non-empty `value`.
                          properties:
                            field:
                              const: file_download_name
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "file_download_name: comparison"
                        - description: Matches whether the page view is a file download at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: file_download_name
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "file_download_name: presence"
                        - description: Compares the video title with a non-empty `value`.
                          properties:
                            field:
                              const: video_title
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                                - contains
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "video_title: comparison"
                        - description: Matches whether the page view has a video title at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: video_title
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "video_title: presence"
                        - description: Compares the video URL with a non-empty `value`.
                          properties:
                            field:
                              const: video_url
                              type: string
                            operator:
                              enum:
                                - is
                                - is_not
                                - begins_with
                              type: string
                            value:
                              minLength: 1
                              type: string
                          required:
                            - value
                          title: "video_url: comparison"
                        - description: Matches whether the page view has a video URL at all; takes no `value` (omit it or send `null`).
                          properties:
                            field:
                              const: video_url
                              type: string
                            operator:
                              enum:
                                - is_present
                                - is_empty
                              type: string
                            value:
                              type: "null"
                          title: "video_url: presence"
                      description: The page-view condition that marks a page view as meeting the goal. Each `field` accepts its own set of operators; the `anyOf` branches list them.
                      properties:
                        field:
                          description: What the goal's condition looks at.
                          enum:
                            - page_url
                            - page
                            - form_submit
                            - file_download_name
                            - video_title
                            - video_url
                          example: page_url
                          type: string
                          x-apidog-enum:
                            - description: The page URL
                              value: page_url
                            - description: The page title
                              value: page
                            - description: The URL of the page a form was submitted on
                              value: form_submit
                            - description: The name of the downloaded file
                              value: file_download_name
                            - description: The title of the played video
                              value: video_title
                            - description: The URL of the played video
                              value: video_url
                        operator:
                          description: How `value` is compared. Each `field` accepts its own set of operators; an unsupported pairing is rejected with a 422 naming the accepted operators.
                          enum:
                            - is
                            - is_not
                            - begins_with
                            - not_begins_with
                            - ends_with
                            - contains
                            - not_contains
                            - is_present
                            - is_empty
                          example: contains
                          type: string
                          x-apidog-enum:
                            - description: Equals `value`
                              value: is
                            - description: Does not equal `value`
                              value: is_not
                            - description: Starts with `value`
                              value: begins_with
                            - description: Does not start with `value`
                              value: not_begins_with
                            - description: Ends with `value`
                              value: ends_with
                            - description: Contains `value`
                              value: contains
                            - description: Does not contain `value`
                              value: not_contains
                            - description: The page view has the field at all; takes no `value`
                              value: is_present
                            - description: The page view lacks the field; takes no `value`
                              value: is_empty
                        value:
                          description: The value compared against. Required for every operator except `is_present` and `is_empty`, which take none. `contains`, `begins_with` and `ends_with` need some text besides `/` and `*`.
                          example: /pricing
                          type:
                            - string
                            - "null"
                      required:
                        - operator
                      type: object
                  description: "The page-view condition that marks a page view as meeting the goal. Replaces the stored criterion. `field` may be omitted, and must be the goal's current field when sent: it cannot be changed."
                enabled:
                  description: Whether the goal is active. A disabled goal stops matching new page views. Left unchanged when omitted.
                  example: true
                  type: boolean
                name:
                  description: The human-readable name of the goal.
                  example: Pricing page
                  maxLength: 255
                  type: string
              type: object
            type:
              const: goal
              description: The type of the object
              example: goal
              type: string
          required:
            - type
            - attributes
          type: object
      required:
        - data
      type: object
    GoalV1:
      properties:
        attributes:
          properties:
            app_url:
              description: Where the goal (its edit page in the settings) can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/f/settings/website/123456/goals/42/edit
              format: uri
              type:
                - string
                - "null"
            created_at:
              description: Date and time when the goal was created
              example: "2026-10-01T10:00:00.000Z"
              format: date-time
              type: string
            criterion:
              description: The page-view condition that marks a page view as meeting the goal. It uses the same `field`, `operator` and `value` vocabulary as a custom feed's `advanced_filters` conditions.
              properties:
                field:
                  description: What the goal's condition looks at.
                  enum:
                    - page_url
                    - page
                    - form_submit
                    - file_download_name
                    - video_title
                    - video_url
                  example: page_url
                  type: string
                  x-apidog-enum:
                    - description: The page URL
                      value: page_url
                    - description: The page title
                      value: page
                    - description: The URL of the page a form was submitted on
                      value: form_submit
                    - description: The name of the downloaded file
                      value: file_download_name
                    - description: The title of the played video
                      value: video_title
                    - description: The URL of the played video
                      value: video_url
                operator:
                  description: How `value` is compared. Each `field` accepts its own set of operators; an unsupported pairing is rejected with a 422 naming the accepted operators.
                  enum:
                    - is
                    - is_not
                    - begins_with
                    - not_begins_with
                    - ends_with
                    - contains
                    - not_contains
                    - is_present
                    - is_empty
                  example: contains
                  type: string
                  x-apidog-enum:
                    - description: Equals `value`
                      value: is
                    - description: Does not equal `value`
                      value: is_not
                    - description: Starts with `value`
                      value: begins_with
                    - description: Does not start with `value`
                      value: not_begins_with
                    - description: Ends with `value`
                      value: ends_with
                    - description: Contains `value`
                      value: contains
                    - description: Does not contain `value`
                      value: not_contains
                    - description: The page view has the field at all; takes no `value`
                      value: is_present
                    - description: The page view lacks the field; takes no `value`
                      value: is_empty
                value:
                  description: The value compared against. `null` for `is_present` and `is_empty`, which take no value.
                  example: /pricing
                  type:
                    - string
                    - "null"
              required:
                - field
                - operator
                - value
              type: object
            enabled:
              description: Whether the goal is active. A disabled goal stops matching new page views; page views it already matched keep the goal.
              example: true
              type: boolean
            name:
              description: The human-readable name of the goal
              example: Pricing page
              type: string
            updated_at:
              description: Date and time when the goal was last updated
              example: "2026-10-02T11:00:00.000Z"
              format: date-time
              type: string
          required:
            - name
            - enabled
            - criterion
            - created_at
            - updated_at
          type: object
        id:
          description: The unique identifier for the goal
          example: "4182"
          type: string
        relationships:
          properties:
            custom_feed:
              description: The Web Visits custom feed created for this goal, which lists the visiting companies with a page view meeting it. Pass its `id` as `custom_feed_id` to **Retrieve Web Visits Companies**. `null` until the feed has been created, shortly after the goal, and for goals created once the account already has 20 goal feeds.
              oneOf:
                - description: The goal has no custom feed.
                  type: "null"
                - properties:
                    id:
                      description: The ID of the custom feed.
                      example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      type: string
                    type:
                      const: custom_feed
                      example: custom_feed
                      type: string
                  required:
                    - id
                    - type
                  type: object
          required:
            - custom_feed
          type: object
        type:
          const: goal
          description: The type of the object
          example: goal
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    ICPV1:
      properties:
        attributes:
          properties:
            app_url:
              description: Where the ICP (a company segment in the app) can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/f/settings/website/123456/company-segments/42
              format: uri
              type:
                - string
                - "null"
            created_at:
              description: Date and time when the ICP was created
              example: "2024-12-10T15:57:25Z"
              format: date-time
              type: string
            filters:
              description: Filter criteria that define this ICP, grouped by filter category. Categories with no configured criteria are omitted. The object is empty when the ICP has no filters configured.
              properties:
                employee_count:
                  description: Employee count range filters.
                  items:
                    properties:
                      display_value:
                        description: The human-readable label of the filter value.
                        example: United States
                        type: string
                      negated:
                        description: When true, the filter excludes (rather than includes) matching results.
                        example: false
                        type: boolean
                      search_value:
                        description: The internal value used to match this filter (e.g. industry code, country code, employee range identifier).
                        example: US
                        type: string
                    required:
                      - display_value
                      - negated
                    type: object
                  type: array
                industries:
                  description: Industry filters.
                  items:
                    properties:
                      display_value:
                        description: The human-readable label of the filter value.
                        example: United States
                        type: string
                      negated:
                        description: When true, the filter excludes (rather than includes) matching results.
                        example: false
                        type: boolean
                      search_value:
                        description: The internal value used to match this filter (e.g. industry code, country code, employee range identifier).
                        example: US
                        type: string
                    required:
                      - display_value
                      - negated
                    type: object
                  type: array
                location:
                  description: Location filters.
                  items:
                    properties:
                      display_value:
                        description: The human-readable label of the filter value.
                        example: United States
                        type: string
                      negated:
                        description: When true, the filter excludes (rather than includes) matching results.
                        example: false
                        type: boolean
                      search_value:
                        description: The place this filter matches, in the form its `type` expects.
                        example: US
                        type: string
                      type:
                        description: "What kind of place `search_value` names. `country_code` is an ISO 3166-1 alpha-2 code, `continent` one of `asia`, `north_america`, `africa`, `europe`, `south_america`, `antarctica`, `australia`, and `world_region` one of `africa`, `latam`, `emea`, `amer`, `dach`, `apac`. `region` is legacy and read-only: it is rejected on create and update. May be absent on records created before the type was recorded; treat an absent value as `country_code`. Send it back unchanged when updating, or the filter is read as a country code and rejected."
                        enum:
                          - country_code
                          - continent
                          - world_region
                          - region
                        example: country_code
                        type: string
                    required:
                      - display_value
                      - negated
                    type: object
                  type: array
              type: object
            name:
              description: The human-readable name of the ICP
              example: US Prospects
              type: string
          required:
            - name
            - created_at
            - filters
          type: object
        id:
          description: The unique identifier for the ICP
          example: "6080"
          type: string
        relationships:
          properties:
            custom_feed:
              description: The Web Visits custom feed created alongside this ICP, which lists the visiting companies matching it. Pass its `id` as `custom_feed_id` to **Retrieve Web Visits Companies**. `null` for the few ICPs that were created without a feed.
              oneOf:
                - description: The ICP has no custom feed.
                  type: "null"
                - properties:
                    id:
                      description: The ID of the custom feed.
                      example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      type: string
                    type:
                      const: custom_feed
                      example: custom_feed
                      type: string
                  required:
                    - id
                    - type
                  type: object
          required:
            - custom_feed
          type: object
        type:
          default: icp
          description: The type of the object
          example: icp
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    IcpRequestV1:
      properties:
        data:
          properties:
            attributes:
              properties:
                filters:
                  description: Company-level filter criteria that define the ICP, grouped by category. At least one category must be present and non-empty. Omit a category rather than sending it empty.
                  minProperties: 1
                  properties:
                    employee_count:
                      description: Employee count range filters.
                      items:
                        properties:
                          display_value:
                            description: Human-readable label for the value. Defaults to `search_value` when omitted.
                            example: 11-100
                            type: string
                          negated:
                            default: false
                            description: When true, the filter excludes rather than includes companies in this bucket.
                            type: boolean
                          search_value:
                            description: An employee count range. "10001" means "10000+". These are the size bands the companies endpoints use, written without thousands separators ("501-1000", not "501-1.000"). Older ICPs may still return 1-2, 3-10, 11-50, 51-200 or 201-500; those can no longer be sent.
                            enum:
                              - 1-10
                              - 11-100
                              - 101-500
                              - 501-1000
                              - 1001-5000
                              - 5001-10000
                              - "10001"
                            example: 11-100
                            type: string
                        required:
                          - search_value
                        type: object
                      minItems: 1
                      type: array
                    industries:
                      description: Industry filters.
                      items:
                        properties:
                          display_value:
                            description: Human-readable label for the industry. Defaults to `search_value` when omitted.
                            example: Software Development
                            type: string
                          negated:
                            default: false
                            description: When true, the filter excludes rather than includes companies in this industry.
                            type: boolean
                          search_value:
                            description: An industry code, e.g. "1594.6.4" for Software Development. This is the same code a company's `industries.industry[].code` returns, and one of those returned by the `Get Industries` endpoint (`GET /v1/industries`).
                            example: 1594.6.4
                            type: string
                        required:
                          - search_value
                        type: object
                      minItems: 1
                      type: array
                    location:
                      description: Location filters.
                      items:
                        properties:
                          display_value:
                            description: Human-readable label for the place. Defaults to `search_value` when omitted.
                            example: United States
                            type: string
                          negated:
                            default: false
                            description: When true, the filter excludes rather than includes companies in this place.
                            type: boolean
                          search_value:
                            description: The place to match, in the form the entry's `type` expects.
                            example: US
                            type: string
                          type:
                            default: country_code
                            description: What kind of place `search_value` names. `country_code` takes an ISO 3166-1 alpha-2 code (e.g. "US"). `continent` takes one of `asia`, `north_america`, `africa`, `europe`, `south_america`, `antarctica`, `australia`. `world_region` takes one of `africa`, `latam`, `emea`, `amer`, `dach`, `apac`.
                            enum:
                              - country_code
                              - continent
                              - world_region
                            example: country_code
                            type: string
                        required:
                          - search_value
                        type: object
                      minItems: 1
                      type: array
                  type: object
                name:
                  description: The human-readable name of the ICP
                  example: US Tech Companies
                  type: string
              type: object
            type:
              const: icp
              description: The type of the object
              example: icp
              type: string
          required:
            - type
            - attributes
          type: object
      required:
        - data
      type: object
    IpAddressExtendedV1:
      properties:
        confidence_score:
          description: The confidence score of the IP address.
          enum:
            - very_high
            - high
            - medium
            - low
          type: string
          x-apidog-enum:
            - description: Indicates highly reliable data based on recent, consistent traffic observations using multiple sources that strongly link the IP address to the specified company. In addition public IP address records verified by our data quality processes.
              name: Very high
              value: very_high
            - description: Indicates reliable identification over a sustained period, with a low margin of error (less than a few percent).
              name: High
              value: high
            - description: Represents IP address connections where the ownership of the IP address has been changing more frequently or where there is a chance of multiple companies sharing the same IP address.
              name: Medium
              value: medium
            - description: Connections with a higher margin of error due to lack of most recent data points. Public data that has not been fully verified through Leadfeeder's data quality processes also receives a low score.
              name: Low
              value: low
        end_ip:
          description: The end IP address of the range. If it is different from the start IP, it resembels an IP range.
          example: 123.123.124.3
          type: string
        location:
          properties:
            city:
              description: The city of the IP address.
              example: Amsterdam
              type:
                - string
                - "null"
            country_code:
              description: The country code of the IP address.
              example: CZ
              type:
                - string
                - "null"
            geonames_id:
              description: The geonames ID of the location.
              example: 4379966
              type:
                - number
                - "null"
            region:
              description: The region of the IP address.
              example: Jihocesky Kraj
              type:
                - string
                - "null"
          type: object
        start_ip:
          description: The start IP address of the range.
          example: 123.123.124.1
          type: string
      type: object
    IpLocationV1:
      properties:
        attributes:
          properties:
            city:
              description: The city name.
              example: Helsinki
              type:
                - string
                - "null"
            country_code:
              description: The ISO 3166-1 alpha-2 country code.
              example: FI
              type: string
            geonames_id:
              description: The GeoNames ID.
              example: "658225"
              type:
                - string
                - "null"
            region:
              description: The region or state name.
              example: Uusimaa
              type:
                - string
                - "null"
          required:
            - city
            - region
            - country_code
            - geonames_id
          type: object
        id:
          description: The unique identifier for the location.
          example: "18570216139_658225"
          type: string
        type:
          const: ip_location
          description: The type of the object
          example: ip_location
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    ListV1:
      properties:
        attributes:
          properties:
            app_url:
              description: Where the list can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/ls/123456/lists/company-lists/123
              format: uri
              type:
                - string
                - "null"
            created_at:
              description: Date and time when the list was created
              example: "2024-12-10T15:57:25Z"
              format: date-time
              type: string
            name:
              description: The human-readable name of the List
              example: US Prospects
              type: string
            scope:
              description: The scope type of the list
              enum:
                - company
                - contact
              example: company
              type: string
            updated_at:
              description: Date and time when the list was updated
              example: "2024-11-24T11:50:00Z"
              format: date-time
              type: string
          required:
            - name
            - scope
            - created_at
          type: object
        id:
          description: The unique identifier for the list
          examples:
            - company_123
            - contact_456
          type: string
        relationships:
          properties:
            created_by:
              properties:
                id:
                  description: The Leadfeeder user ID.
                  example: "12345"
                  type: string
                type:
                  default: user
                  type: string
              required:
                - id
                - type
              type: object
          required:
            - created_by
          type: object
        type:
          const: list
          description: The type of the object
          example: list
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    LocationV1:
      properties:
        attributes:
          properties:
            city:
              description: The city name.
              example: Helsinki
              type: string
            country:
              description: The country name.
              example: Finland
              type: string
            country_code:
              description: The ISO 3166-1 alpha-2 country code.
              example: FI
              type: string
            geonames_id:
              description: The GeoNames ID.
              example: "658225"
              type:
                - string
                - "null"
            region:
              description: The region or state name.
              example: Uusimaa
              type: string
            region_code:
              description: The region code.
              example: FI-18
              type:
                - string
                - "null"
            state_code:
              description: The state code derived from country and region.
              example: FI-18
              type:
                - string
                - "null"
          required:
            - country
            - country_code
            - region
            - region_code
            - city
            - geonames_id
            - state_code
          type: object
        id:
          description: The unique identifier for the location.
          example: 6xeTMh2VfiAzFd86n7GNJ3
          type: string
        type:
          const: location
          description: The type of the object
          example: location
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    MaskedCompanySummaryV1:
      properties:
        attributes:
          properties:
            meta:
              properties:
                do_not_contact:
                  description: This field is set to true when the company does not want to be contacted for advertisement.
                  example: false
                  type: boolean
                has_contacts:
                  description: Indicates if contacts are available for the company.
                  example: false
                  type: boolean
                has_fax:
                  description: Indicates if you will get back a fax number with the full company object.
                  example: false
                  type: boolean
                has_financials_earnings:
                  description: Indicates if you will get back the earnings value with the full company object.
                  example: true
                  type: boolean
                has_financials_net_worth:
                  description: Indicates if you will get back the net worth value with the full company object.
                  example: true
                  type: boolean
                has_financials_revenue:
                  description: Indicates if you will get back the revenue with the full company object.
                  example: true
                  type: boolean
                has_ip_addresses:
                  description: Indicates if the company has IP data available.
                  example: true
                  type: boolean
                has_mail:
                  description: Indicates if you will get back an email address with the full company object.
                  example: true
                  type: boolean
                has_phones:
                  description: Indicates if you will get back a landline or mobile phone number with the full company object.
                  example: true
                  type: boolean
                has_register_id:
                  description: Indicates if you will get back a register id with the full company object.
                  example: true
                  type: boolean
                has_social_accounts:
                  description: Indicates if you will get back one or more social accounts with the full company object.
                  example: true
                  type: boolean
                has_updated_id:
                  description: This field will be true if the ID of that company has changed internally. This can happen for example if two companies are merged together. If you've stored a reference to the company ID in your system you should update it with the most current ID that's sent back in the `id` field.
                  example: false
                  type: boolean
                has_vat_id:
                  description: Indicates if you will get back a vat id with the full company object.
                  example: true
                  type: boolean
              required:
                - do_not_contact
                - has_updated_id
                - has_phones
                - has_fax
                - has_mail
                - has_contacts
                - has_social_accounts
                - has_register_id
                - has_vat_id
                - has_financials_revenue
                - has_financials_earnings
                - has_financials_net_worth
                - has_ip_addresses
              type: object
            name:
              description: The masked legal name of the company
              example: Dea*****************
              type: string
            register:
              properties:
                status:
                  description: The company's status in the commercial register.
                  enum:
                    - active
                    - in_liquidation
                    - out_of_business
                    - non_company
                    - legacy
                    - null
                  example: active
                  type:
                    - string
                    - "null"
              type: object
            role:
              description: This field indicates the role of the company within its group structure.
              enum:
                - single_entity
                - group
                - group_member
                - null
              example: group_member
              type:
                - string
                - "null"
              x-apidog-enum:
                - description: The company is not part of a group.
                  name: Standalone company
                  value: single_entity
                - description: The company is the parent of a group.
                  name: Parent company
                  value: group
                - description: The company is a subsidiary within a company group.
                  name: Subsidiary company
                  value: group_member
          required:
            - name
            - role
            - register
            - meta
          type: object
        id:
          description: The Leadfeeder company ID.
          example: "129011"
          type: string
        relationships:
          properties:
            group_company:
              description: The group company head. The field may be null if the company is a single entity.
              oneOf:
                - additionalProperties: false
                  description: The group company head. The field may be null if the company is a single entity.
                  properties:
                    id:
                      description: The Leadfeeder company ID.
                      example: "129011"
                      type: string
                    type:
                      const: company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - type: "null"
          required:
            - group_company
          type: object
        type:
          const: masked_company_summary
          description: The type of the object
          example: masked_company_summary
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    MaskedContactSummaryV1:
      properties:
        attributes:
          properties:
            full_name:
              example: Joh******
              type: string
            gender:
              description: The contact's gender.
              enum:
                - male
                - female
                - other
                - null
              example: male
              type:
                - string
                - "null"
            hierarchy_level:
              description: The hierarchy level the contact has in the company.
              enum:
                - employees
                - top_management
                - middle_management
                - null
              example: employees
              type:
                - string
                - "null"
            meta:
              properties:
                has_mail:
                  description: Indicates if you will get back an email address with the full contact object.
                  example: true
                  type: boolean
                has_phones:
                  description: Indicates if you will get back a landline or mobile phone number with the full contact object.
                  example: true
                  type: boolean
                has_social_accounts:
                  description: Indicates if you will get back one or more social accounts with the full contact object.
                  example: true
                  type: boolean
              type: object
            position:
              description: Information about the contact's position within the company.
              properties:
                language_code:
                  description: A two digit language code indicating the language of the original job title according to ISO 639-1 (see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)
                  example: DE
                  type:
                    - string
                    - "null"
                title:
                  description: The contact's job title.
                  example: Geschäftsführer
                  type:
                    - string
                    - "null"
              type:
                - object
                - "null"
          required:
            - full_name
            - gender
            - hierarchy_level
            - meta
            - position
          type: object
        id:
          description: The Leadfeeder contact ID.
          example: "435834"
          type: string
        relationships:
          properties:
            company:
              properties:
                id:
                  description: The Leadfeeder company ID.
                  example: "129011"
                  type: string
                type:
                  const: company_summary
                  type: string
              required:
                - id
                - type
              type: object
          required:
            - company
          type: object
        type:
          const: masked_contact_summary
          description: The type of the object
          example: masked_contact_summary
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    NetworkV1:
      properties:
        attributes:
          properties:
            name:
              description: The network name
              example: NTT Docomo Business, Inc.
              type: string
          required:
            - name
          type: object
        id:
          description: The network's IP address
          example: 180.22.205.1
          type: string
        type:
          const: network
          description: The type of the object
          example: network
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    PurchaseLinkV1:
      properties:
        attributes:
          properties:
            billing_interval_months:
              description: The preselected months between charges.
              enum:
                - 1
                - 12
              example: 12
              type: integer
            expires_at:
              description: When the link expires, 7 days after it was created. An expired link still opens the purchase page, with nothing preselected.
              example: "2026-11-03T10:15:00Z"
              format: date-time
              type: string
            initial_contract_term_months:
              description: The preselected length of the first contract term in months.
              enum:
                - 1
                - 12
              example: 12
              type: integer
            payment_method:
              description: The preselected payment method.
              enum:
                - credit_card
                - invoiced
              example: invoiced
              type: string
              x-apidog-enum:
                - description: Paid by credit card
                  value: credit_card
                - description: Paid by invoice
                  value: invoiced
            product_feature:
              description: The preselected product's `feature`. `null` when no product is preselected.
              example: leadfeeder_activate
              type:
                - string
                - "null"
            tier_id:
              description: The preselected tier's `id`. `null` when no tier is preselected.
              example: "1000_1000"
              type:
                - string
                - "null"
            url:
              description: The link to the account's purchase page in the Leadfeeder app, where a user who can manage billing completes the purchase.
              example: https://app.leadfeeder.com/f/settings/purchase/123456?purchaseLink=pl_Zk3m9QxT2vR8wLbN
              format: uri
              type: string
          required:
            - url
            - expires_at
            - product_feature
            - tier_id
            - billing_interval_months
            - initial_contract_term_months
            - payment_method
          type: object
        id:
          description: The link's token.
          example: pl_Zk3m9QxT2vR8wLbN
          type: string
        type:
          const: purchase_link
          description: The type of the object
          example: purchase_link
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    PurchaseOptionsV1:
      properties:
        attributes:
          properties:
            currency:
              description: The currency of every `price_without_vat` in the response, as an uppercase ISO 4217 code, based on the account's country. `null` when the account can't buy anything.
              example: EUR
              type:
                - string
                - "null"
            disallow_reason:
              allOf:
                - properties:
                    title:
                      description: Why it can't be bought, as a sentence to show the user as is.
                      example: Leadfeeder Discover needs the tracker installed on your website.
                      type: string
                  required:
                    - title
                  type:
                    - object
                    - "null"
              description: "Why the account can't buy any product in the Leadfeeder app: for example, it has an ongoing subscription, its tracker hasn't collected enough data yet, or its traffic exceeds every plan. `null` when it can."
            products:
              description: The products offered to the account. Empty when the account can't buy anything.
              items:
                properties:
                  billing_options:
                    description: How the product can be billed.
                    items:
                      properties:
                        billing_interval_months:
                          description: Months between charges.
                          enum:
                            - 1
                            - 12
                          example: 12
                          type: integer
                        credits_reset_interval_months:
                          description: Months between credit resets. `null` for products without credits.
                          enum:
                            - 1
                            - 12
                            - null
                          example: 12
                          type:
                            - integer
                            - "null"
                        initial_contract_term_months:
                          description: Length of the first contract term in months.
                          enum:
                            - 1
                            - 12
                          example: 12
                          type: integer
                        payment_methods:
                          description: How this billing option can be paid.
                          example:
                            - credit_card
                            - invoiced
                          items:
                            enum:
                              - credit_card
                              - invoiced
                            type: string
                            x-apidog-enum:
                              - description: Paid by credit card
                                value: credit_card
                              - description: Paid by invoice
                                value: invoiced
                          type: array
                        tiers:
                          description: The tiers.
                          items:
                            properties:
                              credits_per_reset_interval:
                                description: Credits granted every `credits_reset_interval_months`, so annual tiers carry 12 months of credits. `null` for products without credits.
                                example: 6000
                                type:
                                  - integer
                                  - "null"
                              id:
                                description: The tier's ID, unique within the billing option.
                                example: "1000_500"
                                type: string
                              leads_per_month:
                                description: "The leads limit: the maximum number of leads that can be identified per month."
                                example: 1000
                                type: integer
                              price_without_vat:
                                description: The price per billing interval, excluding VAT, in `currency`.
                                example: 5028
                                type: number
                            required:
                              - id
                              - leads_per_month
                              - credits_per_reset_interval
                              - price_without_vat
                            type: object
                          type: array
                      required:
                        - billing_interval_months
                        - initial_contract_term_months
                        - credits_reset_interval_months
                        - payment_methods
                        - tiers
                      type: object
                    type: array
                  description:
                    description: What the product is for, in one sentence.
                    example: Prioritize the accounts showing buying intent.
                    type: string
                  disallow_reason:
                    allOf:
                      - properties:
                          title:
                            description: Why it can't be bought, as a sentence to show the user as is.
                            example: Leadfeeder Discover needs the tracker installed on your website.
                            type: string
                        required:
                          - title
                        type:
                          - object
                          - "null"
                    description: Why the account can't buy this product. `null` when it can.
                  feature:
                    description: The product's unique identifier, for example `leadfeeder_activate`.
                    example: leadfeeder_activate
                    type: string
                  highlights:
                    description: What the product includes.
                    example:
                      - Everything in Discover
                      - Advanced search filters
                    items:
                      type: string
                    type: array
                  name:
                    description: The product's name.
                    example: Leadfeeder Activate
                    type: string
                  recommended:
                    description: Whether this is the product to suggest. True for at most one product, and never for a product with a `disallow_reason`.
                    example: true
                    type: boolean
                required:
                  - feature
                  - name
                  - description
                  - highlights
                  - disallow_reason
                  - recommended
                  - billing_options
                type: object
              type: array
            start_date:
              description: "When a subscription bought now would start: today when the account only has trials, otherwise the day after its current subscription ends. `null` when the account can't buy anything."
              example: "2026-10-05"
              format: date
              type:
                - string
                - "null"
          required:
            - disallow_reason
            - start_date
            - currency
            - products
          type: object
        id:
          description: The ID of the purchase options.
          example: "123456"
          type: string
        relationships:
          properties:
            account:
              allOf:
                - additionalProperties: false
                  properties:
                    id:
                      description: The account ID.
                      example: "123456"
                      type: string
                    type:
                      const: account
                      type: string
                  required:
                    - id
                    - type
                  type: object
              description: The account the purchase options are for.
          required:
            - account
          type: object
        type:
          const: purchase_options
          description: The type of the object
          example: purchase_options
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    SignalV1:
      properties:
        attributes:
          properties:
            category:
              description: Categories to group similar signals together
              enum:
                - business_expansion
                - competitive_landscape
                - event_participation
                - industry_recognition
                - leadership_changes
                - mergers_and_acquisitions
                - customer_acquisition
                - investment_activity
                - product_and_service_development
                - partnerships_collaborations
                - job_ads
                - regulatory_and_compliance_updates
                - employee_count_changes
                - revenue_changes
              example: business_expansion
              type: string
              x-apidog-enum:
                - description: Events that indicate the company's physical and operational growth through new office locations, facility upgrades, or increases in headcount, signalling expansion into new markets.
                  name: Business Expansion
                  value: business_expansion
                - description: Events that reflect the competitive environment in which the company operates, including the identification of new or existing rivals that may influence strategic positioning.
                  name: Competitive Landscape
                  value: competitive_landscape
                - description: Events capturing the company's active involvement in industry gatherings—such as trade shows, conferences, or exhibitions—to boost brand visibility and create networking opportunities.
                  name: Event Participation
                  value: event_participation
                - description: Events where the company or its representatives receive formal accolades or awards, underscoring excellence and leadership within their industry.
                  name: Industry Recognition
                  value: industry_recognition
                - description: Events that document shifts in the company's leadership structure, including new hires, promotions, departures, or retirements of key executives.
                  name: Leadership Changes
                  value: leadership_changes
                - description: Events involving major corporate restructuring such as mergers, acquisitions, or asset sales that can fundamentally change the company's strategic direction.
                  name: Mergers and Acquisitions
                  value: mergers_and_acquisitions
                - description: Events that demonstrate the company's success in expanding its client base through signing new clients or securing major contracts.
                  name: Customer Acquisition
                  value: customer_acquisition
                - description: Events where the company invests resources in external opportunities—either by investing in other companies or assets, or by securing external financing—to drive growth.
                  name: Investment Activity
                  value: investment_activity
                - description: Events showcasing the company's commitment to innovation, including the development of new products, enhancements to existing offerings, or integration of new services.
                  name: Product and Service Development
                  value: product_and_service_development
                - description: Events where the company forms strategic alliances or partnerships with other organisations to leverage shared resources and expand market reach.
                  name: Partnerships and Collaborations
                  value: partnerships_collaborations
                - description: Events that capture the posting of job openings by a company, reflecting hiring initiatives, workforce expansion, or strategic talent acquisition efforts across various departments and roles.
                  name: Job Ads
                  value: job_ads
                - description: Events that indicate changes, announcements, or actions related to a company's adherence to legal, regulatory, or industry standards, including new filings, certifications, audits, or compliance measures that impact operational and strategic practices.
                  name: Regulatory and Compliance Updates
                  value: regulatory_and_compliance_updates
                - description: Events that report a change in the company's employee count between two sets of annual figures, such as a year-on-year increase in headcount.
                  name: Employee Count Changes
                  value: employee_count_changes
                - description: Events that report a change in the company's revenue between two sets of annual figures, such as a year-on-year increase in turnover.
                  name: Revenue Changes
                  value: revenue_changes
            content:
              description: Extended text content of the signal
              example: B2B sales intelligence platform Dealfront has raised a €30 million investment from AshGrove Capital...
              type: string
            event_date:
              description: Date and time when the event occurred
              example: "2024-12-10T15:57:25Z"
              format: date-time
              type: string
            language_code:
              description: Language code of the signal content
              example: EN
              type: string
            publication_date:
              description: Date and time when the signal was published
              example: "2024-11-24T11:50:00Z"
              format: date-time
              type: string
            signal_type:
              description: Specific type of the signal
              example: expands_facilities
              type: string
            source_url:
              description: URL of the source where the signal was found. `null` when the signal has no source page, as for the `employee_count_changes` and `revenue_changes` categories, which are derived from Leadfeeder's own company data.
              example: https://tech.eu/2024/12/10/dealfront-secures-30m-from-ashgrove-capital-for-b2b-sales-intelligence
              format: uri
              type:
                - string
                - "null"
            title:
              description: Title of the signal
              example: TS Conductor invests $134M in South Carolina for new manufacturing facility
              type: string
          required:
            - category
            - signal_type
            - title
            - content
            - event_date
            - publication_date
          type: object
        id:
          example: "574654454"
          type: string
        relationships:
          properties:
            company:
              additionalProperties: false
              properties:
                id:
                  description: The Leadfeeder company ID.
                  example: "129011"
                  type: string
                type:
                  const: company
                  type: string
              required:
                - id
                - type
              type: object
          required:
            - company
          type: object
        type:
          const: signal
          description: The type of the object
          example: signal
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    SubscriptionV1:
      properties:
        attributes:
          additionalProperties: false
          properties:
            billing_interval_months:
              description: Months between charges. `null` when `subscription_type` isn't `invoiced` or `credit_card`.
              example: 12
              type:
                - integer
                - "null"
            credits_reset_interval_months:
              description: How often the credits get reset, in months. `null` when the subscription doesn't support credits or they don't get reset.
              example: 12
              type:
                - integer
                - "null"
            days_remaining:
              description: "Days from today in UTC until `end_date`: `0` on the last day. `null` when the subscription has no end date."
              example: null
              minimum: 0
              type:
                - integer
                - "null"
            end_date:
              description: The subscription ends after this date. `null` when it has no end date.
              example: null
              format: date
              type:
                - string
                - "null"
            initial_contract_term_months:
              description: Length of the first contract term in months. `null` when `subscription_type` isn't `invoiced` or `credit_card`.
              example: 12
              type:
                - integer
                - "null"
            next_billing_date:
              description: The date of the next charge. `null` when none is scheduled.
              example: "2027-03-01"
              format: date
              type:
                - string
                - "null"
            price:
              additionalProperties: false
              description: The price charged every billing interval. `null` when `subscription_type` isn't `invoiced` or `credit_card`.
              properties:
                currency:
                  description: The currency of `total` and `vat`, as an uppercase ISO 4217 code.
                  example: EUR
                  type: string
                total:
                  description: The total charged every billing interval, after discounts and including add-ons and VAT, in `currency`.
                  example: 8553.72
                  type: number
                vat:
                  description: The VAT included in `total`, in `currency`. `0` when no VAT applies.
                  example: 1365.72
                  type: number
              required:
                - total
                - vat
                - currency
              type:
                - object
                - "null"
            products:
              description: The products on the subscription.
              items:
                additionalProperties: false
                properties:
                  credits_per_reset_interval:
                    description: Credits granted every `credits_reset_interval_months`. `null` for products without credits.
                    example: 12000
                    type:
                      - integer
                      - "null"
                  feature:
                    description: The product's unique identifier, for example `leadfeeder_activate`.
                    example: leadfeeder_scale
                    type: string
                  leads_per_month:
                    description: "The leads limit: the maximum number of leads that can be identified per month. `null` for products without this limit."
                    example: 2000
                    type:
                      - integer
                      - "null"
                  name:
                    description: The product's name.
                    example: Leadfeeder Scale
                    type: string
                required:
                  - feature
                  - name
                  - leads_per_month
                  - credits_per_reset_interval
                type: object
              type: array
            start_date:
              description: The subscription's first day.
              example: "2026-03-01"
              format: date
              type: string
            status:
              description: "Where the subscription is in its lifecycle: `pending` before it starts, `active` while it runs, `past_due` when a payment is overdue, and `canceled` when it was canceled but runs until `end_date`."
              enum:
                - pending
                - active
                - past_due
                - canceled
              example: active
              type: string
              x-apidog-enum:
                - description: Starts in the future
                  value: pending
                - description: Running
                  value: active
                - description: A payment is overdue
                  value: past_due
                - description: Canceled, runs until its end date
                  value: canceled
            subscription_type:
              description: "How the subscription is paid for: `trial` for a free trial, `credit_card` by credit card, and `invoiced` by invoice. `null` when the API doesn't expose the subscription's type."
              enum:
                - trial
                - credit_card
                - invoiced
                - null
              example: invoiced
              type:
                - string
                - "null"
              x-apidog-enum:
                - description: A free trial
                  value: trial
                - description: Paid by credit card
                  value: credit_card
                - description: Paid by invoice
                  value: invoiced
          required:
            - status
            - subscription_type
            - products
            - billing_interval_months
            - initial_contract_term_months
            - credits_reset_interval_months
            - price
            - start_date
            - end_date
            - next_billing_date
            - days_remaining
          type: object
        id:
          description: The subscription ID.
          example: INV_e5f6g7h8
          type: string
        type:
          const: subscription
          description: The type of the object
          example: subscription
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    TagV1:
      properties:
        attributes:
          properties:
            color:
              description: List of supported color codes
              enum:
                - 0
                - 1
                - 2
                - 3
                - 4
                - 5
                - 6
                - 7
                - 8
                - 9
              type: integer
              x-apidog-enum:
                - name: "#1B70F0"
                  value: 0
                - name: "#08A360"
                  value: 1
                - name: "#AE540D"
                  value: 2
                - name: "#D42422"
                  value: 3
                - name: "#5A219B"
                  value: 4
                - name: "#073572"
                  value: 5
                - name: "#00838F"
                  value: 6
                - name: "#D42422"
                  value: 7
                - name: "#B61A5C"
                  value: 8
                - name: "#4C3AED"
                  value: 9
            created_at:
              description: Date and time when the tag was created
              example: "2024-12-10T15:57:25Z"
              format: date-time
              type: string
            name:
              description: The human-readable name of the tag
              example: Prospects
              type: string
            updated_at:
              description: Date and time when the tag was updated
              example: "2024-11-24T11:50:00Z"
              format: date-time
              type: string
          required:
            - name
            - color
            - created_at
            - updated_at
          type: object
          x-apidog-orders:
            - name
            - color
            - created_at
            - updated_at
        id:
          description: The unique identifier for the tag
          examples:
            - 4b7e2c9f
          type: string
        relationships:
          properties:
            created_by:
              properties:
                id:
                  description: The Leadfeeder user ID.
                  example: "12345"
                  type: string
                type:
                  default: user
                  type: string
              required:
                - id
                - type
              type: object
          required:
            - created_by
          type: object
        type:
          const: tag
          description: The type of the object
          example: tag
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    UserV1:
      properties:
        attributes:
          properties:
            country_code:
              description: This field indicates the country supported for Leadfeeder operations and requires a two letter country code according to ISO 3166 Alpha-2 (see [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)).
              example: DE
              type:
                - string
                - "null"
            email:
              description: A standard e-mail address.
              example: info@leadfeeder.com
              type: string
            first_name:
              description: The user's first name.
              example: Jane
              type:
                - string
                - "null"
            last_name:
              description: The user's last name.
              example: Smith
              type:
                - string
                - "null"
            phone_number:
              description: E.164 representation of a phone number.
              example: +49 721 50057501
              type: string
            team_role:
              description: The role the user has within their team in Leadfeeder.
              example: admin
              type:
                - string
                - "null"
          required:
            - email
            - first_name
            - last_name
            - phone_number
            - country_code
            - team_role
          type: object
        id:
          description: The user ID.
          example: "123456"
          type: string
        type:
          const: user
          description: The type of the object.
          example: user
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    VisitLocationV1:
      properties:
        attributes:
          properties:
            city:
              description: The city name.
              example: Helsinki
              type: string
            country:
              description: The country name.
              example: Finland
              type: string
            country_code:
              description: The ISO 3166-1 alpha-2 country code.
              example: FI
              type: string
            geonames_id:
              description: The GeoNames ID.
              example: "658225"
              type:
                - string
                - "null"
            postal_code:
              description: The postal code.
              type: string
            region:
              description: The region or state name.
              example: Uusimaa
              type: string
          required:
            - country
            - country_code
            - region
            - city
            - geonames_id
            - postal_code
          type: object
        id:
          description: The unique identifier for the location.
          example: 6xeTMh2VfiAzFd86n7GNJ3
          type: string
        type:
          const: visit_location
          description: The type of the object
          example: visit_location
          type: string
      required:
        - type
        - id
        - attributes
      type: object
    WebVisitV1:
      properties:
        attributes:
          properties:
            app_url:
              description: Where the visiting company's lead in the All companies feed can be opened in Leadfeeder, so it can be linked to directly instead of the URL being assembled from the `id`.
              example: https://app.leadfeeder.com/f/123456/feed/all-companies/lead/5b4f313e-46de-11e8-b981-05bebed8e58b_1d2c3b4a-5e6f-7a8b-9c0d-1e2f3a4b5c6d
              format: uri
              type:
                - string
                - "null"
            campaign:
              description: Value of the utm_campaign or name of AdWords campaign.
              example: HomePage Split
              type:
                - string
                - "null"
            device_type:
              description: Identified device type.
              example: smartphone
              type:
                - string
                - "null"
            engagements:
              description: "The list of engagement events recorded during the visit. Each item represents one of: page view, form submit, file download, or video view."
              items:
                oneOf:
                  - allOf:
                      - properties:
                          has_met_goals:
                            description: Whether any conversion goals were met on this page.
                            example: false
                            type: boolean
                          hostname:
                            description: Hostname of the visited page.
                            example: www.leadfeeder.com
                            type: string
                          id:
                            description: Unique identifier of the engagement
                            example: b4ebc08c-8c1f-11f1-9b9e-633b755451a0_0
                            type: string
                          page:
                            properties:
                              path:
                                description: Path part of the visited page URL.
                                example: /pricing/
                                type: string
                              title:
                                description: Title of the visited page.
                                example: Pricing for all stages of growth
                                type: string
                              url:
                                description: Complete URL of the visited page.
                                example: http://www.leadfeeder.com/pricing/
                                type: string
                            required:
                              - path
                              - title
                              - url
                            type: object
                          previous_page_path:
                            description: Path of the previous visited page.
                            example: (entrance)
                            type: string
                          time:
                            description: "Date and time at which the engagement took place. Format: '%Y-%m-%dT%T%:z'"
                            example: "2026-07-29T05:00:00+02:00"
                            type: string
                        required:
                          - id
                          - time
                          - hostname
                          - page
                          - previous_page_path
                          - has_met_goals
                        type: object
                      - properties:
                          event_type:
                            default: page-view
                            type: string
                          time_on_page:
                            description: Time spent on page in seconds.
                            example: 22
                            type: integer
                        required:
                          - event_type
                        type: object
                    title: page-view
                  - allOf:
                      - properties:
                          has_met_goals:
                            description: Whether any conversion goals were met on this page.
                            example: false
                            type: boolean
                          hostname:
                            description: Hostname of the visited page.
                            example: www.leadfeeder.com
                            type: string
                          id:
                            description: Unique identifier of the engagement
                            example: b4ebc08c-8c1f-11f1-9b9e-633b755451a0_0
                            type: string
                          page:
                            properties:
                              path:
                                description: Path part of the visited page URL.
                                example: /pricing/
                                type: string
                              title:
                                description: Title of the visited page.
                                example: Pricing for all stages of growth
                                type: string
                              url:
                                description: Complete URL of the visited page.
                                example: http://www.leadfeeder.com/pricing/
                                type: string
                            required:
                              - path
                              - title
                              - url
                            type: object
                          previous_page_path:
                            description: Path of the previous visited page.
                            example: (entrance)
                            type: string
                          time:
                            description: "Date and time at which the engagement took place. Format: '%Y-%m-%dT%T%:z'"
                            example: "2026-07-29T05:00:00+02:00"
                            type: string
                        required:
                          - id
                          - time
                          - hostname
                          - page
                          - previous_page_path
                          - has_met_goals
                        type: object
                      - properties:
                          event_type:
                            default: form-submit
                            type: string
                          form:
                            description: Form details.
                            properties:
                              action:
                                description: The form action URL.
                                example: /submit
                                type:
                                  - string
                                  - "null"
                              class:
                                description: The HTML class attribute of the form.
                                example: lead-form
                                type:
                                  - string
                                  - "null"
                              id:
                                description: The HTML id attribute of the form.
                                example: contact-form
                                type:
                                  - string
                                  - "null"
                              inputs:
                                description: Submitted form input values.
                                items:
                                  properties:
                                    name:
                                      description: The input field name.
                                      example: email
                                      type:
                                        - string
                                        - "null"
                                    type:
                                      description: The HTML input type.
                                      example: email
                                      type: string
                                    value:
                                      description: The submitted value.
                                      example: user@example.com
                                      type: string
                                  type: object
                                type: array
                            type: object
                        required:
                          - event_type
                          - form
                        type: object
                    title: form-submit
                  - allOf:
                      - properties:
                          has_met_goals:
                            description: Whether any conversion goals were met on this page.
                            example: false
                            type: boolean
                          hostname:
                            description: Hostname of the visited page.
                            example: www.leadfeeder.com
                            type: string
                          id:
                            description: Unique identifier of the engagement
                            example: b4ebc08c-8c1f-11f1-9b9e-633b755451a0_0
                            type: string
                          page:
                            properties:
                              path:
                                description: Path part of the visited page URL.
                                example: /pricing/
                                type: string
                              title:
                                description: Title of the visited page.
                                example: Pricing for all stages of growth
                                type: string
                              url:
                                description: Complete URL of the visited page.
                                example: http://www.leadfeeder.com/pricing/
                                type: string
                            required:
                              - path
                              - title
                              - url
                            type: object
                          previous_page_path:
                            description: Path of the previous visited page.
                            example: (entrance)
                            type: string
                          time:
                            description: "Date and time at which the engagement took place. Format: '%Y-%m-%dT%T%:z'"
                            example: "2026-07-29T05:00:00+02:00"
                            type: string
                        required:
                          - id
                          - time
                          - hostname
                          - page
                          - previous_page_path
                          - has_met_goals
                        type: object
                      - properties:
                          event_type:
                            default: file-download
                            type: string
                          file:
                            description: File details.
                            properties:
                              name:
                                description: The name of the downloaded file.
                                example: product-brochure.pdf
                                type:
                                  - string
                                  - "null"
                            type: object
                        required:
                          - event_type
                          - file
                        type: object
                    title: file-download
                  - allOf:
                      - properties:
                          has_met_goals:
                            description: Whether any conversion goals were met on this page.
                            example: false
                            type: boolean
                          hostname:
                            description: Hostname of the visited page.
                            example: www.leadfeeder.com
                            type: string
                          id:
                            description: Unique identifier of the engagement
                            example: b4ebc08c-8c1f-11f1-9b9e-633b755451a0_0
                            type: string
                          page:
                            properties:
                              path:
                                description: Path part of the visited page URL.
                                example: /pricing/
                                type: string
                              title:
                                description: Title of the visited page.
                                example: Pricing for all stages of growth
                                type: string
                              url:
                                description: Complete URL of the visited page.
                                example: http://www.leadfeeder.com/pricing/
                                type: string
                            required:
                              - path
                              - title
                              - url
                            type: object
                          previous_page_path:
                            description: Path of the previous visited page.
                            example: (entrance)
                            type: string
                          time:
                            description: "Date and time at which the engagement took place. Format: '%Y-%m-%dT%T%:z'"
                            example: "2026-07-29T05:00:00+02:00"
                            type: string
                        required:
                          - id
                          - time
                          - hostname
                          - page
                          - previous_page_path
                          - has_met_goals
                        type: object
                      - properties:
                          event_type:
                            default: video-view
                            type: string
                          video:
                            description: Video details.
                            properties:
                              title:
                                description: The title of the video.
                                example: Product Demo
                                type:
                                  - string
                                  - "null"
                              url:
                                description: The URL of the video.
                                example: https://www.youtube.com/watch?v=abc123
                                type: string
                            type: object
                        required:
                          - event_type
                          - video
                        type: object
                    title: video-view
              type: array
            identifiers:
              properties:
                adobe_cookies:
                  description: Visitor's Adobe cookies (MCMID, MCAAMB, MCAAMLH).
                  example:
                    - MCAAMB: RKh123Vc5
                      MCAAMLH: "6"
                      MCMID: "681245"
                  items:
                    additionalProperties: true
                    type: object
                  type: array
                ga_client_ids:
                  description: Visitor IDs as seen by Google Analytics.
                  example:
                    - "5829104736.1742616961"
                  items:
                    type: string
                  type: array
                lf_client_id:
                  description: Visitor's ID as seen by Leadfeeder.
                  example: LF1.1.a3f8b2d1e4c90123.1742597607000
                  type: string
              required:
                - lf_client_id
                - ga_client_ids
                - adobe_cookies
              type: object
            keyword:
              description: Referrer keyword (search engine search phrase).
              example: website leads
              type:
                - string
                - "null"
            landing_page_path:
              description: Path of the first page the visitor viewed.
              example: /home
              type: string
            medium:
              description: Referrer traffic medium (e.g. cpc).
              example: cpc
              type:
                - string
                - "null"
            page_depth:
              description: Number of page views the visit contains.
              example: 4
              type: integer
            referring_url:
              description: Referrer URL.
              example: https://www.google.com/search?q=dealfront
              type:
                - string
                - "null"
            source:
              description: Referrer traffic source (e.g. facebook).
              example: google
              type: string
            started_at:
              description: Datetime when the visit happened, rounded to minutes.
              example: "2026-01-15T10:30:00.000Z"
              format: date-time
              type: string
            visit_length:
              description: Duration of the visit in seconds.
              example: 80
              type: integer
            visitor:
              properties:
                email:
                  description: Email address of the identified visitor.
                  example: john.doe@example.com
                  type:
                    - string
                    - "null"
                first_name:
                  description: First name of the identified visitor.
                  example: John
                  type:
                    - string
                    - "null"
                last_name:
                  description: Last name of the identified visitor.
                  example: Doe
                  type:
                    - string
                    - "null"
              required:
                - email
                - first_name
                - last_name
              type: object
          required:
            - started_at
            - source
            - medium
            - campaign
            - referring_url
            - keyword
            - landing_page_path
            - page_depth
            - visit_length
            - device_type
            - identifiers
            - visitor
            - engagements
          type: object
        id:
          description: The unique identifier for the web visit.
          example: 5b4f313e-46de-11e8-b981-05bebed8e58b
          type: string
        relationships:
          properties:
            company:
              description: The company the contact is associated with. By default this field only contains the `id` and `type` fields, but you can load all company attributes by passing the `include=company` url parameter.
              oneOf:
                - additionalProperties: false
                  properties:
                    id:
                      description: The Leadfeeder company ID.
                      example: "129011"
                      type: string
                    type:
                      const: company
                      type: string
                  required:
                    - id
                    - type
                  type: object
                - $ref: "#/components/schemas/CompanyV1"
            location:
              $ref: "#/components/schemas/VisitLocationV1"
              description: The location inferred from the visitor's IP address. Always included in the response.
          required:
            - location
            - company
          type: object
        type:
          const: web_visit
          description: The type of the object
          example: web_visit
          type: string
      required:
        - type
        - id
        - attributes
        - relationships
      type: object
    WebVisitsTrackerScriptV1:
      properties:
        attributes:
          properties:
            data_processed:
              description: When tracking data for this account was first and last processed into website visits. Processing runs behind event collection, so `last_at` is normally a little older than `last_event_received_at`.
              properties:
                first_at:
                  description: When the first tracking data was processed, in UTC. `null` if no data has ever been processed for this account.
                  example: "2026-07-18T04:22:07Z"
                  format: date-time
                  type:
                    - string
                    - "null"
                last_at:
                  description: When the most recent tracking data was processed, in UTC. `null` if no data has ever been processed for this account.
                  example: "2026-08-17T09:35:00Z"
                  format: date-time
                  type:
                    - string
                    - "null"
              required:
                - first_at
                - last_at
              type: object
            last_event_received_at:
              description: Timestamp of the most recent tracking event received for this account, in UTC. This is the value `status` is derived from. `null` when no event timestamp is known, which normally means `status` is `never_received_data`.
              example: "2026-08-17T09:41:12Z"
              format: date-time
              type:
                - string
                - "null"
            script:
              properties:
                hash:
                  description: The unique script hash used to identify the tracker.
                  example: a1b2c3d4e5f6
                  type: string
                html:
                  description: The HTML code for the tracking script to be inserted in all webpages to be tracked.
                  example: <script>(function(ss,ex){ window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; (function(d,s){ fs=d.getElementsByTagName(s)[0]; function ce(src){ var cs=d.createElement(s); cs.src=src; cs.async=1; fs.parentNode.insertBefore(cs,fs); }; ce('https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js'); })(document,'script'); })('a1b2c3d4e5f6');</script>
                  type: string
              required:
                - hash
                - html
              type: object
            status:
              description: Whether the tracking script is currently sending events for this account. Derived from `last_event_received_at` against a 48 hour threshold.
              enum:
                - receiving_data
                - stopped_receiving
                - never_received_data
              example: receiving_data
              type: string
              x-apidog-enum:
                - description: An event was received within the last 48 hours. The script is installed and reporting.
                  value: receiving_data
                - description: Events were received in the past, but none within the last 48 hours. Check that the script is still present on the site, that the tracked hostnames have not changed, and that a consent banner is not blocking it.
                  value: stopped_receiving
                - description: No event has ever been received. The script has not been installed yet, or it is installed incorrectly. Re-copy the snippet from `script.html`.
                  value: never_received_data
            timezone:
              description: The timezone for the script (e.g., "Europe/Helsinki", "America/New_York"). `null` when no timezone has been set.
              example: Europe/Helsinki
              type:
                - string
                - "null"
            visiting_companies:
              description: Counts of companies identified from this account's website traffic. Both figures stop moving while the tracker is not reporting, so read them alongside `status`.
              properties:
                last_30_days:
                  description: Companies identified in the last 30 days. Recalculated at most once every 45 minutes, and only after new tracking data arrives.
                  example: 128
                  type: integer
                monthly_average:
                  description: Average number of companies identified per month over the period this account has been tracking. Recalculated on the first of each month for established accounts, and daily for accounts that have been tracking for less than three months. `null` for accounts that have never received tracking data.
                  example: 140
                  type:
                    - integer
                    - "null"
              required:
                - last_30_days
                - monthly_average
              type: object
          required:
            - timezone
            - script
            - status
            - last_event_received_at
            - data_processed
            - visiting_companies
          type: object
        id:
          description: The unique identifier for the tracker script. This is the script record's identifier, not the script hash — see `script.hash` for that.
          example: "123456"
          type: string
        type:
          const: web_visits_tracker_script
          description: The type of the object
          example: web_visits_tracker_script
          type: string
      required:
        - type
        - id
        - attributes
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Authenticate with a personal API key passed in the `X-Api-Key` header. API keys are scoped to their owner's accounts and are **not** subject to OAuth scope checks.
      in: header
      name: X-Api-Key
      type: apiKey
    OAuth2:
      description: Authenticate with an OAuth2 access token issued to an OAuth application. Unlike API keys, OAuth tokens are limited to the scopes granted to the application and approved by the user. Each endpoint documents the scope it requires (if any) under its security requirements.
      flows:
        authorizationCode:
          authorizationUrl: https://api.leadfeeder.com/v1/oauth/authorize
          scopes:
            accounts:read: See account information and the remaining credit balance.
            accounts:write: Manage account settings, such as data processing preferences.
            buyer_personas:read: See the account's buyer personas.
            buyer_personas:write: Create the account's buyer personas.
            campaigns:read: See campaigns and their performance statistics.
            campaigns:write: Update existing campaigns.
            companies:read: See company data, profiles, firmographics, and web visit matches.
            companies:write: Add companies to lists, apply tags, and run enrichment jobs. Cannot create or delete companies.
            contacts:read: See contact data and profiles, including personal details such as names and email addresses.
            contacts:write: Add or remove contacts from lists and run contact-data enrichment. Cannot create or delete contacts.
            crm_records:read: See CRM connection and matching data linked to companies or contacts.
            crm_records:write: Export records to the connected CRM, manage CRM connections, and trigger enrichment.
            custom_fields:read: See custom field definitions and their values.
            custom_fields:write: Create, update, and delete custom field definitions.
            icps:read: See the account's Ideal Customer Profiles (ICPs).
            icps:write: Create the account's Ideal Customer Profiles (ICPs).
            ip:read: Resolve and enrich IP addresses to company data.
            lists:read: See lists and the companies and contacts in them.
            lists:write: Create, rename, and delete lists.
            tags:read: See all tags that can be assigned on companies.
            tags:write: Create, update, and delete tags.
            usage:read: See API usage statistics for the account.
            users:read: See the users on the account and their granted permissions.
            users:write: Invite users, update their permissions, and revoke their access to the account.
            web_visits:read: See website visitor activity, tracker data, custom feeds, and goals.
            web_visits:write: Create, update, and delete custom feeds and goals. Goals only tag matching page views; recorded visits are not otherwise changed.
            workflows:read: See the account's workflows, and the triggers and actions they can be built from.
            workflows:write: Create and update workflows, including turning them on and off.
          tokenUrl: https://api.leadfeeder.com/v1/oauth/token
      type: oauth2
externalDocs:
  description: Official API documentation
  url: https://docs.leadfeeder.com/api/public
info:
  description: This specification is work in progress. The 'summary' field contains information on the implementation status of an endpoint.
  license:
    name: mit
    url: https://opensource.org/licenses/MIT
  termsOfService: https://www.leadfeeder.com/terms-and-conditions/
  title: Leadfeeder Public API
  version: "2026-11-17T09:27:50Z"
openapi: 3.1.1
paths:
  /v1/accounts:
    get:
      description: |-
        Retrieves a list of Leadfeeder accounts associated with this API key. Without `account_id`, all accounts are listed without their credit details. With `account_id`, only that account is returned, including its credit details. Pass `include=subscriptions` to also get each account's current and upcoming subscriptions.

        :::info
        Requires the `accounts:read` OAuth2 scope.
        :::
      operationId: getAccountInfo
      parameters:
        - $ref: "#/components/parameters/AccountIdOptional"
        - description: |-
            Comma-separated list of related resources to attach to each account.

            Supported values:
            - `account_company` — the company the account belongs to, with its
              attributes inlined in `relationships.account_company`. Without it, only
              `id` and `type` are returned.

            - `subscriptions` — the account's current and upcoming subscriptions, in
              `relationships.subscriptions`. Without it, the field is left out.
          example: account_company,subscriptions
          in: query
          name: include
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                multipleAccounts:
                  summary: Multiple accounts without credit details
                  value:
                    data:
                      - attributes:
                          name: Account 1
                        id: "123456"
                        relationships:
                          account_company:
                            id: "555001"
                            type: account_company
                        type: account_summary
                      - attributes:
                          name: Account 2
                        id: "789012"
                        relationships:
                          account_company:
                            id: "555001"
                            type: account_company
                        type: account_summary
                      - attributes:
                          name: Account 3
                        id: "345678"
                        relationships: {}
                        type: account_summary
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                multipleAccountsWithCompany:
                  summary: Multiple accounts with the company loaded via include=account_company
                  value:
                    data:
                      - attributes:
                          name: Account 1
                        id: "123456"
                        relationships:
                          account_company:
                            attributes:
                              name: Dealfront Group GmbH
                            id: "555001"
                            type: account_company
                        type: account_summary
                      - attributes:
                          name: Account 2
                        id: "789012"
                        relationships:
                          account_company:
                            attributes:
                              name: Dealfront Group GmbH
                            id: "555001"
                            type: account_company
                        type: account_summary
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                multipleAccountsWithSubscriptions:
                  summary: Multiple accounts with their subscriptions loaded via include=subscriptions
                  value:
                    data:
                      - attributes:
                          name: Account 1
                        id: "123456"
                        relationships:
                          account_company:
                            id: "555001"
                            type: account_company
                          subscriptions:
                            - attributes:
                                billing_interval_months: null
                                credits_reset_interval_months: null
                                days_remaining: 5
                                end_date: "2026-11-02"
                                initial_contract_term_months: null
                                next_billing_date: null
                                price: null
                                products:
                                  - credits_per_reset_interval: 200
                                    feature: leadfeeder_activate
                                    leads_per_month: 1000
                                    name: Leadfeeder Activate
                                start_date: "2026-10-19"
                                status: active
                                subscription_type: trial
                              id: TRIAL_a1b2c3d4
                              type: subscription
                        type: account_summary
                      - attributes:
                          name: Account 2
                        id: "789012"
                        relationships:
                          account_company:
                            id: "555001"
                            type: account_company
                          subscriptions: []
                        type: account_summary
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                singleAccount:
                  summary: Single account with credit details
                  value:
                    data:
                      - attributes:
                          credits:
                            available: 1000
                            credits_pools:
                              - available: 500
                                expires_at: null
                                pool_type: recurring
                                remaining: 300
                                renews_at: "2026-10-01"
                                used: 200
                              - available: 500
                                expires_at: "2027-03-14"
                                pool_type: one_off
                                remaining: 500
                                renews_at: null
                                used: 0
                            next_reset_on: null
                            remaining: 800
                            used: 200
                          name: Account 1
                        id: "123456"
                        relationships:
                          account_company:
                            id: "555001"
                            type: account_company
                        type: account
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                singleAccountWithSubscriptions:
                  summary: Single account with its subscriptions loaded via include=subscriptions
                  value:
                    data:
                      - attributes:
                          credits:
                            available: 12000
                            credits_pools:
                              - available: 12000
                                expires_at: null
                                pool_type: recurring
                                remaining: 11800
                                renews_at: "2027-03-01"
                                used: 200
                            next_reset_on: null
                            remaining: 11800
                            used: 200
                          name: Account 1
                        id: "123456"
                        relationships:
                          account_company:
                            id: "555001"
                            type: account_company
                          subscriptions:
                            - attributes:
                                billing_interval_months: 12
                                credits_reset_interval_months: 12
                                days_remaining: null
                                end_date: null
                                initial_contract_term_months: 12
                                next_billing_date: "2027-03-01"
                                price:
                                  currency: EUR
                                  total: 8553.72
                                  vat: 1365.72
                                products:
                                  - credits_per_reset_interval: 12000
                                    feature: leadfeeder_scale
                                    leads_per_month: 2000
                                    name: Leadfeeder Scale
                                start_date: "2026-03-01"
                                status: active
                                subscription_type: invoiced
                              id: INV_e5f6g7h8
                              type: subscription
                        type: account
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                description: |
                  If `account_id` is supplied, the response includes one account with credit details; if omitted, the response is an array of accounts without credit information.
                oneOf:
                  - additionalProperties: false
                    properties:
                      data:
                        items:
                          $ref: "#/components/schemas/AccountV1"
                        type: array
                      meta:
                        properties:
                          request_id:
                            description: A unique identifier assigned to each API request for end-to-end traceability.
                            example: cf054205-dd8c-4473-8689-07c30fe0789f
                            type: string
                        required:
                          - request_id
                        type: object
                    required:
                      - data
                      - meta
                    title: Single account with credit details
                    type: object
                  - additionalProperties: false
                    properties:
                      data:
                        items:
                          $ref: "#/components/schemas/AccountSummaryV1"
                        type: array
                      meta:
                        properties:
                          request_id:
                            description: A unique identifier assigned to each API request for end-to-end traceability.
                            example: cf054205-dd8c-4473-8689-07c30fe0789f
                            type: string
                        required:
                          - request_id
                        type: object
                    required:
                      - data
                      - meta
                    title: Multiple accounts without credit details
                    type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - accounts:read
      summary: List Accounts
      tags:
        - Account
        - v1
  /v1/buyer-personas:
    get:
      description: |-
        Retrieve all buyer personas defined in the account. Each buyer persona is a saved set of contact-level filter criteria (department, job title, location, seniority) used to identify target contacts.

        Credit Note: Retrieving buyer persona definitions does not consume credits.

        :::info
        Requires the `buyer_personas:read` OAuth2 scope.
        :::
      operationId: getBuyerPersonas
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      app_url: https://app.leadfeeder.com/f/settings/website/123456/buyer-personas/7421
                      created_at: "2024-12-10T15:57:25Z"
                      filters:
                        department:
                          - display_value: Sales
                            negated: false
                            search_value: sales_department
                        job_title:
                          - display_value: Manager
                            negated: false
                            search_value: Manager
                        location:
                          - display_value: United States
                            negated: false
                            search_value: US
                        seniority:
                          - display_value: Top management
                            negated: false
                            search_value: top_management
                          - display_value: Middle management
                            negated: false
                            search_value: middle_management
                      name: Sales Managers
                    id: "7421"
                    type: buyer_persona
                  - attributes:
                      app_url: https://app.leadfeeder.com/f/settings/website/123456/buyer-personas/7422
                      created_at: "2024-11-05T10:30:00Z"
                      filters:
                        department:
                          - display_value: Information Technology
                            negated: false
                            search_value: it_department
                        job_title:
                          - display_value: Director
                            negated: false
                            search_value: Director
                        seniority:
                          - display_value: Top management
                            negated: false
                            search_value: top_management
                      name: IT Directors
                    id: "7422"
                    type: buyer_persona
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/BuyerPersonaV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - buyer_personas:read
      summary: Retrieve Buyer Personas
      tags:
        - Buyer Personas
        - v1
    post:
      description: |-
        Create a new buyer persona in the account.

        Credit Note: Creating a buyer persona does not consume credits.

        :::info
        Requires the `buyer_personas:write` OAuth2 scope.
        :::
      operationId: createBuyerPersona
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              revopsByJobTitle:
                description: RevOps titles in Germany, excluding interns
                summary: Job title keywords in one country
                value:
                  data:
                    attributes:
                      filters:
                        job_title:
                          - search_value: revenue operations
                          - negated: true
                            search_value: intern
                        location:
                          - display_value: Germany
                            search_value: DE
                            type: country_code
                      name: German RevOps
                    type: buyer_persona
              seniorSalesLeaders:
                description: Senior sales decision makers
                summary: Department and seniority
                value:
                  data:
                    attributes:
                      filters:
                        department:
                          - display_value: Sales
                            search_value: sales_department
                        seniority:
                          - display_value: Top management
                            search_value: top_management
                      name: Sales Leaders
                    type: buyer_persona
            schema:
              $ref: "#/components/schemas/BuyerPersonaRequestV1"
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/buyer-personas/7421
                    created_at: "2024-12-10T15:57:25Z"
                    filters:
                      department:
                        - display_value: Sales
                          negated: false
                          search_value: sales_department
                      job_title:
                        - display_value: Manager
                          negated: false
                          search_value: Manager
                      location:
                        - display_value: United States
                          negated: true
                          search_value: US
                      seniority:
                        - display_value: Top management
                          negated: false
                          search_value: top_management
                        - display_value: Middle management
                          negated: false
                          search_value: middle_management
                    name: Sales Managers
                  id: "7421"
                  type: buyer_persona
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BuyerPersonaV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - buyer_personas:write
      summary: Create a Buyer Persona
      tags:
        - Buyer Personas
        - v1
  /v1/buyer-personas/{id}:
    delete:
      description: |-
        Delete a buyer persona by its ID.

        :::info
        Requires the `buyer_personas:write` OAuth2 scope.
        :::
      operationId: deleteBuyerPersona
      parameters:
        - description: The buyer persona ID.
          example: "7421"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - buyer_personas:write
      summary: Delete a Buyer Persona
      tags:
        - Buyer Personas
        - v1
    get:
      description: |-
        Get the details of a specific buyer persona by ID, including its name, creation timestamp, and the full set of filter criteria that define it.

        Credit Note: Retrieving a buyer persona definition does not consume credits.

        :::info
        Requires the `buyer_personas:read` OAuth2 scope.
        :::
      operationId: getBuyerPersona
      parameters:
        - description: The buyer persona ID.
          example: "7421"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/buyer-personas/7421
                    created_at: "2024-12-10T15:57:25Z"
                    filters:
                      department:
                        - display_value: Sales
                          negated: false
                          search_value: sales_department
                      job_title:
                        - display_value: Manager
                          negated: false
                          search_value: Manager
                      location:
                        - display_value: United States
                          negated: true
                          search_value: US
                      seniority:
                        - display_value: Top management
                          negated: false
                          search_value: top_management
                        - display_value: Middle management
                          negated: false
                          search_value: middle_management
                    name: Sales Managers
                  id: "7421"
                  type: buyer_persona
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BuyerPersonaV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - buyer_personas:read
      summary: Get Buyer Persona Details
      tags:
        - Buyer Personas
        - v1
    patch:
      description: |-
        Update an existing buyer persona. All attributes are optional; only the attributes you send are changed. Sending `filters` replaces every category, not just the one you name.

        :::info
        Requires the `buyer_personas:write` OAuth2 scope.
        :::
      operationId: updateBuyerPersona
      parameters:
        - description: The buyer persona ID.
          example: "7421"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              renameOnly:
                description: Change the name without touching the filters
                summary: Rename only
                value:
                  data:
                    attributes:
                      name: Enterprise Sales Leaders
                    type: buyer_persona
              replaceFilters:
                description: Change the filters. Every category is resent, since categories omitted here would otherwise be dropped.
                summary: Replace filters
                value:
                  data:
                    attributes:
                      filters:
                        department:
                          - display_value: Sales
                            search_value: sales_department
                        seniority:
                          - display_value: Top management
                            search_value: top_management
                      name: Sales Leaders
                    type: buyer_persona
            schema:
              $ref: "#/components/schemas/BuyerPersonaRequestV1"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/buyer-personas/7421
                    created_at: "2024-12-10T15:57:25Z"
                    filters:
                      department:
                        - display_value: Sales
                          negated: false
                          search_value: sales_department
                      job_title:
                        - display_value: Manager
                          negated: false
                          search_value: Manager
                      location:
                        - display_value: United States
                          negated: true
                          search_value: US
                      seniority:
                        - display_value: Top management
                          negated: false
                          search_value: top_management
                        - display_value: Middle management
                          negated: false
                          search_value: middle_management
                    name: Sales Managers
                  id: "7421"
                  type: buyer_persona
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BuyerPersonaV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - buyer_personas:write
      summary: Update a Buyer Persona
      tags:
        - Buyer Personas
        - v1
  /v1/campaigns:
    get:
      description: |-
        Retrieve the list of all campaigns available in the account. Use pagination to control the number of campaigns returned, and include related campaign data, campaign settings, list, or custom feed information when needed.

        :::info
        Requires the `campaigns:read` OAuth2 scope.
        :::
      operationId: getCampaigns
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageNum"
        - $ref: "#/components/parameters/PageSize"
        - $ref: "#/components/parameters/CampaignInclude"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      app_url: https://app.leadfeeder.com/a/123456/campaigns/1234
                      budget: 25000
                      budget_left: 20768.45
                      budget_spent: 4231.55
                      budget_type: total
                      can_be_started: true
                      created_at: "2026-04-01T09:15:00Z"
                      currency: EUR
                      end_date: "2026-08-01T00:00:00Z"
                      location_type: country
                      name: Q2 EMEA enterprise push
                      start_date: "2026-05-01T00:00:00Z"
                      status: running
                      targets_crm_open_opportunities: false
                      total_budget: 25000
                      updated_at: "2026-05-10T12:00:00Z"
                    id: "1234"
                    relationships:
                      campaign_locations:
                        - id: "98765"
                          type: campaign_location
                      campaign_settings:
                        id: "1234"
                        type: campaign_settings
                      campaign_summary:
                        id: "1234"
                        type: campaign_summary
                      created_by:
                        id: "12345"
                        type: user
                      custom_feed:
                        id: feed-100
                        type: custom_feed
                      list:
                        id: company_42
                        type: list
                    type: campaign
                  - attributes:
                      app_url: https://app.leadfeeder.com/a/123456/campaigns/1233
                      budget: 200
                      budget_left: 0
                      budget_spent: 15400
                      budget_type: daily
                      can_be_started: false
                      created_at: "2026-01-10T08:00:00Z"
                      currency: EUR
                      end_date: "2026-03-31T00:00:00Z"
                      location_type: country
                      name: Q1 DACH retargeting
                      start_date: "2026-01-15T00:00:00Z"
                      status: ended
                      targets_crm_open_opportunities: false
                      total_budget: 15400
                      updated_at: "2026-04-01T00:05:00Z"
                    id: "1233"
                    relationships:
                      campaign_locations:
                        - id: "11111"
                          type: campaign_location
                        - id: "11112"
                          type: campaign_location
                      campaign_settings:
                        id: "1233"
                        type: campaign_settings
                      campaign_summary:
                        id: "1233"
                        type: campaign_summary
                      created_by:
                        id: "12345"
                        type: user
                      custom_feed: null
                      list:
                        id: company_77
                        type: list
                    type: campaign
                meta:
                  pagination:
                    page_count: 1
                    page_num: 1
                    total_count: 2
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CampaignV1"
                    type: array
                  meta:
                    properties:
                      pagination:
                        properties:
                          page_count:
                            example: 1
                            type: integer
                          page_num:
                            example: 1
                            type: integer
                          total_count:
                            example: 1
                            type: integer
                        required:
                          - page_num
                          - page_count
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - campaigns:read
      summary: Retrieve Campaigns
      tags:
        - Campaigns
        - v1
  /v1/campaigns/{id}:
    get:
      description: |-
        Fetch detailed information about a specific campaign using its campaign ID. Use the include parameter to attach related campaign data, campaign settings, list, or custom feed information to the result.

        :::info
        Requires the `campaigns:read` OAuth2 scope.
        :::
      operationId: getCampaign
      parameters:
        - $ref: "#/components/parameters/CampaignId"
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/CampaignInclude"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/a/123456/campaigns/1234
                    budget: 25000
                    budget_left: 20768.45
                    budget_spent: 4231.55
                    budget_type: total
                    can_be_started: true
                    created_at: "2026-04-01T09:15:00Z"
                    currency: EUR
                    end_date: "2026-08-01T00:00:00Z"
                    location_type: country
                    name: Q2 EMEA enterprise push
                    start_date: "2026-05-01T00:00:00Z"
                    status: running
                    targets_crm_open_opportunities: false
                    total_budget: 25000
                    updated_at: "2026-05-10T12:00:00Z"
                  id: "1234"
                  relationships:
                    campaign_locations:
                      - attributes:
                          country_code: PT
                          location_type: country
                          name: Portugal
                        id: "98765"
                        type: campaign_location
                    campaign_settings:
                      attributes:
                        ads_visible_only_on_weekdays: false
                        automatically_include_new_target_companies: true
                        automatically_remove_target_companies: true
                        brand_safety_domains_exclusion_enabled: true
                      id: "1234"
                      type: campaign_settings
                    campaign_summary:
                      attributes:
                        audience_count: 250
                        clicks: 50
                        cost_per_company: 3.13
                        ctr: 5
                        currency: EUR
                        ecpc: 0.5
                        ecpm: 25
                        ecpv: 2.5
                        impressions: 1000
                        influenced_count: 4
                        reached_count: 8
                        targeted_count: 120
                        total_cost: 25
                        visits_count: 10
                        vtr: 1
                      id: "1234"
                      type: campaign_summary
                    created_by:
                      id: "12345"
                      type: user
                    custom_feed:
                      attributes:
                        advanced_filters: null
                        created_at: "2026-01-15T10:30:00.000Z"
                        deletable: true
                        name: My feed
                        notifications: []
                        updated_at: "2026-01-20T14:00:00.000Z"
                        viewable: true
                      id: feed-100
                      relationships:
                        created_by:
                          id: "12345"
                          type: user
                        folder: null
                      type: custom_feed
                    list:
                      attributes:
                        created_at: "2026-01-02T03:04:05.000000Z"
                        name: VIP accounts
                        scope: company
                        updated_at: "2026-04-05T06:07:08.000000Z"
                      id: company_42
                      relationships:
                        created_by:
                          id: "9999"
                          type: user
                      type: list
                  type: campaign
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CampaignV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - campaigns:read
      summary: Get Campaign Details
      tags:
        - Campaigns
        - v1
    patch:
      description: |-
        Update a specific campaign using its campaign ID. Supports changes to campaign attributes such as name, budget, status, associated list or custom feed, and campaign settings.

        :::info
        Requires the `campaigns:write` OAuth2 scope.
        :::
      operationId: updateCampaign
      parameters:
        - $ref: "#/components/parameters/CampaignId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  budget: 30000
                  name: Q2 EMEA enterprise push (renamed)
                  status: running
                relationships:
                  campaign_settings:
                    attributes:
                      automatically_remove_target_companies: false
                      brand_safety_domains_exclusion_enabled: true
                    id: "1234"
                    type: campaign_settings
                  list:
                    id: company_42
                    type: list
                type: campaign
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      description: Subset of campaign attributes to update. Only `status`, `name`, and `budget` are mutable through this endpoint. At least one of them must be present — an empty object is rejected with `400 parameter_missing`.
                      minProperties: 1
                      properties:
                        budget:
                          description: New budget value, in units of the campaign's currency. Interpretation depends on the campaign's `budget_type` (total or daily).
                          type: number
                        name:
                          description: New name for the campaign.
                          type: string
                        status:
                          description: |-
                            Requested lifecycle status. This is an intent rather than the resulting status: asking for `running` on a `draft` campaign schedules it, and the response comes back as `scheduled` until `start_date` is reached.

                            - `draft` — return a `scheduled` campaign to configuration.
                            - `running` — schedule a `draft` campaign, or resume a `paused` one.
                            - `paused` — halt delivery on a `running` campaign; it can be resumed later.
                            - `terminated` — stop the campaign permanently. Terminal state.

                            The `scheduled`, `stopped` and `ended` statuses appear in responses but are set by Leadfeeder, and cannot be requested here. Only transitions allowed by the campaign's current state are accepted; invalid transitions surface as `422 invalid_status_transition`.
                          enum:
                            - draft
                            - running
                            - paused
                            - terminated
                          type: string
                      type: object
                    relationships:
                      description: Optional relationship updates. Omit to leave the relationship unchanged.
                      properties:
                        campaign_settings:
                          description: Patch the campaign settings toggles.
                          properties:
                            attributes:
                              properties:
                                ads_visible_only_on_weekdays:
                                  type: boolean
                                automatically_include_new_target_companies:
                                  type: boolean
                                automatically_remove_target_companies:
                                  type: boolean
                                brand_safety_domains_exclusion_enabled:
                                  type: boolean
                              type: object
                            id:
                              example: "1234"
                              type: string
                            type:
                              const: campaign_settings
                              type: string
                          required:
                            - id
                            - type
                            - attributes
                          type: object
                        list:
                          description: Repoint the campaign to a different audience list.
                          properties:
                            id:
                              description: Stable identifier of the target audience list.
                              example: company_42
                              type: string
                            type:
                              const: list
                              type: string
                          required:
                            - id
                            - type
                          type: object
                      type: object
                    type:
                      default: campaign
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/a/123456/campaigns/1234
                    budget: 25000
                    budget_left: 20768.45
                    budget_spent: 4231.55
                    budget_type: total
                    can_be_started: true
                    created_at: "2026-04-01T09:15:00Z"
                    currency: EUR
                    end_date: "2026-08-01T00:00:00Z"
                    location_type: country
                    name: Q2 EMEA enterprise push
                    start_date: "2026-05-01T00:00:00Z"
                    status: running
                    targets_crm_open_opportunities: false
                    total_budget: 25000
                    updated_at: "2026-05-10T12:00:00Z"
                  id: "1234"
                  relationships:
                    campaign_locations:
                      - attributes:
                          country_code: PT
                          location_type: country
                          name: Portugal
                        id: "98765"
                        type: campaign_location
                    campaign_settings:
                      attributes:
                        ads_visible_only_on_weekdays: false
                        automatically_include_new_target_companies: true
                        automatically_remove_target_companies: true
                        brand_safety_domains_exclusion_enabled: true
                      id: "1234"
                      type: campaign_settings
                    campaign_summary:
                      attributes:
                        audience_count: 250
                        clicks: 50
                        cost_per_company: 3.13
                        ctr: 5
                        currency: EUR
                        ecpc: 0.5
                        ecpm: 25
                        ecpv: 2.5
                        impressions: 1000
                        influenced_count: 4
                        reached_count: 8
                        targeted_count: 120
                        total_cost: 25
                        visits_count: 10
                        vtr: 1
                      id: "1234"
                      type: campaign_summary
                    created_by:
                      id: "12345"
                      type: user
                    custom_feed:
                      attributes:
                        advanced_filters: null
                        created_at: "2026-01-15T10:30:00.000Z"
                        deletable: true
                        name: My feed
                        notifications: []
                        updated_at: "2026-01-20T14:00:00.000Z"
                        viewable: true
                      id: feed-100
                      relationships:
                        created_by:
                          id: "12345"
                          type: user
                        folder: null
                      type: custom_feed
                    list:
                      attributes:
                        created_at: "2026-01-02T03:04:05.000000Z"
                        name: VIP accounts
                        scope: company
                        updated_at: "2026-04-05T06:07:08.000000Z"
                      id: company_42
                      relationships:
                        created_by:
                          id: "9999"
                          type: user
                      type: list
                  type: campaign
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CampaignV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              examples:
                conflicting_operation:
                  summary: Another operation (for example a sync) currently holds the campaign lock; retry shortly
                  value:
                    errors:
                      - code: conflicting_operation
                        title: Conflicting syncing, try again later
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_status_transition:
                  summary: Requested status is not reachable from the current one
                  value:
                    errors:
                      - code: invalid_status_transition
                        title: Cannot transition campaign from 'ended' to 'running'.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_change_not_permitted:
                  summary: The list relationship cannot be changed in the campaign's current status
                  value:
                    errors:
                      - code: list_change_not_permitted
                        title: you can't change target accounts list on running
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_unavailable:
                  summary: The requested list could not be resolved
                  value:
                    errors:
                      - code: list_unavailable
                        title: List not found
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                operation_failed:
                  summary: The update could not be applied for another reason
                  value:
                    errors:
                      - code: operation_failed
                        title: The request could not be processed.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                validation_failed:
                  summary: Attribute values failed validation
                  value:
                    errors:
                      - code: validation_failed
                        title: budget needs to be at least 1000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The campaign update was rejected. The `code` identifies why; the campaign is left unchanged.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - campaigns:write
      summary: Update Campaign
      tags:
        - Campaigns
        - v1
  /v1/campaigns/{id}/stats:
    get:
      description: |-
        Retrieve statistics for a specific campaign over a defined time period. Use frequency, start_period, and end_period to control how the campaign performance data is grouped and returned.

        :::info
        Requires the `campaigns:read` OAuth2 scope.
        :::
      operationId: getCampaignStats
      parameters:
        - $ref: "#/components/parameters/CampaignId"
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/Frequency"
        - $ref: "#/components/parameters/StartPeriod"
        - $ref: "#/components/parameters/EndPeriod"
        - $ref: "#/components/parameters/PageNum"
        - $ref: "#/components/parameters/PageSize"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      currency: EUR
                      date: "2026-04-14"
                      ecpm: 0
                      ecpv: 0
                      impressions: 0
                      influenced_count: 0
                      reached_count: 0
                      total_cost: 0
                      visits: 0
                      vtr: 0
                    id: MTIzNHwyMDI2LTA0LTE0fDIwMjYtMDQtMTQ=
                    type: campaign_stats
                  - attributes:
                      currency: EUR
                      date: "2026-04-15"
                      ecpm: 12340
                      ecpv: 53.65
                      impressions: 100
                      influenced_count: 1
                      reached_count: 1
                      total_cost: 1234
                      visits: 23
                      vtr: 23
                    id: MTIzNHwyMDI2LTA0LTE1fDIwMjYtMDQtMTU=
                    type: campaign_stats
                meta:
                  pagination:
                    page_count: 1
                    page_num: 1
                    total_count: 2
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CampaignStatsV1"
                    type: array
                  meta:
                    properties:
                      pagination:
                        properties:
                          page_count:
                            example: 1
                            type: integer
                          page_num:
                            example: 1
                            type: integer
                          total_count:
                            example: 1
                            type: integer
                        required:
                          - page_num
                          - page_count
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - campaigns:read
      summary: Retrieve Campaign Stats
      tags:
        - Campaigns
        - v1
  /v1/companies:
    get:
      description: |-
        Retrieve the list of companies based on provided IDs.
        Credit Note: Each company will contain it's full deep data and it will consumes 1 credit, unless the company was already accessed within the last 12 months.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getCompanies
      parameters:
        - $ref: "#/components/parameters/CompanyIds"
        - $ref: "#/components/parameters/AccountId"
        - description: Specify which additional data should be attached to the result.
          example: group_company
          in: query
          name: include
          schema:
            enum:
              - group_company
              - tags
              - lists
              - web_visits
              - icps
              - crm_connections
              - crm_connections.crm_record
              - crm_connections.crm_record.crm_owner
              - crm_suggestions
              - crm_suggestions.crm_record
              - crm_suggestions.crm_record.crm_owner
              - crm_group_connections
              - crm_group_connections.crm_connection
              - crm_group_connections.crm_connection.crm_record
              - crm_group_connections.crm_connection.crm_record.crm_owner
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CompanyV1"
                    type: array
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 1
                            type: number
                        required:
                          - charged
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                      - credits
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                invalid_parameter:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The list of IDs is required and cannot be left empty.
                missing_mandatory_fields:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: "Missing required request parameters: [ids]"
                too_many_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The number of IDs supplied exceeds the permitted limit of 100.
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid mandatory fields
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Retrieve Companies
      tags:
        - Companies
        - v1
  /v1/companies/enrichment-jobs:
    post:
      description: |-
        Trigger an asynchronous job to enrich companies with AI-generated custom field values. The custom field must exist and be an AI field type (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`) or a `contact_collection` field. Create custom fields via the Custom Fields API first.
        The job runs in the background; poll the status endpoint to check progress.
        A maximum of 50,000 companies are enriched per job, whether targeted via `company_ids`, `list_id`, or `advanced_search`; companies beyond this limit are not processed. Split larger selections across multiple jobs.
        Use `advanced_search` to enrich the companies matching a search query without listing their ids yourself. You control the selection with `sort` (which matches to prefer), `page.size` (how many to enrich), and `excluded_company_ids` (matches to skip). Add a `list_id` alongside `advanced_search` to also save the matched companies to that list before they are enriched.
        Enrichment settings (prompt, external data usage, contact collection options) come from the custom field's saved configuration. The request may override any of them for a single run; the field's configuration is never modified.
        Preview: send `enrichment_strategy: "preview"` with a `prompt` and an `output_type` (no `custom_field_id` needed) to dry-run the prompt against a sample of up to 100 of the targeted companies. Nothing is written: no custom field values, no list changes. The per-company results are returned on the job resource once it completes. To preview a custom field instead, name it as `custom_field_id`: the field supplies the answer shape, so no `output_type` is needed. Previewing a `contact_collection` field returns a `contacts` list per company instead of a score. To preview contacts without a field, send `output_type: contact_collection` with the prompt; the contact settings come from the `contact_collection` object.
        Credit Note: Credits are consumed as companies are enriched.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: createCompanyEnrichmentJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              by_advanced_search:
                summary: Target companies matching a search
                value:
                  data:
                    attributes:
                      advanced_search:
                        filters:
                          items:
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                          operator: and
                          type: group
                        page:
                          size: 1000
                        sort:
                          direction: desc
                          field: employee_count
                      custom_field_id: ai_account_score
                      enrichment_strategy: all
                    type: enrichment_job
              by_advanced_search_into_list:
                summary: Save search results to a list, then enrich them
                value:
                  data:
                    attributes:
                      advanced_search:
                        filters:
                          items:
                            - field: employee_count
                              operator: in_range
                              type: filter
                              value:
                                gte: 50
                          operator: and
                          type: group
                      custom_field_id: ai_account_score
                      enrichment_strategy: all
                      list_id: company_12345
                    type: enrichment_job
              by_company_ids:
                summary: Target specific companies
                value:
                  data:
                    attributes:
                      company_ids:
                        - "651713"
                        - "467823"
                      custom_field_id: ai_account_score
                      enrichment_strategy: missing_values
                    type: enrichment_job
              by_list:
                summary: Target entire list
                value:
                  data:
                    attributes:
                      custom_field_id: ai_account_score
                      enrichment_strategy: all
                      list_id: company_12345
                    type: enrichment_job
              contact_collection_with_prompt:
                summary: Collect contacts for a list, with a per-run prompt
                value:
                  data:
                    attributes:
                      contact_collection:
                        filter_groups:
                          department:
                            - negated: false
                              search_value: sales_department
                              type: department
                          location:
                            - negated: false
                              search_value: DE
                              type: country_code
                      custom_field_id: key_contacts
                      enrichment_strategy: missing_values
                      list_id: company_12345
                      prompt: Find contacts in top management working in project management or procurement.
                      use_external_data: false
                    type: enrichment_job
              preview:
                summary: Dry-run a prompt against a sample (nothing is written)
                value:
                  data:
                    attributes:
                      enrichment_strategy: preview
                      list_id: company_12345
                      output_type: ai_score
                      prompt: Score how well this company fits our ICP.
                    type: enrichment_job
              preview_contact_collection:
                summary: Preview a contact_collection field (nothing is written)
                value:
                  data:
                    attributes:
                      custom_field_id: key_contacts
                      enrichment_strategy: preview
                      list_id: company_12345
                      prompt: Find contacts in top management working in procurement.
                    type: enrichment_job
              preview_contacts_prompt_only:
                summary: Preview contacts without a custom field (nothing is written)
                value:
                  data:
                    attributes:
                      contact_collection:
                        num_contacts_max_per_company: 3
                      enrichment_strategy: preview
                      list_id: company_12345
                      output_type: contact_collection
                      prompt: Find contacts in top management working in procurement.
                    type: enrichment_job
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      anyOf:
                        - not:
                            properties:
                              enrichment_strategy:
                                const: preview
                            required:
                              - enrichment_strategy
                          required:
                            - custom_field_id
                        - properties:
                            enrichment_strategy:
                              enum:
                                - preview
                          required:
                            - enrichment_strategy
                            - prompt
                            - output_type
                        - properties:
                            enrichment_strategy:
                              enum:
                                - preview
                          required:
                            - enrichment_strategy
                            - prompt
                            - custom_field_id
                      description: Provide a target plus a `custom_field_id` identifying the custom field to enrich. The target is `company_ids`, `list_id`, or `advanced_search`. `company_ids` is mutually exclusive with the others; `list_id` and `advanced_search` may be supplied together, in which case the search results are added to the list and then enriched. All enrichment settings default to the custom field's saved configuration; the optional attributes below override them for this run only — the field's configuration is never modified.
                      oneOf:
                        - required:
                            - company_ids
                        - anyOf:
                            - required:
                                - list_id
                            - required:
                                - advanced_search
                      properties:
                        advanced_search:
                          allOf:
                            - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                              example:
                                excluded_company_ids:
                                  - "651713"
                                filters:
                                  items:
                                    - field: country_code
                                      operator: in
                                      type: filter
                                      value:
                                        - DE
                                    - field: employee_count
                                      operator: in_range
                                      type: filter
                                      value:
                                        gte: 50
                                  operator: and
                                  type: group
                                page:
                                  size: 1000
                                sort:
                                  direction: desc
                                  field: employee_count
                              properties:
                                excluded_company_ids:
                                  description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                                  example:
                                    - "651713"
                                  items:
                                    type: string
                                  type: array
                                filters:
                                  description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                                  example:
                                    items:
                                      - field: country_code
                                        operator: in
                                        type: filter
                                        value:
                                          - DE
                                      - items:
                                          - field: employee_count
                                            operator: in_range
                                            type: filter
                                            value:
                                              gte: 50
                                          - field: industries
                                            operator: in
                                            type: filter
                                            value:
                                              classification: nace
                                              codes:
                                                - "62.01"
                                        operator: or
                                        type: group
                                    operator: and
                                    type: group
                                  properties:
                                    items:
                                      description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                                      items:
                                        $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                                      type: array
                                    operator:
                                      description: The logical operator combining the items.
                                      enum:
                                        - and
                                        - or
                                      example: and
                                      type: string
                                    type:
                                      description: Indicates this is the root filter group.
                                      enum:
                                        - group
                                      example: group
                                      type: string
                                  required:
                                    - type
                                    - operator
                                    - items
                                  type: object
                                page:
                                  description: Bounds how many of the matching companies are selected.
                                  properties:
                                    size:
                                      description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                                      example: 1000
                                      minimum: 1
                                      type: integer
                                  type: object
                                sort:
                                  description: Ordering applied to the matching companies. Omit to use the default ordering.
                                  properties:
                                    direction:
                                      default: asc
                                      description: Sort direction. Defaults to `asc`.
                                      enum:
                                        - asc
                                        - desc
                                      example: desc
                                      type: string
                                    field:
                                      description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                                      example: employee_count,name
                                      type: string
                                  type: object
                              required:
                                - filters
                              type: object
                            - properties:
                                page:
                                  properties:
                                    size:
                                      maximum: 50000
                        category:
                          description: Overrides the custom field's configured prompt category for this run.
                          example: funding
                          type: string
                        company_ids:
                          description: Specific company IDs to enrich. Mutually exclusive with `list_id` and `advanced_search`.
                          example:
                            - "651713"
                            - "467823"
                          items:
                            type: string
                          type: array
                        contact_collection:
                          description: "Contact settings. On a run that names a `contact_collection` custom field they override the field's configuration for this run only. On a prompt-only preview with `output_type: contact_collection` there is no field, so they are the preview's settings. The object is always optional: a run that names a field falls back to the field's configuration, and a prompt-only preview falls back to the documented default for each setting."
                          minProperties: 1
                          properties:
                            contacts_to_enrich:
                              description: Overrides how many of the collected contacts get their details revealed on this run. Defaults to `num_contacts_max_per_company`.
                              example: 10
                              minimum: 1
                              type: integer
                            enrich_emails:
                              description: Whether email addresses are revealed for the enriched contacts. Must be present here or in the custom field's configuration, except on a prompt-only preview, which reveals nothing.
                              example: false
                              type: boolean
                            enrich_phones:
                              description: Whether phone numbers are revealed for the enriched contacts. Must be present here or in the custom field's configuration, except on a prompt-only preview, which reveals nothing.
                              example: false
                              type: boolean
                            filter_groups:
                              allOf:
                                - $ref: "#/components/schemas/ContactFilterGroupsV1"
                                - description: Restricts which contacts are collected within the targeted companies (by location, seniority, department and/or job-title keywords). When omitted, the custom field's saved contact filters apply; a prompt-only preview has no field, so no contact filter applies.
                            find_more_contacts_details:
                              description: Overrides whether details are revealed for the collected contacts on this run.
                              example: false
                              type: boolean
                            num_contacts_max_per_company:
                              description: "Overrides the maximum number of contacts collected per company for this run. Defaults to 10 when omitted, which is also the hard ceiling: a larger value is accepted but no run returns more than 10 contacts per company."
                              example: 10
                              minimum: 1
                              type: integer
                          type: object
                        custom_field_id:
                          description: The API name of the custom field to enrich. Must be an AI field type (ai_score, ai_text, ai_number, ai_boolean) or a contact_collection field. Not required for `preview` runs, which dry-run a `prompt` instead of enriching a field; a preview that names one takes its answer shape from the field.
                          example: ai_account_score
                          type: string
                        enrichment_strategy:
                          description: Which records to enrich
                          enum:
                            - missing_values
                            - all
                            - preview
                          example: missing_values
                          type: string
                          x-apidog-enum:
                            - description: Only enrich records that don't have a value yet. It can't be used with `advanced_search`.
                              value: missing_values
                            - description: Enrich all records regardless of existing values
                              value: all
                            - description: Dry run — sample up to 100 companies and return per-company results on the job resource, without writing custom field values or modifying lists. Applies to job creation only.
                              value: preview
                        limit:
                          description: Enrich only the first `limit` companies of the target. For `list_id` and `company_ids` they are taken in the list's default order (most complete records first). With `advanced_search`, the smaller of `limit` and the selection's `page.size` applies, in the selection's own `sort` order. Omit to enrich the whole target. A `preview` is still capped at 100 companies.
                          example: 100
                          maximum: 50000
                          minimum: 1
                          type: integer
                        list_id:
                          description: The list to enrich, identified by its Lists API id (e.g. `company_12345`). Mutually exclusive with `company_ids`. When supplied together with `advanced_search`, the search results are added to this list and then enriched (instead of enriching the list's current members).
                          example: company_12345
                          type: string
                        locale:
                          description: "Locale for AI-generated output: a language code with an optional region, such as `en` or `en-US`. Defaults to `en-US`."
                          example: en-US
                          type: string
                        output_type:
                          description: "The answer shape the AI produces. It is normally derived from the custom field, so it is only relevant (and required) for `preview` runs that name no `custom_field_id`. A preview that names a field takes its answer shape from the field; if it also sends an `output_type`, that value must equal the field's type, or the request is rejected with a 422 `invalid_parameter` error. This applies in both directions: a scalar `output_type` on a `contact_collection` field and `contact_collection` on a scalar AI field are both rejected. `ai_score`, `ai_text`, `ai_number` and `ai_boolean` run a scalar preview that returns `score` and `reason` per company. `contact_collection` runs a contacts preview that returns a `contacts` list per company; its settings come from the `contact_collection` object."
                          enum:
                            - ai_score
                            - ai_text
                            - ai_number
                            - ai_boolean
                            - contact_collection
                          example: ai_score
                          type: string
                          x-apidog-enum:
                            - description: A scalar score and reason per company
                              value: ai_score
                            - description: A free-text answer and reason per company
                              value: ai_text
                            - description: A numeric answer and reason per company
                              value: ai_number
                            - description: A boolean answer and reason per company
                              value: ai_boolean
                            - description: A contacts list per company instead of a score and reason
                              value: contact_collection
                        prompt:
                          description: Overrides the custom field's configured prompt for this run. For `contact_collection` fields the prompt is typically supplied here on each run, since the field stores no prompt. Required for every `preview` run, whether it names a custom field or not.
                          example: Find contacts in top management working in procurement.
                          type: string
                        use_external_data:
                          description: Overrides the custom field's configured setting for whether the AI may use external data sources for this run.
                          example: false
                          type: boolean
                      type: object
                    type:
                      default: enrichment_job
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      custom_field_id: ai_account_score
                      enrichment_strategy: all
                      list_id: company_12345
                    created_at: "2026-03-10T12:00:00Z"
                    errors: []
                    status: running
                  id: job_21662
                  type: enrichment_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/EnrichmentJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started
        "400":
          content:
            application/json:
              examples:
                invalid_json:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Invalid JSON in request body
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_request_body:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must include a 'data.attributes' object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_body:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Missing request body
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                unknown_attributes:
                  value:
                    errors:
                      - code: unknown_attributes
                        title: "Unknown attribute(s): list_ids"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The request body is missing, isn't valid JSON or isn't a JSON object, or its `data` isn't an object with an `attributes` object (`invalid_request_body`). An attribute this endpoint doesn't take gives `unknown_attributes`.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              examples:
                custom_field_not_found:
                  value:
                    errors:
                      - code: not_found
                        title: "CustomField not found for identifier: ai_account_score"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Custom field not found
        "422":
          content:
            application/json:
              examples:
                advanced_search_filters_too_large:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.filters must not exceed 65536 bytes
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_size_too_large:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page.size must be less than or equal to 50000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_without_filters:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: advanced_search.filters is missing
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                enrichment_strategy_not_supported:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The enrichment strategy must be missing_values, all or preview.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_locale:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: locale must be a locale identifier such as en or en-US
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                limit_out_of_range:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: limit must be an integer between 1 and 50000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_custom_field_id:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: custom_field_id is missing
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                mutually_exclusive:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: company_ids cannot be combined with list_id or advanced_search
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                preview_output_type_contradicts_field:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: output_type must be contact_collection for custom field key_contacts
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                saved_prompt_too_long:
                  value:
                    errors:
                      - code: unprocessable_content
                        title: prompt must be at most 16000 characters
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The request body is valid JSON but breaks a rule. The error's title names each broken rule as the attribute's path followed by the rule, such as `custom_field_id is missing`, joined with `; ` when there are several. Its code is `missing_mandatory_fields` if any attribute is missing or empty, and `invalid_parameter` otherwise. An `enrichment_strategy` other than `missing_values`, `all` or `preview` is checked first and refused on its own. A prompt saved on the custom field that is longer than 16,000 characters gives `unprocessable_content`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Create Company Enrichment Job
      tags:
        - Companies
        - Enrichment
        - v1
  /v1/companies/enrichment-jobs/estimate:
    post:
      description: |-
        Estimate the credit cost for enriching companies with AI-generated custom field values. Target the estimate with a specific `list_id`, flat `company_ids`, or a pre-computed `company_count`.
        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: estimateCompanyEnrichmentJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              by_company_ids:
                summary: Target specific companies
                value:
                  data:
                    attributes:
                      company_ids:
                        - "651713"
                        - "467823"
                      custom_field_id: ai_account_score
                      enrichment_strategy: missing_values
                    type: enrichment_job
              by_count:
                summary: Pre-computed count
                value:
                  data:
                    attributes:
                      company_count: 1500
                      custom_field_id: ai_account_score
                      enrichment_strategy: all
                    type: enrichment_job
              by_list:
                summary: Target entire list
                value:
                  data:
                    attributes:
                      custom_field_id: ai_account_score
                      enrichment_strategy: all
                      list_id: company_12345
                    type: enrichment_job
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      anyOf:
                        - required:
                            - company_count
                        - required:
                            - company_ids
                        - required:
                            - list_id
                      description: "Provide a `custom_field_id` plus the target to size the estimate: `list_id`, `company_ids`, or a pre-computed `company_count`."
                      properties:
                        company_count:
                          description: Pre-computed number of companies to enrich, up to the 50,000 per-job maximum. When provided, the estimate uses this value directly and skips resolving the target, so `list_id` / `company_ids` may be omitted.
                          example: 1500
                          maximum: 50000
                          minimum: 0
                          type: integer
                        company_ids:
                          description: Specific company IDs to size the estimate.
                          example:
                            - "651713"
                            - "467823"
                          items:
                            type: string
                          type: array
                        contact_collection:
                          description: Overrides that only apply when `custom_field_id` is a `contact_collection` field — they shape the reveal portion of the estimate.
                          minProperties: 1
                          properties:
                            contacts_to_enrich:
                              description: Overrides how many contacts per company get their details revealed, which drives the reveal portion of the estimate. Defaults to the custom field's configured maximum contacts per company.
                              example: 10
                              minimum: 1
                              type: integer
                            enrich_emails:
                              description: Whether email reveals are included in the estimate. Must be present here or in the custom field's configuration.
                              example: false
                              type: boolean
                            enrich_phones:
                              description: Whether phone reveals are included in the estimate. Must be present here or in the custom field's configuration.
                              example: false
                              type: boolean
                          type: object
                        custom_field_id:
                          description: The API name of the custom field to enrich. Must be an AI field type (ai_score, ai_text, ai_number, ai_boolean) or a contact_collection field.
                          example: ai_account_score
                          type: string
                        enrichment_strategy:
                          default: all
                          description: Which records to enrich. Defaults to `all` when omitted. `preview` applies to job creation only, not to estimates.
                          enum:
                            - missing_values
                            - all
                          example: missing_values
                          type: string
                          x-apidog-enum:
                            - description: Only enrich records that don't have a value yet
                              value: missing_values
                            - description: Enrich all records regardless of existing values
                              value: all
                        limit:
                          description: Size the estimate for a job that enriches only the first `limit` companies of the target, as `limit` does on job creation. The estimate covers the smaller of `limit` and the target's size (or `company_count`, when provided).
                          example: 100
                          maximum: 50000
                          minimum: 1
                          type: integer
                        list_id:
                          description: The list to size the estimate, identified by its Lists API id (e.g. `company_12345`).
                          example: company_12345
                          type: string
                        prompt:
                          description: The prompt the run will use, when it overrides the custom field's configured prompt. Without it the estimate uses the field's prompt. For `contact_collection` fields the prompt is typically supplied here, since the field stores no prompt, so pass the same prompt the create request will use. A `contact_collection` estimate that resolves no prompt runs no model, so `estimated_total_credits` includes no AI cost, only contact reveals.
                          example: Find contacts in top management working in procurement.
                          type: string
                      required:
                        - custom_field_id
                      type: object
                    type:
                      default: enrichment_job
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    company_count: 42
                    estimated_total_credits: 0.42
                  id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                  type: enrichment_job_estimate
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    properties:
                      attributes:
                        properties:
                          company_count:
                            description: Number of companies that would be enriched
                            example: 42
                            type: integer
                          estimated_total_credits:
                            description: Estimated credits that would be consumed. AI enrichment is priced per company at a fractional rate, so this can be a decimal.
                            example: 0.42
                            type: number
                        required:
                          - estimated_total_credits
                          - company_count
                        type: object
                      id:
                        description: Unique estimate identifier
                        example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        format: uuid
                        type: string
                      type:
                        default: enrichment_job_estimate
                        type: string
                    required:
                      - type
                      - id
                      - attributes
                    type: object
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Estimate calculated successfully
        "400":
          content:
            application/json:
              examples:
                invalid_json:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Invalid JSON in request body
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_request_body:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must include a 'data.attributes' object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_body:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Missing request body
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                unknown_attributes:
                  value:
                    errors:
                      - code: unknown_attributes
                        title: "Unknown attribute(s): list_ids"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The request body is missing, isn't valid JSON or isn't a JSON object, or its `data` isn't an object with an `attributes` object (`invalid_request_body`). An attribute this endpoint doesn't take gives `unknown_attributes`.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              examples:
                custom_field_not_found:
                  value:
                    errors:
                      - code: not_found
                        title: "CustomField not found for identifier: ai_account_score"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Custom field not found
        "422":
          content:
            application/json:
              examples:
                company_count_too_large:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: company_count must not exceed 50000 companies per job
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                enrichment_strategy_not_supported:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The enrichment strategy must be missing_values or all.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                limit_out_of_range:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: limit must be an integer between 1 and 50000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_custom_field_id:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: custom_field_id is missing
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_targeting:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: Either list_id, company_ids, or company_count must be provided
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable content — request body is well-formed but fails domain validation
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Estimate Company Enrichment Job
      tags:
        - Companies
        - Enrichment
        - v1
  /v1/companies/enrichment-jobs/{job_id}:
    get:
      description: |-
        Retrieve the current status of a Company AI Enrichment job, with any errors. `credits.estimated` is set when the job is created if it targets `company_ids`, and otherwise once the job has found the companies to enrich. `credits.consumed` is reported once the job has finished. The counts in `summary` can appear shortly before `status` changes.
        Jobs are kept for 7 days after creation. A job that stops unexpectedly can stay `running` until then.
        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getCompanyEnrichmentJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the enrichment job
          example: job_21662
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                completed:
                  summary: Job completed, with its counts and the credits consumed
                  value:
                    data:
                      attributes:
                        completed_at: "2026-03-10T12:05:30Z"
                        configuration:
                          custom_field_id: ai_account_score
                          enrichment_strategy: all
                          list_id: company_12345
                        created_at: "2026-03-10T12:00:00Z"
                        credits:
                          consumed: 238
                          estimated: 250
                        errors: []
                        status: completed
                        summary:
                          failed: 12
                          succeeded: 238
                          total: 250
                      id: job_21662
                      type: enrichment_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed:
                  summary: Job failed, the search took too long
                  value:
                    data:
                      attributes:
                        completed_at: "2026-03-10T12:01:02Z"
                        configuration:
                          advanced_search:
                            filters:
                              items:
                                - field: country_code
                                  operator: in
                                  type: filter
                                  value:
                                    - DE
                              operator: and
                              type: group
                            page:
                              size: 1000
                            sort:
                              direction: desc
                              field: employee_count
                          custom_field_id: ai_account_score
                          enrichment_strategy: all
                        created_at: "2026-03-10T12:00:00Z"
                        errors:
                          - code: server_timeout
                            title: The search took too long to complete. Please narrow your filters and try again.
                        status: failed
                      id: job_21662
                      type: enrichment_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed_insufficient_credits:
                  summary: Job failed, the account doesn't have enough credits to pay for it
                  value:
                    data:
                      attributes:
                        completed_at: "2026-03-10T12:00:02Z"
                        configuration:
                          custom_field_id: ai_account_score
                          enrichment_strategy: all
                          list_id: company_12345
                        created_at: "2026-03-10T12:00:00Z"
                        errors:
                          - code: insufficient_credits
                            title: "Not enough credits to run this enrichment: it needs 2.5, the account has 1.2 left."
                        status: failed
                      id: job_21662
                      type: enrichment_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                running:
                  summary: Job still running, its companies found but no counts yet
                  value:
                    data:
                      attributes:
                        completed_at: null
                        configuration:
                          custom_field_id: ai_account_score
                          enrichment_strategy: all
                          list_id: company_12345
                        created_at: "2026-03-10T12:00:00Z"
                        credits:
                          estimated: 250
                        errors: []
                        status: running
                      id: job_21662
                      type: enrichment_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/EnrichmentJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job status retrieved
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The job with the ID 'job_550e8400-e29b-41d4-a716-446655440000' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The job wasn't found: the ID is unknown, the job has expired, it belongs to another account, or it is another kind of job."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Get Company Enrichment Job Status
      tags:
        - Companies
        - Enrichment
        - v1
  /v1/companies/ips:
    get:
      description: |-
        Fetch known IP addresses associated with a given set of companies, enabling identification of web traffic and network activity linked to those organizations based on the provided company IDs.
        Credit Note: Retrieving IP address data consumes 1 credit per company, unless the company's IP data was already accessed within the last 12 months.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getCompanyIps
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: A comma-separated list of company IDs. Accepts up to 100 company IDs per request.
          example: 4b7e2c9f,5c8f3d0a
          in: query
          name: company_ids
          required: true
          schema:
            type: string
        - description: Maximum number of IP entries (single IPs or ranges) returned per company. A range counts as one entry regardless of how many addresses it covers. Ordered by confidence score, highest first. Each returned company reports its full entry count in `meta.total_count`. Capped at 500; values above the maximum are clamped to 500.
          in: query
          name: max_ip_addresses
          schema:
            default: 10
            maximum: 500
            minimum: 1
            type: integer
        - description: Specify which additional data should be attached to the result. When `company` is included, the full company attributes are inlined in the `relationships.company` field. Otherwise only `id` and `type` are returned.
          example: company
          in: query
          name: include
          schema:
            enum:
              - company
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      has_other_group_companies_with_ips: false
                      ips:
                        - 192.0.2.1-192.0.2.255
                        - 192.0.3.1-192.0.3.255
                      ips_extended:
                        - confidence_score: very_high
                          end_ip: 192.0.2.255
                          location:
                            city: Munich
                            country_code: DE
                            geonames_id: 2867714
                            region: Bavaria
                          start_ip: 192.0.2.1
                        - confidence_score: high
                          end_ip: 192.0.3.255
                          location:
                            city: Munich
                            country_code: DE
                            geonames_id: 2867714
                            region: Bavaria
                          start_ip: 192.0.3.1
                    id: 4b7e2c9f
                    meta:
                      total_count: 42
                    relationships:
                      company:
                        id: "129011"
                        type: company
                    type: company_ip
                meta:
                  credits:
                    charged: 1
                  request_id: abc-123
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CompanyIpV1"
                    type: array
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 1
                            type: number
                        required:
                          - charged
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                      - credits
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                missing_company_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The 'company_ids' parameter is required.
                too_many_company_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The 'company_ids' parameter accepts up to 100 company IDs.
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid request parameters
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Retrieve Company IPs
      tags:
        - Companies
        - v1
  /v1/companies/match:
    post:
      description: |-
        Find matching companies based on the provided input parameters.
        Returns matching company IDs and basic company information.
        **Important:** Each company object must include at least one of these required fields: `company_name`, `url`, `vat_id`, or `register_id`. Additional fields like email, phone, and address can improve match accuracy but cannot be used alone.
        Credit Note: Matches do not consume credits. Credits are only used if you subsequently retrieve deep data for a company you haven't accessed within the last 12 months.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: matchCompanies
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: Number of maximum results per company match input object
          example: 5
          in: query
          name: max_results_per_company
          schema:
            default: 5
            maximum: 20
            minimum: 1
            type: number
      requestBody:
        content:
          application/json:
            examples:
              dealfront_example:
                summary: Company match request example
                value:
                  companies:
                    - city: Karlsruhe
                      company_name: Dealfront Group GmbH
                      country: Germany
                      country_code: DE
                      email: info@dealfront.com
                      phone: +49 721 50057501
                      postal_code: "76131"
                      register_id: HRB711540
                      register_location: Mannheim
                      street: Durlacher Allee 73
                      street_name: Durlacher Allee
                      street_number: "73"
                      url: https://www.dealfront.com/welcome
                      vat_id: DE276265194
            schema:
              properties:
                companies:
                  items:
                    anyOf:
                      - required:
                          - company_name
                      - required:
                          - url
                      - required:
                          - vat_id
                      - required:
                          - register_id
                    properties:
                      city:
                        description: The city name.
                        example: Karlsruhe
                        type:
                          - string
                          - "null"
                      company_name:
                        description: The legal name of the company
                        example: Dealfront Group GmbH
                        type: string
                      country:
                        description: The country name.
                        example: Germany
                        type:
                          - string
                          - "null"
                      country_code:
                        description: This field indicates the country supported for Leadfeeder operations and requires a two letter country code according to ISO 3166 Alpha-2 (see [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)).
                        example: DE
                        type:
                          - string
                          - "null"
                      email:
                        description: A standard e-mail address.
                        example: info@leadfeeder.com
                        type: string
                      phone:
                        description: E.164 representation of a phone number.
                        example: +49 721 50057501
                        type: string
                      postal_code:
                        description: The postal code related to the company's physical location. The format varies by country.
                        example: "76131"
                        type:
                          - string
                          - "null"
                      register_id:
                        description: The company's registration number from the commercial register.
                        example: HRB711540
                        type:
                          - string
                          - "null"
                      register_location:
                        description: The company's register location.
                        example: Mannheim
                        type:
                          - string
                          - "null"
                      street:
                        description: The full street address line, including the street name and house number.
                        example: Durlacher Allee 73
                        type: string
                      street_name:
                        description: The street name part of the company's primary address.
                        example: Durlacher Allee
                        type:
                          - string
                          - "null"
                      street_number:
                        description: The street number part of the company's primary address. This field does not necessarily contain a number, values like 1st, 23-35 or 13A are also common.
                        example: "73"
                        type:
                          - string
                          - "null"
                      url:
                        description: The URL of the company website.
                        example: https://www.leadfeeder.com/welcome
                        type:
                          - string
                          - "null"
                      vat_id:
                        description: The company's VAT ID (tax ID).
                        example: DE276265194
                        type:
                          - string
                          - "null"
                    type: object
                  maxItems: 200
                  minItems: 1
                  type: array
              required:
                - companies
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                success:
                  value:
                    data:
                      - - attributes:
                            match_score: 0.95
                          id: "129011"
                          relationships:
                            company_summary:
                              attributes:
                                address:
                                  city: Karlsruhe
                                  country: Germany
                                  country_code: DE
                                employee_range: 101-500
                                industries:
                                  industry:
                                    - code: 1594.6.4
                                      name: Software Development
                                logo_url: https://app.dealfront.com/logos/200/694ad7b1-lf-logo-2026-04-16.jpg
                                meta:
                                  do_not_contact: false
                                  has_contacts: true
                                  has_fax: false
                                  has_financials_earnings: true
                                  has_financials_net_worth: true
                                  has_financials_revenue: true
                                  has_ip_addresses: true
                                  has_mail: true
                                  has_phones: true
                                  has_register_id: true
                                  has_social_accounts: true
                                  has_updated_id: false
                                  has_vat_id: true
                                name: Dealfront Group GmbH
                                register:
                                  status: active
                                revenue:
                                  currency: EUR
                                  estimated: false
                                  value: 13661000
                                  value_eur: 13661000
                                  year: 2022
                                role: group_member
                                url: https://www.dealfront.com
                              id: "129011"
                              relationships:
                                group_company:
                                  id: "159001425"
                                  type: company
                              type: company_summary
                          type: company_match
                        - attributes:
                            match_score: 0.8
                          id: "155950504"
                          relationships:
                            company_summary:
                              attributes:
                                address:
                                  city: Helsinki
                                  country: Finland
                                  country_code: FI
                                employee_range: 11-100
                                industries:
                                  industry:
                                    - code: 1594.6.4
                                      name: Software Development
                                logo_url: null
                                meta:
                                  do_not_contact: true
                                  has_contacts: false
                                  has_fax: true
                                  has_financials_earnings: true
                                  has_financials_net_worth: true
                                  has_financials_revenue: true
                                  has_ip_addresses: false
                                  has_mail: true
                                  has_phones: true
                                  has_register_id: true
                                  has_social_accounts: true
                                  has_updated_id: false
                                  has_vat_id: true
                                name: Leaxxxxxxx
                                register:
                                  status: active
                                revenue:
                                  currency: EUR
                                  estimated: true
                                  value: 5200000
                                  value_eur: 5200000
                                  year: 2022
                                role: group_member
                                url: https://www.leadfeeder.com
                              id: "155950504"
                              relationships:
                                group_company: null
                              type: company_summary
                          type: company_match
                    meta:
                      credits:
                        charged: 0
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    description: The results of the match request. This field contains a list of arrays, each containing a list of matching companies as summary objects, along with their match score. The order will be the same as the order of the input objects that were provided when the match request was created.
                    items:
                      items:
                        $ref: "#/components/schemas/CompanyMatchV1"
                      type: array
                    type: array
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 1
                            type: number
                        required:
                          - charged
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                      - credits
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                empty_body:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: "The request body requires at least the following field to be present: 'companies'."
                invalid_companies:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: "Each company must have at least one of the following fields required for matching: 'company_name', 'url', 'vat_id', or 'register_id'."
                invalid_max_results_per_company:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The value of `max_results_per_company` must be a positive integer between 1 and 10.
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid mandatory fields
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Match Companies
      tags:
        - Companies
        - v1
  /v1/companies/search:
    post:
      description: |-
        Perform search queries using criteria like name, location, industry, size or filters like `has_phone`.
        Returns matching company IDs and basic company information.
        **Important:** At least one search criterion must be provided: `search_terms`, `locations`, `industries`, `employee_ranges`, `revenue`, `icp_ids`, or `filters`. Each entry in `locations` must likewise carry at least one of `street`, `postal_code`, `city`, `country_code`, `region_code`, or `geo`.
        Credit Note: Searches do not consume credits. Credits are only used if you subsequently retrieve deep data for a company not accessed within the last 12 months.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: searchCompanies
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageCursor"
        - $ref: "#/components/parameters/PageSize"
      requestBody:
        content:
          application/json:
            examples:
              comprehensive_search:
                summary: Comprehensive search with multiple criteria
                value:
                  employee_ranges:
                    - 101-500
                    - 501-1.000
                  filters:
                    has_email: true
                    has_financials_revenue: true
                    has_phone: true
                    has_social_media_profiles: true
                  industries:
                    classification: nace
                    codes:
                      - "62.01"
                      - "62.02"
                  locations:
                    - city: Karlsruhe
                      country_code: DE
                  revenue:
                    min: 1000000
                  search_terms:
                    - leadfeeder.com
              icp_search:
                description: Return companies matching the saved ICP definitions. The filters of the referenced ICPs are combined using OR.
                summary: Search by Ideal Customer Profile
                value:
                  icp_ids:
                    - "6080"
                    - "6081"
              location_and_industry_search:
                summary: Search by location and industry
                value:
                  employee_ranges:
                    - 11-100
                  industries:
                    classification: nace
                    codes:
                      - "70.10"
                  locations:
                    - city: London
                      country_code: GB
              simple_name_search:
                summary: Simple search by company name
                value:
                  search_terms:
                    - Microsoft
            schema:
              anyOf:
                - required:
                    - search_terms
                - required:
                    - locations
                - required:
                    - industries
                - required:
                    - employee_ranges
                - required:
                    - revenue
                - required:
                    - icp_ids
                - required:
                    - filters
              properties:
                employee_ranges:
                  description: List of employee count ranges (e.g. 1-10, 101-500) to filter companies by size.
                  example:
                    - 101-500
                    - 501-1.000
                  items:
                    description: A range indicator of the approximate headcount for this company.
                    enum:
                      - 1-10
                      - 11-100
                      - 101-500
                      - 501-1.000
                      - 1.001-5.000
                      - 5.001-10.000
                      - 10.000+
                      - null
                    example: 101-500
                    type:
                      - string
                      - "null"
                  type: array
                filters:
                  description: Object containing additional boolean filters to refine the search results. All filters are combined using AND.
                  properties:
                    do_not_contact:
                      description: If true, only return companies that are marked as not to be contacted. This is typically used for compliance or CRM rules.
                      type: boolean
                    has_email:
                      description: If true, only return companies that have at least one known email address.
                      type: boolean
                    has_financials_earnings:
                      description: If true, only return companies with known earnings data.
                      type: boolean
                    has_financials_net_worth:
                      description: If true, only return companies with known net worth data.
                      type: boolean
                    has_financials_revenue:
                      description: If true, only return companies with known revenue data.
                      type: boolean
                    has_ip_addresses:
                      description: If true, only return companies with ip data.
                      type: boolean
                    has_phone:
                      description: If true, only return companies that have at least one landline or mobile number; a fax doesn't count.
                      type: boolean
                    has_social_media_profiles:
                      description: If true, filter for companies with at least one social media profile (LinkedIn, Facebook, etc.).
                      type: boolean
                  type: object
                icp_ids:
                  description: |-
                    List of Ideal Customer Profile (ICP) IDs to use as a filter. The search will return companies that match the criteria of at least one of the referenced ICPs (multiple ICPs are combined using OR).

                    ICP IDs can be retrieved from the **Retrieve Ideal Customer Profiles** endpoint. Unknown or invalid IDs are ignored; if none of the supplied IDs exist or have valid filters, the search returns no results.
                  example:
                    - "6080"
                    - "6081"
                  items:
                    minLength: 1
                    type: string
                  minItems: 1
                  type: array
                industries:
                  description: Object specifying industry classification filters. Use the `internal` classification by default; `nace` and `wz` are available when the user explicitly requests them.
                  properties:
                    classification:
                      default: internal
                      description: The industry classification system the `codes` belong to. Defaults to `internal` (Leadfeeder's own classification), which should be used unless the user explicitly asks for `nace` or `wz`.
                      enum:
                        - internal
                        - wz
                        - nace
                      example: internal
                      type: string
                    codes:
                      description: List of codes from the chosen classification. Look the codes up using the `Get Industries` endpoint (`GET /v1/industries`), passing the selected `classification` (`internal`, `nace`, or `wz`) to retrieve the available industries and their codes.
                      examples:
                        - - "1594"
                        - - "1594"
                          - 14.13.2048
                      items:
                        type: string
                      type: array
                  type: object
                locations:
                  description: Search in the company address. Multiple locations can be passed which will be combined as an OR query.
                  items:
                    anyOf:
                      - required:
                          - street
                      - required:
                          - postal_code
                      - required:
                          - city
                      - required:
                          - country_code
                      - required:
                          - region_code
                      - required:
                          - geo
                    properties:
                      city:
                        description: The city name.
                        example: Karlsruhe
                        type:
                          - string
                          - "null"
                      country_code:
                        description: This field indicates the country supported for Leadfeeder operations and requires a two letter country code according to ISO 3166 Alpha-2 (see [https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)).
                        example: DE
                        type:
                          - string
                          - "null"
                      geo:
                        properties:
                          distance:
                            default: 20
                            description: Maximum distance in kilometers from the geographical point described with latitude and longitude. The maximum value that can be used is 500 km.
                            example: 20
                            type: number
                          latitude:
                            description: The latitude of the geographical point.
                            example: 49.01
                            type:
                              - number
                              - "null"
                          longitude:
                            description: The longitude of the geographical point.
                            example: 8.43
                            type:
                              - number
                              - "null"
                        type: object
                      postal_code:
                        description: The postal code related to the company's physical location. The format varies by country.
                        example: "76131"
                        type:
                          - string
                          - "null"
                      region_code:
                        description: The code for the region. For European companies the NUTS1-3 schema is used. For companies outside of Europe values that comply with ISO 3166-2 with underscores are returned.
                        example: DE1
                        type:
                          - string
                          - "null"
                      street:
                        description: The full street address line, including the street name and house number.
                        example: Durlacher Allee 73
                        type: string
                    type: object
                  type: array
                revenue:
                  description: Defines a revenue range filter for companies. Specify at least one of min or max to set the lower or upper revenue boundary. Negative integer values are not supported. Revenue values are expressed in **EUR**.
                  properties:
                    max:
                      example: 5000000
                      type: integer
                    min:
                      example: 1000000
                      type: integer
                  type: object
                search_terms:
                  description: List of strings to match against company name, alternative names, trade name and domain(s).
                  example:
                    - Leadfeeder
                  items:
                    type: string
                  type: array
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    anyOf:
                      - items:
                          $ref: "#/components/schemas/CompanySummaryV1"
                        type: array
                      - items:
                          $ref: "#/components/schemas/MaskedCompanySummaryV1"
                        type: array
                    description: Accounts with an active platform subscription receive `CompanySummaryV1` objects, while those without receive `MaskedCompanySummaryV1` objects.
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 0
                            type: number
                        required:
                          - charged
                        type: object
                      pagination:
                        properties:
                          next_cursor:
                            example: dXNlcjpVMEc5V0ZYTlo
                            type:
                              - string
                              - "null"
                          total_count:
                            example: 1450
                            type: integer
                        required:
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - credits
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                empty_body:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: At least one field in the request body must be provided.
                invalid_icp_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The 'icp_ids' field must be a valid array of ICP IDs.
                invalid_parameter:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The search_terms field must be a valid array of strings.
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid mandatory fields
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Search Companies
      tags:
        - Companies
        - v1
  /v1/companies/signals:
    post:
      description: |-
        Retrieve signals for a specified set of company IDs. The response returns the signals linked to the provided companies.
        Credit Node: You are charged 1 credit per company if the company has signals and there was no active deep data access within the last 12 months. The number of signals returned does not affect credit usage — no additional credits are charged per signal.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: searchCompaniesSignals
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageCursor"
        - $ref: "#/components/parameters/PageSize"
      requestBody:
        content:
          application/json:
            examples:
              filtered_search:
                summary: Search with category filter
                value:
                  categories:
                    - business_expansion
                    - investment_activity
                  company_ids:
                    - "159001425"
                    - "129011"
            schema:
              additionalProperties: false
              properties:
                categories:
                  description: Filter to search for signals in specific categories
                  example:
                    - business_expansion
                    - investment_activity
                  items:
                    description: Categories to group similar signals together
                    enum:
                      - business_expansion
                      - competitive_landscape
                      - event_participation
                      - industry_recognition
                      - leadership_changes
                      - mergers_and_acquisitions
                      - customer_acquisition
                      - investment_activity
                      - product_and_service_development
                      - partnerships_collaborations
                      - job_ads
                      - regulatory_and_compliance_updates
                      - employee_count_changes
                      - revenue_changes
                    example: business_expansion
                    type: string
                    x-apidog-enum:
                      - description: Events that indicate the company's physical and operational growth through new office locations, facility upgrades, or increases in headcount, signalling expansion into new markets.
                        name: Business Expansion
                        value: business_expansion
                      - description: Events that reflect the competitive environment in which the company operates, including the identification of new or existing rivals that may influence strategic positioning.
                        name: Competitive Landscape
                        value: competitive_landscape
                      - description: Events capturing the company's active involvement in industry gatherings—such as trade shows, conferences, or exhibitions—to boost brand visibility and create networking opportunities.
                        name: Event Participation
                        value: event_participation
                      - description: Events where the company or its representatives receive formal accolades or awards, underscoring excellence and leadership within their industry.
                        name: Industry Recognition
                        value: industry_recognition
                      - description: Events that document shifts in the company's leadership structure, including new hires, promotions, departures, or retirements of key executives.
                        name: Leadership Changes
                        value: leadership_changes
                      - description: Events involving major corporate restructuring such as mergers, acquisitions, or asset sales that can fundamentally change the company's strategic direction.
                        name: Mergers and Acquisitions
                        value: mergers_and_acquisitions
                      - description: Events that demonstrate the company's success in expanding its client base through signing new clients or securing major contracts.
                        name: Customer Acquisition
                        value: customer_acquisition
                      - description: Events where the company invests resources in external opportunities—either by investing in other companies or assets, or by securing external financing—to drive growth.
                        name: Investment Activity
                        value: investment_activity
                      - description: Events showcasing the company's commitment to innovation, including the development of new products, enhancements to existing offerings, or integration of new services.
                        name: Product and Service Development
                        value: product_and_service_development
                      - description: Events where the company forms strategic alliances or partnerships with other organisations to leverage shared resources and expand market reach.
                        name: Partnerships and Collaborations
                        value: partnerships_collaborations
                      - description: Events that capture the posting of job openings by a company, reflecting hiring initiatives, workforce expansion, or strategic talent acquisition efforts across various departments and roles.
                        name: Job Ads
                        value: job_ads
                      - description: Events that indicate changes, announcements, or actions related to a company's adherence to legal, regulatory, or industry standards, including new filings, certifications, audits, or compliance measures that impact operational and strategic practices.
                        name: Regulatory and Compliance Updates
                        value: regulatory_and_compliance_updates
                      - description: Events that report a change in the company's employee count between two sets of annual figures, such as a year-on-year increase in headcount.
                        name: Employee Count Changes
                        value: employee_count_changes
                      - description: Events that report a change in the company's revenue between two sets of annual figures, such as a year-on-year increase in turnover.
                        name: Revenue Changes
                        value: revenue_changes
                  type: array
                company_ids:
                  description: Array of company IDs to filter signals for (mandatory)
                  example:
                    - "159001425"
                    - "129011"
                  items:
                    minLength: 1
                    type: string
                  minItems: 1
                  type: array
                event_date:
                  description: |
                    Filter signals by event date (YYYY-MM-DD). If both `from` and `to` are provided, `from` must be earlier than or equal to `to`.
                  properties:
                    from:
                      description: Start date for the event date filter (inclusive)
                      example: "2023-01-01"
                      format: date
                      type: string
                    to:
                      description: End date for the event date filter (inclusive)
                      example: "2023-12-31"
                      format: date
                      type: string
                  type: object
                publication_date:
                  description: |
                    Filter signals by publication date (YYYY-MM-DD). If both `from` and `to` are provided, `from` must be earlier than or equal to `to`.
                  properties:
                    from:
                      description: Start date for the publication date filter (inclusive)
                      example: "2023-01-01"
                      format: date
                      type: string
                    to:
                      description: End date for the publication date filter (inclusive)
                      example: "2023-12-31"
                      format: date
                      type: string
                  type: object
              required:
                - company_ids
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/SignalV1"
                    type: array
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 0
                            type: number
                        required:
                          - charged
                        type: object
                      pagination:
                        properties:
                          next_cursor:
                            example: dXNlcjpVMEc5V0ZYTlo
                            type:
                              - string
                              - "null"
                          total_count:
                            example: 1450
                            type: integer
                        required:
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - credits
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                invalid_parameter:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The 'categories' field must be a valid array of signal categories.
                missing_company_ids:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: The 'company_ids' field is required and cannot be left empty.
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid mandatory fields
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Search Company Signals
      tags:
        - Companies
        - v1
  /v1/companies/{id}:
    get:
      description: |-
        Fetch detailed information about a specific company, including firmographics and hierarchy information based on the provided Leadfeeder company_id.
        Credit Note: Accessing full deep data consumes 1 credit, unless the company was already accessed within the last 12 months.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getCompany
      parameters:
        - $ref: "#/components/parameters/CompanyId"
        - $ref: "#/components/parameters/AccountId"
        - description: Specify which additional data should be attached to the result.
          example: group_company
          in: query
          name: include
          schema:
            enum:
              - group_company
              - tags
              - lists
              - web_visits
              - icps
              - crm_connections
              - crm_connections.crm_record
              - crm_connections.crm_record.crm_owner
              - crm_suggestions
              - crm_suggestions.crm_record
              - crm_suggestions.crm_record.crm_owner
              - crm_group_connections
              - crm_group_connections.crm_connection
              - crm_group_connections.crm_connection.crm_record
              - crm_group_connections.crm_connection.crm_record.crm_owner
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CompanyV1"
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 1
                            type: number
                        required:
                          - charged
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                      - credits
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Get Company Details
      tags:
        - Companies
        - v1
    patch:
      description: |-
        Update a company.

        Applies a partial (merge-patch) update to the company: only the attributes named in the request are changed; any attribute you omit is left untouched. This endpoint updates the company's custom field values.

        To set custom field values, send them under `attributes.custom_fields`, keyed by custom field id. The value type is inferred from the field definition — no `type` is sent in the request. Only simple field types may be set: `text`, `number`, `boolean`, and `date`. Prompt-capable / computed types (`ai_*`, `contact_collection`) and unknown custom field ids are rejected with `400`. The updated values are returned inside the entity's `data` envelope.

        The request is validated strictly and applied atomically: if any field fails validation, the whole request is rejected and nothing is written. Per-field errors carry a `source.pointer` locating the offending field; when fields fail with different statuses, the response status is the most severe one (`403` over `400`). Sending `null` as a value clears that field (merge-patch delete); clearing a field with no stored value is a no-op. A maximum of 100 custom fields may be supplied per request.

        Credit Note: Updating a company does not consume credits.

        :::info
        Requires the `custom_fields:write` OAuth2 scope.
        :::
      operationId: updateCompany
      parameters:
        - $ref: "#/components/parameters/CompanyId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  custom_fields:
                    company_is-target-account:
                      value: true
                    company_notes:
                      value: Strategic account for FY26
                    company_score:
                      value: 87
                type: company
            schema:
              additionalProperties: false
              properties:
                data:
                  additionalProperties: false
                  properties:
                    attributes:
                      additionalProperties: false
                      properties:
                        custom_fields:
                          additionalProperties:
                            additionalProperties: false
                            properties:
                              value:
                                description: The value to set; its type must match the field definition (date is an ISO-8601 string). Send `null` to clear the field.
                                oneOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - type: "null"
                            required:
                              - value
                            type: object
                          description: "Custom field values to set, keyed by custom field id. Merge-patch: only the fields named here are changed; omitted fields are left untouched. Max 100 fields. Only text/number/boolean/date fields may be set; ai_* / contact_collection are rejected (400). Send `null` as a value to clear a field."
                          maxProperties: 100
                          minProperties: 1
                          type: object
                      required:
                        - custom_fields
                      type: object
                    type:
                      const: company
                      description: Must be 'company'.
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    custom_fields:
                      company_is-target-account:
                        value: true
                      company_notes:
                        value: Strategic account for FY26
                      company_score:
                        value: 87
                  id: "123"
                  type: company
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      attributes:
                        additionalProperties: false
                        properties:
                          custom_fields:
                            additionalProperties:
                              additionalProperties: false
                              properties:
                                value:
                                  description: The current value of the custom field, or `null` if the field was cleared in this request.
                                  oneOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                    - type: "null"
                              required:
                                - value
                              type: object
                            description: "The custom field values after the update, keyed by custom field id. Contains exactly the fields named in the request (merge-patch echo). Values are typed per the field definition: a number field yields a JSON number, a boolean field a JSON boolean, text and date fields a string (date is ISO-8601)."
                            maxProperties: 100
                            minProperties: 1
                            type: object
                        required:
                          - custom_fields
                        type: object
                      id:
                        description: The public id of the updated company (numeric value as a string).
                        type: string
                      type:
                        const: company
                        description: The entity type.
                        type: string
                    required:
                      - id
                      - type
                      - attributes
                    type: object
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Company updated
        "400":
          content:
            application/json:
              examples:
                too_many_fields:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.custom_fields must include at most 100 fields.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                type_mismatch:
                  value:
                    errors:
                      - code: bad_request
                        source:
                          pointer: /data/attributes/custom_fields/company_score
                        title: must be a number
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                unknown_field:
                  value:
                    errors:
                      - code: bad_request
                        source:
                          pointer: /data/attributes/custom_fields/company_does-not-exist
                        title: unknown custom field id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                unsupported_type:
                  value:
                    errors:
                      - code: bad_request
                        source:
                          pointer: /data/attributes/custom_fields/company_ai-summary
                        title: custom field type 'ai_text' is not writable
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Invalid request. Structural failures (missing/empty `custom_fields`, more than 100 fields, a field patch without a `value` key) are rejected at the entity route with code `invalid_parameter`. Per-field failures (unknown custom field id, unsupported field type `ai_*` / `contact_collection`, value type mismatch) are reported by the custom-fields backend with code `bad_request` and a `source.pointer` locating the field; one error object is returned per failing field.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              example:
                errors:
                  - code: access_denied
                    source:
                      pointer: /data/attributes/custom_fields/company_score
                    title: custom field is read-only
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The target custom field is read-only and cannot be set through the API.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: Value is invalid
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: A value passed the request-shape checks but failed domain validation at persistence time (rare).
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - custom_fields:write
      summary: Update a Company
      tags:
        - Companies
        - v1
  /v1/companies/{id}/financials:
    get:
      description: |-
        Returns all financial reports for a given company.
        Credit Note: Accessing financial data consumes 1 credit per company only if financial data is available and there was no active deep data access within the last 12 months. Once charged, no additional credits are consumed for accessing the same company’s financial data again within that 12-month period.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getCompanyFinancials
      parameters:
        - $ref: "#/components/parameters/CompanyId"
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CompanyFinancialsV1"
                    type: array
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 1
                            type: number
                        required:
                          - charged
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                      - credits
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Company Financial Reports
      tags:
        - Companies
        - v1
  /v1/companies/{id}/lists:
    delete:
      description: |-
        Allows the removal of this company from one or more lists.

        Credit Note: Removing a company from lists does not consume credits.

        :::info
        Requires the `companies:write` OAuth2 scope.
        :::
      operationId: removeCompanyFromLists
      parameters:
        - $ref: "#/components/parameters/CompanyId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                - id: company_123
                  type: list
                - id: company_456
                  type: list
            schema:
              properties:
                data:
                  description: Array of list references to remove the company from
                  items:
                    properties:
                      id:
                        description: The list ID (must be a company list, e.g., 'company_123')
                        type: string
                      type:
                        description: Must be 'list'
                        enum:
                          - list
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: abc123
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Company successfully removed from lists
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested list could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: List not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:write
      summary: Remove Company from Lists
      tags:
        - Companies
        - v1
    post:
      description: |-
        Allows the addition of this company to one or more lists. Since lists are a separate entity, the IDs that you must pass in this endpoint come from the **Retrieve Lists** and **Get List Details** endpoints.

        Credit Note: Adding a company to lists does not consume credits.

        :::info
        Requires the `companies:write` OAuth2 scope.
        :::
      operationId: addCompanyToLists
      parameters:
        - $ref: "#/components/parameters/CompanyId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                - id: company_123
                  type: list
                - id: company_456
                  type: list
            schema:
              properties:
                data:
                  description: Array of list references to add the company to
                  items:
                    properties:
                      id:
                        description: The list ID (must be a company list, e.g., 'company_123')
                        type: string
                      type:
                        description: Must be 'list'
                        enum:
                          - list
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - data
              type: object
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: abc123
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Company successfully added to lists
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested list could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: List not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:write
      summary: Add Company to Lists
      tags:
        - Companies
        - v1
  /v1/companies/{id}/tags:
    delete:
      description: |-
        Allows the unassignment of one or more tags from a given company.

        Credit Note: Unassigning tags from a company does not consume credits.

        :::info
        Requires the `companies:write` OAuth2 scope.
        :::
      operationId: unassignTagsFromCompany
      parameters:
        - $ref: "#/components/parameters/CompanyId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                - id: dd11fc370098e78e
                  type: tag
                - id: 8bb95c4d8e7c5fd2
                  type: tag
            schema:
              properties:
                data:
                  description: Array of tag references to unassign from the company
                  items:
                    properties:
                      id:
                        description: The tag ID
                        type: string
                      type:
                        description: Must be 'tag'
                        enum:
                          - tag
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Tags successfully unassigned from company
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:write
      summary: Unassign Tags from Company
      tags:
        - Companies
        - v1
    post:
      description: |-
        Allows the assignment of one or more tags to a given company. Since tags are a separate entity, the IDs that you must pass in this endpoint come from the **Retrieve Tags** and **Get Tag Details** endpoints.

        Credit Note: Assigning tags to a company does not consume credits.

        :::info
        Requires the `companies:write` OAuth2 scope.
        :::
      operationId: assignTagsToCompany
      parameters:
        - $ref: "#/components/parameters/CompanyId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                - id: dd11fc370098e78e
                  type: tag
                - id: 8bb95c4d8e7c5fd2
                  type: tag
            schema:
              properties:
                data:
                  description: Array of tag references to assign to the company
                  items:
                    properties:
                      id:
                        description: The tag ID
                        type: string
                      type:
                        description: Must be 'tag'
                        enum:
                          - tag
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - data
              type: object
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Tags successfully assigned to company
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:write
      summary: Assign Tags to Company
      tags:
        - Companies
        - v1
  /v1/connect-crm-record-jobs:
    post:
      description: |-
        Trigger an asynchronous job that connects a Leadfeeder company or contact to an existing record in the account's primary CRM. `remote_type` is required (no connection record exists yet to infer it from). The job runs in the background; poll `GET /v1/connect-crm-record-jobs/{job_id}` and, once it completes, fetch the connected record via the matching `GET /v1/crm-organizations/{id}`, `GET /v1/crm-leads/{id}` or `GET /v1/crm-contacts/{id}` endpoint using `result.crm_record.id`.

        Credit Note: Connecting a CRM record does not consume credits.

        :::info
        Requires the `crm_records:write` OAuth2 scope.
        :::
      operationId: createConnectCrmRecordJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      description: Provide exactly one of `company_id` or `contact_id` as the Leadfeeder side to connect.
                      oneOf:
                        - required:
                            - company_id
                        - required:
                            - contact_id
                      properties:
                        company_id:
                          description: The Leadfeeder company ID.
                          example: "159001425"
                          type: string
                        contact_id:
                          description: The Leadfeeder contact ID.
                          example: "3219787601"
                          type: string
                        crm_record_remote_id:
                          description: The target record's id in the third-party CRM (its native/remote id, not the Leadfeeder uuid returned by read endpoints). If the record is not yet mirrored in Leadfeeder it is synced on demand before connecting.
                          example: 0012o00003ABCdeEAF
                          type: string
                        remote_type:
                          description: The type of a CRM record.
                          enum:
                            - crm_organization
                            - crm_lead
                            - crm_contact
                          example: crm_organization
                          type: string
                          x-apidog-enum:
                            - description: An Organization / Account record (e.g. a Salesforce Account or a Pipedrive Organization).
                              value: crm_organization
                            - description: A Lead record, in CRMs that have a separate Lead object (e.g. Salesforce, Zoho).
                              value: crm_lead
                            - description: A Contact / Person record (e.g. a Salesforce Contact or a Pipedrive Person).
                              value: crm_contact
                      required:
                        - remote_type
                        - crm_record_remote_id
                      type: object
                    type:
                      const: connect_crm_record_job
                      example: connect_crm_record_job
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      company_id: "159001425"
                      crm_record_remote_id: 0012o00003ABCdeEAF
                      remote_type: crm_organization
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: connect_crm_record_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ConnectCRMRecordJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:write
      summary: Create Connect CRM Record Job
      tags:
        - CRM
        - v1
  /v1/connect-crm-record-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a job created via `POST /v1/connect-crm-record-jobs`. While `status` is `running`, `result` is omitted. Once `status` becomes `completed`, `result` references the affected CRM record and connection. On `failed`, `errors` describes the failure. Jobs are retained for 3 days after creation.

        Credit Note: Checking a job's status does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getConnectCrmRecordJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the connect CRM record job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: "2026-09-23T12:00:12Z"
                    configuration:
                      company_id: "159001425"
                      crm_record_remote_id: 0012o00003ABCdeEAF
                      remote_type: crm_organization
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    result:
                      crm_connection:
                        id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_connection
                      crm_record:
                        id: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_organization
                    status: completed
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: connect_crm_record_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ConnectCRMRecordJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get Connect CRM Record Job
      tags:
        - CRM
        - v1
  /v1/contacts:
    get:
      description: |-
        Retrieve a list of contacts based on the provided IDs.
        Credit Note: Each contact will contain its full deep data and it will consume 1 credit, unless the contact has already been accessed within the last 12 months.

        :::info
        Requires the `contacts:read` OAuth2 scope.
        :::
      operationId: getContacts
      parameters:
        - $ref: "#/components/parameters/ContactIds"
        - $ref: "#/components/parameters/AccountId"
        - description: Specify which additional data should be attached to the result.
          example: company
          in: query
          name: include
          schema:
            enum:
              - company
              - lists
              - buyer_personas
              - crm_connections
              - crm_connections.crm_record
              - crm_connections.crm_record.crm_owner
              - crm_suggestions
              - crm_suggestions.crm_record
              - crm_suggestions.crm_record.crm_owner
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/ContactV1"
                    type: array
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 1
                            type: number
                        required:
                          - charged
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                      - credits
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Returns the contact details for the specified IDs. If `include=company` is supplied, the responses include the company details. If no contact is found for a certain ID, the `data` field will not contain an entry for that ID.
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request_parameters
                    title: "Missing required request parameters: [ids]"
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid mandatory fields
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:read
      summary: Retrieve Contacts
      tags:
        - Contacts
        - v1
  /v1/contacts/find-contact-data-jobs:
    post:
      description: |-
        Trigger an asynchronous job to enrich the given contacts with email and phone data. Accepts either explicit `contact_ids` or a `list_id` to target an entire list. The job runs in the background; poll the status endpoint to check progress.
        Credit Note: Credits are consumed as contacts are enriched.

        :::info
        Requires the `contacts:read` OAuth2 scope.
        :::
      operationId: createFindContactDataJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              by_contact_ids:
                summary: Target specific contacts
                value:
                  data:
                    attributes:
                      contact_ids:
                        - "1515122"
                        - "90571874"
                    type: find_contact_data_job
              by_list:
                summary: Target an entire list
                value:
                  data:
                    attributes:
                      list_id: contact_12345
                    type: find_contact_data_job
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      description: Provide exactly one of `contact_ids` or `list_id`. Use `enrichment_type` to scope which data is revealed.
                      oneOf:
                        - required:
                            - contact_ids
                        - required:
                            - list_id
                      properties:
                        contact_ids:
                          description: List of contact IDs to enrich with email and phone data. Each ID is a string representation of the contact's numeric ID. Mutually exclusive with `list_id`.
                          example:
                            - "1515122"
                            - "90571874"
                          items:
                            type: string
                          maxItems: 100
                          minItems: 1
                          type: array
                        enrichment_type:
                          allOf:
                            - description: Which contact data to reveal. Email is always included, so there is no phone-only option.
                              enum:
                                - email_only
                                - full
                              example: full
                              type: string
                              x-apidog-enum:
                                - description: Reveal email addresses only
                                  value: email_only
                                - description: Reveal both email and phone
                                  value: full
                          default: full
                          description: Which data to reveal. `email_only` reveals email addresses only; `full` (the default when omitted) reveals both email and phone.
                        list_id:
                          description: The list of contacts to enrich. Mutually exclusive with `contact_ids`.
                          example: contact_12345
                          type: string
                      type: object
                    type:
                      default: find_contact_data_job
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              examples:
                empty_list:
                  summary: List with no contacts
                  value:
                    data:
                      attributes:
                        completed_at: "2026-03-10T12:00:00Z"
                        configuration:
                          list_id: contact_12345
                        created_at: "2026-03-10T12:00:00Z"
                        credits:
                          consumed: 0
                          estimated: 0
                        errors: []
                        status: completed
                        summary:
                          failed: 0
                          succeeded: 0
                          total: 0
                      id: job_550e8400
                      type: find_contact_data_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                running:
                  summary: Job started
                  value:
                    data:
                      attributes:
                        completed_at: null
                        configuration:
                          contact_ids:
                            - "1515122"
                            - "90571874"
                        created_at: "2026-03-10T12:00:00Z"
                        errors: []
                        status: running
                      id: job_550e8400
                      type: find_contact_data_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/FindContactDataJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started. A `list_id` whose list has no contacts returns a job that has already completed and costs no credits.
        "400":
          content:
            application/json:
              examples:
                invalid_request_body:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must include a 'data.attributes' object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Invalid request body envelope
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              examples:
                empty_contact_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: contact_ids size cannot be less than 1
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_input:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: either contact_ids or list_id must be provided
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                mutually_exclusive:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Provide either contact_ids or list_id, not both.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_contact_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The number of contact IDs supplied exceeds the permitted limit of 100.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable content — request body is well-formed but fails domain validation
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:read
      summary: Create Find Contact Data Job
      tags:
        - Contacts
        - Enrichment
        - v1
  /v1/contacts/find-contact-data-jobs/estimate:
    post:
      description: |-
        Estimate the credit cost for enriching contacts with email and phone data. Accepts either explicit `contact_ids` or a `list_id` to target an entire list. Returns the number of eligible contacts and the estimated total credits that would be consumed.
        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `contacts:read` OAuth2 scope.
        :::
      operationId: estimateFindContactDataJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              by_contact_ids:
                summary: Target specific contacts
                value:
                  data:
                    attributes:
                      contact_ids:
                        - "1515122"
                        - "90571874"
                    type: find_contact_data_job
              by_list:
                summary: Target an entire list
                value:
                  data:
                    attributes:
                      list_id: contact_12345
                    type: find_contact_data_job
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      description: Provide exactly one of `contact_ids` or `list_id`. Use `enrichment_type` to scope which data is revealed.
                      oneOf:
                        - required:
                            - contact_ids
                        - required:
                            - list_id
                      properties:
                        contact_ids:
                          description: List of contact IDs to enrich with email and phone data. Each ID is a string representation of the contact's numeric ID. Mutually exclusive with `list_id`.
                          example:
                            - "1515122"
                            - "90571874"
                          items:
                            type: string
                          maxItems: 100
                          minItems: 1
                          type: array
                        enrichment_type:
                          allOf:
                            - description: Which contact data to reveal. Email is always included, so there is no phone-only option.
                              enum:
                                - email_only
                                - full
                              example: full
                              type: string
                              x-apidog-enum:
                                - description: Reveal email addresses only
                                  value: email_only
                                - description: Reveal both email and phone
                                  value: full
                          default: full
                          description: Which data to reveal. `email_only` reveals email addresses only; `full` (the default when omitted) reveals both email and phone.
                        list_id:
                          description: The list of contacts to enrich. Mutually exclusive with `contact_ids`.
                          example: contact_12345
                          type: string
                      type: object
                    type:
                      default: find_contact_data_job
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    eligible_contacts: 2
                    estimated_total_credits: 2
                  id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                  type: find_contact_data_job_estimate
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    properties:
                      attributes:
                        properties:
                          eligible_contacts:
                            description: Number of contacts eligible for enrichment
                            example: 2
                            type: integer
                          estimated_total_credits:
                            description: Estimated credits that would be consumed. Contact enrichment is priced per contact at a fractional rate, so this can be a decimal.
                            example: 0.4
                            type: number
                        required:
                          - estimated_total_credits
                          - eligible_contacts
                        type: object
                      id:
                        description: Unique estimate identifier
                        example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        format: uuid
                        type: string
                      type:
                        default: find_contact_data_job_estimate
                        type: string
                    required:
                      - type
                      - id
                      - attributes
                    type: object
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Estimate calculated successfully
        "400":
          content:
            application/json:
              examples:
                invalid_request_body:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must include a 'data.attributes' object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Invalid request body envelope
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              examples:
                empty_contact_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: contact_ids size cannot be less than 1
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_input:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: either contact_ids or list_id must be provided
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                mutually_exclusive:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Provide either contact_ids or list_id, not both.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_contact_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The number of contact IDs supplied exceeds the permitted limit of 100.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable content — request body is well-formed but fails domain validation
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:read
      summary: Estimate Find Contact Data Job
      tags:
        - Contacts
        - Enrichment
        - v1
  /v1/contacts/find-contact-data-jobs/{job_id}:
    get:
      description: |-
        Retrieve the current status of a Find Contact Data job. Returns progress counters, credit consumption, and any errors.
        Jobs are retained for 7 days after completion.
        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `contacts:read` OAuth2 scope.
        :::
      operationId: getFindContactDataJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the enrichment job
          example: job_550e8400
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                completed:
                  summary: Completed job
                  value:
                    data:
                      attributes:
                        completed_at: "2026-03-10T12:01:42Z"
                        configuration:
                          contact_ids:
                            - "1515122"
                            - "90571874"
                        created_at: "2026-03-10T12:00:00Z"
                        credits:
                          consumed: 2
                          estimated: 2
                        errors: []
                        status: completed
                        summary:
                          failed: 0
                          succeeded: 2
                          total: 2
                      id: job_550e8400
                      type: find_contact_data_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed:
                  summary: Failed job
                  value:
                    data:
                      attributes:
                        completed_at: "2026-03-10T12:01:42Z"
                        configuration:
                          contact_ids:
                            - "1515122"
                            - "90571874"
                        created_at: "2026-03-10T12:00:00Z"
                        credits:
                          consumed: 0
                        errors:
                          - code: insufficient_credits
                            title: There weren't enough credits to find contact data.
                        status: failed
                        summary:
                          failed: 2
                          succeeded: 0
                          total: 2
                      id: job_550e8400
                      type: find_contact_data_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/FindContactDataJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job status retrieved
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:read
      summary: Get Find Contact Data Job Status
      tags:
        - Contacts
        - Enrichment
        - v1
  /v1/contacts/search:
    post:
      description: |-
        Search for contacts based on the provided search parameters and returns contact summary objects.
        Credit Note: Searches do not consume credits. Credits are only used if you subsequently retrieve deep data for a contact that has not been accessed within the last 12 months.

        :::info
        Requires the `contacts:read` OAuth2 scope.
        :::
      operationId: searchContacts
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageCursor"
        - $ref: "#/components/parameters/PageSize"
      requestBody:
        content:
          application/json:
            examples:
              basic_name_search:
                description: Simple search for contacts by name
                summary: Search by contact name
                value:
                  search_terms:
                    - John Smith
              buyer_persona_search:
                description: Return contacts matching the saved buyer persona definitions. The filters of the referenced buyer personas are combined using OR.
                summary: Search by buyer persona
                value:
                  buyer_persona_ids:
                    - "7421"
                    - "7422"
              company_location_search:
                description: Return contacts whose company is in Naples (Italy) OR Berlin (Germany). Within each location object city and country_code are combined with AND.
                summary: Search by company location
                value:
                  company_locations:
                    - city: Naples
                      country_code: IT
                    - city: Berlin
                      country_code: DE
              comprehensive_search:
                description: Search with multiple criteria and filters
                summary: Comprehensive search with filters
                value:
                  departments:
                    - marketing_department
                  filters:
                    has_email: true
                    has_phones: true
                  hierarchy_levels:
                    - top_management
                    - middle_management
                  search_terms:
                    - John Smith
              email_search:
                description: Find contacts with specific email addresses
                summary: Search by email domain
                value:
                  emails:
                    - kevin.mcintyre@leadfeeder.com
                    - markus.blaser@siemens.com
                  filters:
                    has_social_media_profiles: true
              phone_search:
                description: Return contacts who have one of the supplied phone numbers. Numbers must be in E.164 format.
                summary: Search by phone number
                value:
                  phones:
                    - "+4972150057501"
                    - "+4972150057209"
              position_and_company_search:
                description: Find CEOs and CTOs in specific companies
                summary: Search by position within specific companies
                value:
                  company_ids:
                    - "159001425"
                    - "129011"
                  positions:
                    - CEO
                    - CTO
            schema:
              properties:
                affiliation:
                  description: Determines how the contact is related to the company.
                  enum:
                    - employee
                    - group_employee
                    - related
                  example: employee
                  type:
                    - string
                    - "null"
                  x-apidog-enum:
                    - description: The contact is an employee of the company.
                      name: Employee
                      value: employee
                    - description: The contact works for some organization in the same company group.
                      name: Group employee
                      value: group_employee
                    - description: The contact has some relation to the company.
                      name: Related
                      value: related
                buyer_persona_ids:
                  description: |-
                    List of buyer persona IDs to use as a filter. The search will return contacts that match the criteria of at least one of the referenced buyer personas (multiple personas are combined using OR).

                    Buyer persona IDs can be retrieved from the **Retrieve Buyer Personas** endpoint. Unknown or invalid IDs are ignored; if none of the supplied IDs exist or have valid filters, the search returns no results.
                  example:
                    - "7421"
                    - "7422"
                  items:
                    minLength: 1
                    type: string
                  minItems: 1
                  type: array
                company_ids:
                  example:
                    - "129011"
                    - "159001425"
                  items:
                    description: The Leadfeeder company ID.
                    example: "129011"
                    type: string
                  type: array
                company_locations:
                  description: |-
                    Filter contacts by their company's location. Each object can specify a `city`, a `country_code`, or both. Within a single object the conditions are combined with AND; across multiple objects at least one must match (OR).
                    Both fields are matched case-insensitively; the full value must be provided.
                  example:
                    - city: Naples
                      country_code: IT
                    - city: Berlin
                      country_code: DE
                  items:
                    minProperties: 1
                    properties:
                      city:
                        example: Naples
                        minLength: 1
                        type: string
                      country_code:
                        example: IT
                        minLength: 1
                        type: string
                    type: object
                  minItems: 1
                  type: array
                departments:
                  description: The departments the contact works in within the company.
                  example:
                    - marketing_department
                    - students_apprentices
                  items:
                    enum:
                      - management_department
                      - sales_department
                      - it_department
                      - business_project_management_department
                      - finance_controlling_department
                      - engineering_department
                      - hr_department
                      - marketing_department
                      - consulting_department
                      - media_communications_department
                      - support_department
                      - rd_department
                      - students_apprentices
                      - production_department
                      - logistics_department
                      - legal_compliance_department
                      - qm_department
                      - product_department
                      - purchasing_department
                    type: string
                  type: array
                  x-apidog-enum:
                    - name: Management Department
                      value: management_department
                    - name: Sales Department
                      value: sales_department
                    - name: IT Department
                      value: it_department
                    - name: Business Project Management Department
                      value: business_project_management_department
                    - name: Finance Controlling Department
                      value: finance_controlling_department
                    - name: Engineering Department
                      value: engineering_department
                    - name: HR Department
                      value: hr_department
                    - name: Marketing Department
                      value: marketing_department
                    - name: Consulting Department
                      value: consulting_department
                    - name: Media Communications Department
                      value: media_communications_department
                    - name: Support Department
                      value: support_department
                    - name: RD Department
                      value: rd_department
                    - name: Students Apprentices
                      value: students_apprentices
                    - name: Production Department
                      value: production_department
                    - name: Logistics Department
                      value: logistics_department
                    - name: Legal Compliance Department
                      value: legal_compliance_department
                    - name: QM Department
                      value: qm_department
                    - name: Product Department
                      value: product_department
                    - name: Purchasing Department
                      value: purchasing_department
                emails:
                  example:
                    - john.doe@example.com
                  items:
                    type: string
                  type: array
                filters:
                  description: Filter down search results (combined with AND).
                  properties:
                    has_email:
                      type: boolean
                    has_phones:
                      description: If true, only return contacts that have at least one landline or mobile number; a fax doesn't count.
                      type: boolean
                    has_social_media_profiles:
                      type: boolean
                  type: object
                hierarchy_levels:
                  example:
                    - top_management
                    - middle_management
                  items:
                    description: The hierarchy level the contact has in the company.
                    enum:
                      - employees
                      - top_management
                      - middle_management
                      - null
                    example: employees
                    type:
                      - string
                      - "null"
                  type: array
                phones:
                  description: Filter contacts by phone number. Each value must be a phone number in [E.164 format](https://en.wikipedia.org/wiki/E.164) (e.g. `+4972150057501`). Returns contacts who have at least one of the supplied phone numbers.
                  example:
                    - "+4972150057501"
                    - "+4972150057209"
                  items:
                    pattern: ^\+[1-9]\d{1,14}$
                    type: string
                  minItems: 1
                  type: array
                positions:
                  description: Filter contacts by position. Values are matched as phrases against both the original-language position and its English translation — "Chief" matches "Chief Executive Officer". Multiple values are combined with OR. No typo tolerance — synonyms must be listed explicitly.
                  example:
                    - CEO
                    - CTO
                  items:
                    type: string
                  type: array
                search_terms:
                  description: Search in contact fullname and title fields.
                  example:
                    - John Doe
                  items:
                    type: string
                  type: array
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    anyOf:
                      - items:
                          $ref: "#/components/schemas/ContactSummaryV1"
                        type: array
                      - items:
                          $ref: "#/components/schemas/MaskedContactSummaryV1"
                        type: array
                    description: Accounts with an active platform subscription receive `ContactSummaryV1` objects, while those without receive `MaskedContactSummaryV1` objects.
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 0
                            type: number
                        required:
                          - charged
                        type: object
                      pagination:
                        properties:
                          next_cursor:
                            example: dXNlcjpVMEc5V0ZYTlo
                            type:
                              - string
                              - "null"
                          total_count:
                            example: 1450
                            type: integer
                        required:
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - credits
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                empty_body:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: At least one field in the request body must be provided.
                invalid_buyer_persona_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The 'buyer_persona_ids' field must be a valid array of buyer persona IDs.
                invalid_parameter:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The search_terms field must be a valid array of strings.
                invalid_phones:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The 'phones' field must be a valid array of E.164-formatted phone numbers.
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid mandatory fields
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:read
      summary: Search Contacts
      tags:
        - Contacts
        - v1
  /v1/contacts/{id}:
    get:
      description: |-
        Get the details of a contact by ID.
        Credit Note: Accessing full deep data consumes 1 credit, unless the contact was already accessed within the last 12 months.

        :::info
        Requires the `contacts:read` OAuth2 scope.
        :::
      operationId: getContact
      parameters:
        - $ref: "#/components/parameters/ContactId"
        - $ref: "#/components/parameters/AccountId"
        - description: Specify which additional data should be attached to the result.
          example: company
          in: query
          name: include
          schema:
            enum:
              - company
              - lists
              - buyer_personas
              - crm_connections
              - crm_connections.crm_record
              - crm_connections.crm_record.crm_owner
              - crm_suggestions
              - crm_suggestions.crm_record
              - crm_suggestions.crm_record.crm_owner
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ContactV1"
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 1
                            type: number
                        required:
                          - charged
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                      - credits
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Returns the contact details for the specified ID. If `include=company` is supplied, the response includes the company details. If no contact is found for the specified ID, a `404` error is raised.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:read
      summary: Get Contact Details
      tags:
        - Contacts
        - v1
    patch:
      description: |-
        Update a contact.

        Applies a partial (merge-patch) update to the contact: only the attributes named in the request are changed; any attribute you omit is left untouched. This endpoint updates the contact's custom field values.

        To set custom field values, send them under `attributes.custom_fields`, keyed by custom field id. The value type is inferred from the field definition — no `type` is sent in the request. Only simple field types may be set: `text`, `number`, `boolean`, and `date`. Prompt-capable / computed types (`ai_*`, `contact_collection`) and unknown custom field ids are rejected with `400`. The updated values are returned inside the entity's `data` envelope.

        The request is validated strictly and applied atomically: if any field fails validation, the whole request is rejected and nothing is written. Per-field errors carry a `source.pointer` locating the offending field; when fields fail with different statuses, the response status is the most severe one (`403` over `400`). Sending `null` as a value clears that field (merge-patch delete); clearing a field with no stored value is a no-op. A maximum of 100 custom fields may be supplied per request.

        Credit Note: Updating a contact does not consume credits.

        :::info
        Requires the `custom_fields:write` OAuth2 scope.
        :::
      operationId: updateContact
      parameters:
        - $ref: "#/components/parameters/ContactId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  custom_fields:
                    contact_is-decision-maker:
                      value: true
                    contact_lead-score:
                      value: 42
                    contact_notes:
                      value: Met at trade fair
                type: contact
            schema:
              additionalProperties: false
              properties:
                data:
                  additionalProperties: false
                  properties:
                    attributes:
                      additionalProperties: false
                      properties:
                        custom_fields:
                          additionalProperties:
                            additionalProperties: false
                            properties:
                              value:
                                description: The value to set; its type must match the field definition (date is an ISO-8601 string). Send `null` to clear the field.
                                oneOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                  - type: "null"
                            required:
                              - value
                            type: object
                          description: "Custom field values to set, keyed by custom field id. Merge-patch: only the fields named here are changed; omitted fields are left untouched. Max 100 fields. Only text/number/boolean/date fields may be set; ai_* / contact_collection are rejected (400). Send `null` as a value to clear a field."
                          maxProperties: 100
                          minProperties: 1
                          type: object
                      required:
                        - custom_fields
                      type: object
                    type:
                      const: contact
                      description: Must be 'contact'.
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    custom_fields:
                      contact_is-decision-maker:
                        value: true
                      contact_lead-score:
                        value: 42
                      contact_notes:
                        value: Met at trade fair
                  id: "456"
                  type: contact
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    additionalProperties: false
                    properties:
                      attributes:
                        additionalProperties: false
                        properties:
                          custom_fields:
                            additionalProperties:
                              additionalProperties: false
                              properties:
                                value:
                                  description: The current value of the custom field, or `null` if the field was cleared in this request.
                                  oneOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                    - type: "null"
                              required:
                                - value
                              type: object
                            description: "The custom field values after the update, keyed by custom field id. Contains exactly the fields named in the request (merge-patch echo). Values are typed per the field definition: a number field yields a JSON number, a boolean field a JSON boolean, text and date fields a string (date is ISO-8601)."
                            maxProperties: 100
                            minProperties: 1
                            type: object
                        required:
                          - custom_fields
                        type: object
                      id:
                        description: The public id of the updated contact (numeric value as a string).
                        type: string
                      type:
                        const: contact
                        description: The entity type.
                        type: string
                    required:
                      - id
                      - type
                      - attributes
                    type: object
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Contact updated
        "400":
          content:
            application/json:
              examples:
                too_many_fields:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.custom_fields must include at most 100 fields.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                type_mismatch:
                  value:
                    errors:
                      - code: bad_request
                        source:
                          pointer: /data/attributes/custom_fields/contact_lead-score
                        title: must be a number
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                unknown_field:
                  value:
                    errors:
                      - code: bad_request
                        source:
                          pointer: /data/attributes/custom_fields/contact_does-not-exist
                        title: unknown custom field id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                unsupported_type:
                  value:
                    errors:
                      - code: bad_request
                        source:
                          pointer: /data/attributes/custom_fields/contact_ai-summary
                        title: custom field type 'ai_text' is not writable
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Invalid request. Structural failures (missing/empty `custom_fields`, more than 100 fields, a field patch without a `value` key) are rejected at the entity route with code `invalid_parameter`. Per-field failures (unknown custom field id, unsupported field type `ai_*` / `contact_collection`, value type mismatch) are reported by the custom-fields backend with code `bad_request` and a `source.pointer` locating the field; one error object is returned per failing field.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              example:
                errors:
                  - code: access_denied
                    source:
                      pointer: /data/attributes/custom_fields/contact_lead-score
                    title: custom field is read-only
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The target custom field is read-only and cannot be set through the API.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: Value is invalid
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: A value passed the request-shape checks but failed domain validation at persistence time (rare).
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - custom_fields:write
      summary: Update a Contact
      tags:
        - Contacts
        - v1
  /v1/contacts/{id}/lists:
    delete:
      description: |-
        Allows the removal of this contact from one or more lists.

        Credit Note: Removing a contact from lists does not consume credits.

        :::info
        Requires the `contacts:write` OAuth2 scope.
        :::
      operationId: removeContactFromLists
      parameters:
        - $ref: "#/components/parameters/ContactId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                - id: contact_123
                  type: list
                - id: contact_456
                  type: list
            schema:
              properties:
                data:
                  description: Array of list references to remove the contact from
                  items:
                    properties:
                      id:
                        description: The list ID (must be a contact list, e.g., 'contact_123')
                        type: string
                      type:
                        description: Must be 'list'
                        enum:
                          - list
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: abc123
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Contact successfully removed from lists
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested list could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: List not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:write
      summary: Remove Contact from Lists
      tags:
        - Contacts
        - v1
    post:
      description: |-
        Allows the addition of this contact to one or more lists. Since lists are a separate entity, the IDs that you must pass in this endpoint come from the **Retrieve Lists** and **Get List Details** endpoints.

        Credit Note: Adding a contact to lists does not consume credits.

        :::info
        Requires the `contacts:write` OAuth2 scope.
        :::
      operationId: addContactToLists
      parameters:
        - $ref: "#/components/parameters/ContactId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                - id: contact_123
                  type: list
                - id: contact_456
                  type: list
            schema:
              properties:
                data:
                  description: Array of list references to add the contact to
                  items:
                    properties:
                      id:
                        description: The list ID (must be a contact list, e.g., 'contact_123')
                        type: string
                      type:
                        description: Must be 'list'
                        enum:
                          - list
                        type: string
                    required:
                      - type
                      - id
                    type: object
                  type: array
              required:
                - data
              type: object
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: abc123
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Contact successfully added to lists
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested list could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: List not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - contacts:write
      summary: Add Contact to Lists
      tags:
        - Contacts
        - v1
  /v1/countries:
    get:
      description: |-
        Returns the full list of countries with their administrative regions.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getCountries
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      code: AT
                      name: Austria
                      regions:
                        - code: AT11
                          name: Burgenland
                        - code: AT12
                          name: Lower Austria
                        - code: AT13
                          name: Vienna
                    id: AT
                    type: country
                  - attributes:
                      code: DE
                      name: Germany
                      regions:
                        - code: DE1
                          name: Baden-Württemberg
                        - code: DE2
                          name: Bavaria
                        - code: DE3
                          name: Berlin
                    id: DE
                    type: country
                  - attributes:
                      code: US
                      name: United States
                      regions:
                        - code: US_AK
                          name: Alaska
                        - code: US_AL
                          name: Alabama
                        - code: US_AR
                          name: Arkansas
                    id: US
                    type: country
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CountryV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Countries with their administrative regions
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "503":
          content:
            application/json:
              example:
                errors:
                  - code: service_unavailable
                    title: Service temporarily unavailable. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Service unavailable
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Get Countries with Regions
      tags:
        - Reference Data
        - Companies
        - v1
  /v1/create-crm-contact-jobs:
    post:
      description: |-
        Trigger an asynchronous job that creates a CRM Contact record in the account's primary CRM from a Leadfeeder contact, and connects the contact to it. Field mappings configured for the integration are respected. The job runs in the background; poll `GET /v1/create-crm-contact-jobs/{job_id}` and, once it completes, fetch the created record via `GET /v1/crm-contacts/{id}` using `result.crm_record.id`.

        Credit Note: Creating a CRM record from a contact consumes 1 credit, unless the contact was already accessed within the last 12 months. The job's `credits` reports the charge.

        :::info
        Requires the `crm_records:write` OAuth2 scope.
        :::
      operationId: createCrmContactJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        contact_id:
                          description: The Leadfeeder contact ID.
                          example: "3219787601"
                          type: string
                        crm_owner_id:
                          description: "Optional owner for the created record: the Leadfeeder id (uuid) of a CRM user."
                          example: 4d5e6f70-8192-4a3b-9c4d-5e6f708192a3
                          type: string
                        custom_values:
                          additionalProperties: true
                          description: Optional CRM field values to set on the created record, keyed by the field's API name in the connected CRM (e.g. `Industry__c` in Salesforce).
                          example:
                            Industry__c: SaaS
                          type: object
                      required:
                        - contact_id
                      type: object
                    type:
                      const: create_crm_contact_job
                      example: create_crm_contact_job
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      contact_id: "3219787601"
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: create_crm_contact_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CreateCRMContactJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:write
      summary: Create CRM Contact Job
      tags:
        - CRM
        - v1
  /v1/create-crm-contact-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a job created via `POST /v1/create-crm-contact-jobs`. While `status` is `running`, `result` is omitted. Once `status` becomes `completed`, `result` references the affected CRM record and connection. On `failed`, `errors` describes the failure. Jobs are retained for 3 days after creation.

        Credit Note: Checking a job's status does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getCrmContactJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the create CRM contact job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: "2026-09-23T12:00:12Z"
                    configuration:
                      contact_id: "3219787601"
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    result:
                      crm_connection:
                        id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_connection
                      crm_record:
                        id: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_contact
                    status: completed
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: create_crm_contact_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CreateCRMContactJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get CRM Contact Job
      tags:
        - CRM
        - v1
  /v1/create-crm-lead-jobs:
    post:
      description: |-
        Trigger an asynchronous job that creates a CRM Lead record in the account's primary CRM from a Leadfeeder company **or** contact, depending on what the target CRM supports for Lead creation, and connects it. Provide exactly one of `company_id` or `contact_id`. Field mappings configured for the integration are respected. The job runs in the background; poll `GET /v1/create-crm-lead-jobs/{job_id}` and, once it completes, fetch the created record via `GET /v1/crm-leads/{id}` using `result.crm_record.id`.

        Credit Note: Creating a CRM record from a company or contact consumes 1 credit, unless it was already accessed within the last 12 months. The job's `credits` reports the charge.

        :::info
        Requires the `crm_records:write` OAuth2 scope.
        :::
      operationId: createCrmLeadJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      description: Provide exactly one of `company_id` or `contact_id`.
                      oneOf:
                        - required:
                            - company_id
                        - required:
                            - contact_id
                      properties:
                        company_id:
                          description: The Leadfeeder company ID.
                          example: "159001425"
                          type: string
                        contact_id:
                          description: The Leadfeeder contact ID.
                          example: "3219787601"
                          type: string
                        crm_owner_id:
                          description: "Optional owner for the created record: the Leadfeeder id (uuid) of a CRM user."
                          example: 4d5e6f70-8192-4a3b-9c4d-5e6f708192a3
                          type: string
                        custom_values:
                          additionalProperties: true
                          description: Optional CRM field values to set on the created record, keyed by the field's API name in the connected CRM (e.g. `Industry__c` in Salesforce).
                          example:
                            Industry__c: SaaS
                          type: object
                      type: object
                    type:
                      const: create_crm_lead_job
                      example: create_crm_lead_job
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      contact_id: "3219787601"
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: create_crm_lead_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CreateCRMLeadJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:write
      summary: Create CRM Lead Job
      tags:
        - CRM
        - v1
  /v1/create-crm-lead-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a job created via `POST /v1/create-crm-lead-jobs`. While `status` is `running`, `result` is omitted. Once `status` becomes `completed`, `result` references the affected CRM record and connection. On `failed`, `errors` describes the failure. Jobs are retained for 3 days after creation.

        Credit Note: Checking a job's status does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getCrmLeadJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the create CRM lead job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: "2026-09-23T12:00:12Z"
                    configuration:
                      contact_id: "3219787601"
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    result:
                      crm_connection:
                        id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_connection
                      crm_record:
                        id: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_lead
                    status: completed
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: create_crm_lead_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CreateCRMLeadJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get CRM Lead Job
      tags:
        - CRM
        - v1
  /v1/create-crm-organization-jobs:
    post:
      description: |-
        Trigger an asynchronous job that creates a CRM Organization record in the account's primary CRM from a Leadfeeder company, and connects the company to it. Applicable to CRMs that support the Organization/Account object type. Field mappings configured for the integration are respected. The job runs in the background; poll `GET /v1/create-crm-organization-jobs/{job_id}` and, once it completes, fetch the created record via `GET /v1/crm-organizations/{id}` using `result.crm_record.id`.

        Credit Note: Creating a CRM record from a company consumes 1 credit, unless the company was already accessed within the last 12 months. The job's `credits` reports the charge.

        :::info
        Requires the `crm_records:write` OAuth2 scope.
        :::
      operationId: createCrmOrganizationJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        company_id:
                          description: The Leadfeeder company ID.
                          example: "159001425"
                          type: string
                        crm_owner_id:
                          description: "Optional owner for the created record: the Leadfeeder id (uuid) of a CRM user."
                          example: 4d5e6f70-8192-4a3b-9c4d-5e6f708192a3
                          type: string
                        custom_values:
                          additionalProperties: true
                          description: Optional CRM field values to set on the created record, keyed by the field's API name in the connected CRM (e.g. `Industry__c` in Salesforce).
                          example:
                            Industry__c: SaaS
                          type: object
                        name:
                          description: Optional name override for the created record.
                          example: Acme GmbH
                          type: string
                      required:
                        - company_id
                      type: object
                    type:
                      const: create_crm_organization_job
                      example: create_crm_organization_job
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      company_id: "159001425"
                      name: Acme GmbH
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: create_crm_organization_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CreateCRMOrganizationJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:write
      summary: Create CRM Organization Job
      tags:
        - CRM
        - v1
  /v1/create-crm-organization-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a job created via `POST /v1/create-crm-organization-jobs`. While `status` is `running`, `result` is omitted. Once `status` becomes `completed`, `result` references the affected CRM record and connection. On `failed`, `errors` describes the failure. Jobs are retained for 3 days after creation.

        Credit Note: Checking a job's status does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getCrmOrganizationJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the create CRM organization job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: "2026-09-23T12:00:12Z"
                    configuration:
                      company_id: "159001425"
                      name: Acme GmbH
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    result:
                      crm_connection:
                        id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_connection
                      crm_record:
                        id: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_organization
                    status: completed
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: create_crm_organization_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CreateCRMOrganizationJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get CRM Organization Job
      tags:
        - CRM
        - v1
  /v1/crm-connections/{id}:
    patch:
      description: |-
        Update the `primary` (data-exchange) and/or `send_visits` flags on a confirmed CRM connection. Applies a partial (merge-patch) update: only the flags named in the request are changed; any flag you omit is left untouched. Setting `primary: true` demotes the company's current primary connection in the same operation. `send_visits` cannot be toggled on contact connections. Suggestions cannot be updated.

        Credit Note: Updating a CRM connection does not consume credits.

        :::info
        Requires the `crm_records:write` OAuth2 scope.
        :::
      operationId: updateCrmConnection
      parameters:
        - $ref: "#/components/parameters/CRMConnectionId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  primary: true
                  send_visits: false
                type: crm_connection
            schema:
              additionalProperties: false
              properties:
                data:
                  additionalProperties: false
                  properties:
                    attributes:
                      additionalProperties: false
                      description: "The flags to change. Merge-patch: only the flags named here are changed; omitted flags are left untouched."
                      minProperties: 1
                      properties:
                        primary:
                          description: Whether this is the company's primary (data-exchange) connection. Setting `true` demotes the current primary connection.
                          type: boolean
                        send_visits:
                          description: Whether website visits are sent to the CRM record. Not available on contact connections.
                          type: boolean
                      type: object
                    type:
                      const: crm_connection
                      description: Must be 'crm_connection'.
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    enrichment_available: true
                    primary: true
                    send_visits: true
                  id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                  relationships:
                    crm_record:
                      id: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                      type: crm_organization
                  type: crm_connection
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CRMConnectionV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:write
      summary: Update CRM Connection
      tags:
        - CRM
        - v1
  /v1/crm-contacts/{id}:
    get:
      description: |-
        Retrieve a CRM Contact record mirrored from the account's primary CRM by its Leadfeeder id, e.g. the `result.crm_record.id` returned by a completed CRM job.

        Credit Note: Retrieving a CRM record does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getCrmContact
      parameters:
        - $ref: "#/components/parameters/CRMRecordId"
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    city: Berlin
                    country: Germany
                    crm_url: https://acme.my.salesforce.com/0035g00000QrStUAAV
                    email: john.doe@acme.example.com
                    first_name: John
                    job_title: CTO
                    last_name: Doe
                    remote_id: 0035g00000QrStUAAV
                  id: 7a2d4f6b-1e3c-4a5b-9c8d-6e0f2a4b6c80
                  relationships:
                    crm_owner:
                      id: 0f6b8a2e-7c1d-4e3a-9b5f-2d8c4a6e1f70
                      type: crm_user
                  type: crm_contact
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CRMContactV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get CRM Contact
      tags:
        - CRM
        - v1
  /v1/crm-leads/{id}:
    get:
      description: |-
        Retrieve a CRM Lead record mirrored from the account's primary CRM by its Leadfeeder id, e.g. the `result.crm_record.id` returned by a completed CRM job.

        Credit Note: Retrieving a CRM record does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getCrmLead
      parameters:
        - $ref: "#/components/parameters/CRMRecordId"
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    city: Berlin
                    country: Germany
                    crm_url: https://acme.my.salesforce.com/00Q5g00000AbCdEEAZ
                    email: jane.smith@acme.example.com
                    first_name: Jane
                    job_title: Head of Marketing
                    last_name: Smith
                    organization_name: Acme Corporation
                    remote_id: 00Q5g00000AbCdEEAZ
                  id: 3c8e1a5f-9b2d-4f7a-8e6c-1d4b7a9f2e30
                  relationships:
                    crm_owner:
                      id: 0f6b8a2e-7c1d-4e3a-9b5f-2d8c4a6e1f70
                      type: crm_user
                  type: crm_lead
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CRMLeadV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get CRM Lead
      tags:
        - CRM
        - v1
  /v1/crm-organizations/{id}:
    get:
      description: |-
        Retrieve a CRM Organization record mirrored from the account's primary CRM by its Leadfeeder id, e.g. the `result.crm_record.id` returned by a completed CRM job.

        Credit Note: Retrieving a CRM record does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getCrmOrganization
      parameters:
        - $ref: "#/components/parameters/CRMRecordId"
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    city: Berlin
                    country: Germany
                    crm_url: https://acme.my.salesforce.com/0015g00000XyZAbAAN
                    name: Acme Corporation
                    postal_code: "10115"
                    remote_id: 0015g00000XyZAbAAN
                    website: https://acme.example.com
                  id: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                  relationships:
                    crm_owner:
                      id: 0f6b8a2e-7c1d-4e3a-9b5f-2d8c4a6e1f70
                      type: crm_user
                  type: crm_organization
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CRMOrganizationV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get CRM Organization
      tags:
        - CRM
        - v1
  /v1/crm-users:
    get:
      description: |-
        List the users of the account's primary CRM, e.g. to pick a `crm_owner_id` for a CRM create job. Each CRM user links to the Leadfeeder user it maps to, if any. Results are cursor-paginated. Returns an empty list when the account has no CRM connected.

        Credit Note: Listing CRM users does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: listCrmUsers
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageCursor"
        - $ref: "#/components/parameters/PageSize"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      email: jane.smith@example.com
                      name: Jane Smith
                      remote_id: 0055g00000ABCDeAAH
                    id: 0f6b8a2e-7c1d-4e3a-9b5f-2d8c4a6e1f70
                    relationships:
                      user:
                        id: "123456"
                        type: user
                    type: crm_user
                  - attributes:
                      email: john.doe@example.com
                      name: John Doe
                      remote_id: 0055g00000EFGHiAAJ
                    id: 5a3c9e1b-2f4d-4b6a-8c7e-9d1f3b5a7c20
                    relationships:
                      user: null
                    type: crm_user
                meta:
                  credits:
                    charged: 0
                  pagination:
                    next_cursor: null
                    total_count: 2
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CRMUserV1"
                    type: array
                  meta:
                    properties:
                      credits:
                        properties:
                          charged:
                            description: How many credits were consumed for this request.
                            example: 0
                            type: number
                        required:
                          - charged
                        type: object
                      pagination:
                        properties:
                          next_cursor:
                            example: dXNlcjpVMEc5V0ZYTlo
                            type:
                              - string
                              - "null"
                          total_count:
                            example: 1450
                            type: integer
                        required:
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - credits
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: List of CRM users
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: List CRM Users
      tags:
        - CRM
        - v1
  /v1/custom-fields:
    get:
      description: |-
        Retrieve the list of all custom field definitions available in the account.
        The response includes each field's attributes.

        Credit Note: Retrieving custom field definitions does not consume credits.

        :::info
        Requires the `custom_fields:read` OAuth2 scope.
        :::
      operationId: getCustomFields
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageNum"
        - $ref: "#/components/parameters/PageSize"
        - $ref: "#/components/parameters/ScopeOptional"
        - $ref: "#/components/parameters/FieldTypeOptional"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CustomFieldV1"
                    type: array
                  meta:
                    properties:
                      pagination:
                        properties:
                          page_count:
                            example: 1
                            type: integer
                          page_num:
                            example: 1
                            type: integer
                          total_count:
                            example: 1
                            type: integer
                        required:
                          - page_num
                          - page_count
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - custom_fields:read
      summary: Retrieve Custom Fields
      tags:
        - Custom Fields
        - v1
    post:
      description: |-
        Create a new custom field in the account.

        :::info
        Requires the `custom_fields:write` OAuth2 scope.
        :::
      operationId: createCustomField
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              ai_field:
                summary: AI score field with configuration
                value:
                  data:
                    attributes:
                      configuration:
                        prompt: Score this lead from 1-100
                        prompt_category: technologies
                        prompt_with_external_data: false
                      name: Lead Score
                      scope: company
                      type: ai_score
                    type: custom_field
              contact_collection:
                summary: Contact collection field
                value:
                  data:
                    attributes:
                      configuration:
                        contacts_to_enrich: 3
                        enrich_emails: true
                        enrich_phones: false
                        find_more_contacts_details: true
                        num_contacts_max_per_company: 5
                      name: Key Decision Makers
                      scope: company
                      type: contact_collection
                    type: custom_field
              simple:
                summary: Simple text field
                value:
                  data:
                    attributes:
                      name: Prospect Status
                      scope: company
                      type: text
                    type: custom_field
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        configuration:
                          allOf:
                            - description: Configuration for AI and contact_collection field types. Must be a JSON object. Silently ignored for simple field types (`text`, `number`, `boolean`, `date`).
                              oneOf:
                                - additionalProperties: false
                                  description: Configuration for AI field types. The `prompt` property is required.
                                  properties:
                                    prompt:
                                      description: The AI prompt text.
                                      type: string
                                    prompt_category:
                                      description: Optional topical category for the AI prompt. Constrains the prompt to a known group used by xenon to organize prompts across the system.
                                      enum:
                                        - job_listings
                                        - news
                                        - funding
                                        - growth
                                        - technologies
                                        - legal_compliance
                                        - marketing
                                        - leadership_changes
                                        - research_and_development
                                        - products
                                      example: technologies
                                      type: string
                                    prompt_with_external_data:
                                      description: Whether the AI prompt should use external data.
                                      type: boolean
                                  required:
                                    - prompt
                                  title: AI configuration
                                  type: object
                                - additionalProperties: false
                                  description: Configuration for contact_collection field type. All properties are optional. contacts_to_enrich cannot exceed num_contacts_max_per_company.
                                  properties:
                                    buyer_persona_id:
                                      description: Buyer persona identifier used to scope contact discovery (max 50 characters).
                                      maxLength: 50
                                      type: string
                                    contacts_to_enrich:
                                      description: Number of contacts to enrich; required when find_more_contacts_details is true; cannot exceed num_contacts_max_per_company
                                      minimum: 1
                                      type: integer
                                    enrich_emails:
                                      description: Include email enrichment in CCR
                                      type: boolean
                                    enrich_phones:
                                      description: Include phone enrichment in CCR
                                      type: boolean
                                    find_more_contacts_details:
                                      description: Enable Company Contacts Reveal (CCR) enrichment
                                      type: boolean
                                    num_contacts_max_per_company:
                                      description: Maximum contacts per company
                                      type: integer
                                  title: Contact collection configuration
                                  type: object
                            - description: |-
                                For AI field types (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`): required, and must include `prompt`.

                                For `contact_collection`: optional, all properties are optional.
                        name:
                          description: The name of the custom field
                          type: string
                        scope:
                          description: Specifies whether the custom field will be applied to companies or contacts
                          enum:
                            - company
                            - contact
                          type: string
                        type:
                          description: The data type of the custom field. For AI types (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`), the `configuration` attribute with a `prompt` is required. For `contact_collection`, `configuration` is optional. For simple types (`text`, `number`, `boolean`, `date`), `configuration` is silently ignored.
                          enum:
                            - text
                            - number
                            - boolean
                            - date
                            - contact_collection
                            - ai_score
                            - ai_text
                            - ai_number
                            - ai_boolean
                          type: string
                      required:
                        - name
                        - type
                        - scope
                      type: object
                    type:
                      default: custom_field
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CustomFieldV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - custom_fields:write
      summary: Create Custom Field
      tags:
        - Custom Fields
        - v1
  /v1/custom-fields/{id}:
    delete:
      description: |-
        Delete a custom field from the account.
        Once removed, the custom field will no longer be accessible.

        Credit Note: Deleting custom fields does not consume credits.

        :::info
        Requires the `custom_fields:write` OAuth2 scope.
        :::
      operationId: deleteCustomField
      parameters:
        - description: The custom field internal name.
          example: "10172"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - custom_fields:write
      summary: Delete Custom Field
      tags:
        - Custom Fields
        - v1
    get:
      description: |-
        Fetch the details of a specific custom field using its internal name.
        The response returns the field's attributes.

        Credit Note: Retrieving custom field definitions does not consume credits.

        :::info
        Requires the `custom_fields:read` OAuth2 scope.
        :::
      operationId: getCustomField
      parameters:
        - description: The custom field internal name.
          example: score
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CustomFieldV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - custom_fields:read
      summary: Get Custom Field Details
      tags:
        - Custom Fields
        - v1
    patch:
      description: |-
        Update an existing custom field's name and/or configuration.

        At least one of `name` or `configuration` must be provided. If `name` is present, it must not be blank.
        The `configuration` attribute is only meaningful for prompt-capable field types
        (`ai_score`, `ai_text`, `ai_number`, `ai_boolean`, `contact_collection`);
        it is silently ignored for simple types (`text`, `number`, `boolean`, `date`).

        Credit Note: Updating custom fields does not consume credits.

        :::info
        Requires the `custom_fields:write` OAuth2 scope.
        :::
      operationId: updateCustomField
      parameters:
        - description: The custom field internal name.
          example: score
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              rename:
                summary: Rename a custom field
                value:
                  data:
                    attributes:
                      name: Updated Field Name
                    type: custom_field
              update_both:
                summary: Update name and configuration
                value:
                  data:
                    attributes:
                      configuration:
                        prompt: New prompt
                        prompt_with_external_data: true
                      name: Renamed AI Field
                    type: custom_field
              update_configuration:
                summary: Update AI field configuration
                value:
                  data:
                    attributes:
                      configuration:
                        prompt: Updated prompt text
                        prompt_category: technologies
                        prompt_with_external_data: false
                    type: custom_field
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      description: At least one of `name` or `configuration` must be provided.
                      properties:
                        configuration:
                          description: Configuration for AI and contact_collection field types. Must be a JSON object. Silently ignored for simple field types (`text`, `number`, `boolean`, `date`).
                          oneOf:
                            - additionalProperties: false
                              description: Configuration for AI field types. The `prompt` property is required.
                              properties:
                                prompt:
                                  description: The AI prompt text.
                                  type: string
                                prompt_category:
                                  description: Optional topical category for the AI prompt. Constrains the prompt to a known group used by xenon to organize prompts across the system.
                                  enum:
                                    - job_listings
                                    - news
                                    - funding
                                    - growth
                                    - technologies
                                    - legal_compliance
                                    - marketing
                                    - leadership_changes
                                    - research_and_development
                                    - products
                                  example: technologies
                                  type: string
                                prompt_with_external_data:
                                  description: Whether the AI prompt should use external data.
                                  type: boolean
                              required:
                                - prompt
                              title: AI configuration
                              type: object
                            - additionalProperties: false
                              description: Configuration for contact_collection field type. All properties are optional. contacts_to_enrich cannot exceed num_contacts_max_per_company.
                              properties:
                                buyer_persona_id:
                                  description: Buyer persona identifier used to scope contact discovery (max 50 characters).
                                  maxLength: 50
                                  type: string
                                contacts_to_enrich:
                                  description: Number of contacts to enrich; required when find_more_contacts_details is true; cannot exceed num_contacts_max_per_company
                                  minimum: 1
                                  type: integer
                                enrich_emails:
                                  description: Include email enrichment in CCR
                                  type: boolean
                                enrich_phones:
                                  description: Include phone enrichment in CCR
                                  type: boolean
                                find_more_contacts_details:
                                  description: Enable Company Contacts Reveal (CCR) enrichment
                                  type: boolean
                                num_contacts_max_per_company:
                                  description: Maximum contacts per company
                                  type: integer
                              title: Contact collection configuration
                              type: object
                        name:
                          description: The new name of the custom field. Must not be blank if provided.
                          type: string
                      type: object
                    type:
                      default: custom_field
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CustomFieldV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - custom_fields:write
      summary: Update Custom Field
      tags:
        - Custom Fields
        - v1
  /v1/disconnect-crm-record-jobs:
    post:
      description: |-
        Trigger an asynchronous job that disconnects a confirmed CRM connection, soft-downgrading it to a suggestion. The `remote_type` is inferred from the connection record; the CRM record and the resulting suggestion survive. The job runs in the background; poll `GET /v1/disconnect-crm-record-jobs/{job_id}` to check its status.

        Credit Note: Disconnecting a CRM record does not consume credits.

        :::info
        Requires the `crm_records:write` OAuth2 scope.
        :::
      operationId: createDisconnectCrmRecordJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        crm_connection_id:
                          description: The CRM connection ID, as returned by the company or contact CRM connection reads.
                          example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                          type: string
                      required:
                        - crm_connection_id
                      type: object
                    type:
                      const: disconnect_crm_record_job
                      example: disconnect_crm_record_job
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      crm_connection_id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: disconnect_crm_record_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/DisconnectCRMRecordJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:write
      summary: Create Disconnect CRM Record Job
      tags:
        - CRM
        - v1
  /v1/disconnect-crm-record-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a job created via `POST /v1/disconnect-crm-record-jobs`. On `failed`, `errors` describes the failure. Jobs are retained for 3 days after creation.

        Credit Note: Checking a job's status does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getDisconnectCrmRecordJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the disconnect CRM record job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: "2026-09-23T12:00:12Z"
                    configuration:
                      crm_connection_id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    status: completed
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: disconnect_crm_record_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/DisconnectCRMRecordJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get Disconnect CRM Record Job
      tags:
        - CRM
        - v1
  /v1/enrich-crm-record-jobs:
    post:
      description: |-
        Trigger an asynchronous job that enriches the CRM record behind a connection. Only the **primary** (data-exchange) connection can be enriched; targeting a non-primary connection returns `422`. The `remote_type` is inferred from the connection record. Check `enrichment_available` on the connection before calling. The job runs in the background; poll `GET /v1/enrich-crm-record-jobs/{job_id}` and, once it completes, fetch the enriched record via the matching CRM record endpoint using `result.crm_record.id`.

        Credit Note: Enriching a CRM record consumes 1 credit, unless the company or contact was already accessed within the last 12 months. The job's `credits` reports the charge.

        :::info
        Requires the `crm_records:write` OAuth2 scope.
        :::
      operationId: createEnrichCrmRecordJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        crm_connection_id:
                          description: The CRM connection ID, as returned by the company or contact CRM connection reads.
                          example: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                          type: string
                      required:
                        - crm_connection_id
                      type: object
                    type:
                      const: enrich_crm_record_job
                      example: enrich_crm_record_job
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      crm_connection_id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: enrich_crm_record_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/EnrichCRMRecordJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Job accepted and started
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:write
      summary: Create Enrich CRM Record Job
      tags:
        - CRM
        - v1
  /v1/enrich-crm-record-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a job created via `POST /v1/enrich-crm-record-jobs`. While `status` is `running`, `result` is omitted. Once `status` becomes `completed`, `result` references the affected CRM record and connection. On `failed`, `errors` describes the failure. Jobs are retained for 3 days after creation.

        Credit Note: Checking a job's status does not consume credits.

        :::info
        Requires the `crm_records:read` OAuth2 scope.
        :::
      operationId: getEnrichCrmRecordJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the enrich CRM record job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: "2026-09-23T12:00:12Z"
                    configuration:
                      crm_connection_id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                    created_at: "2026-09-23T12:00:00Z"
                    errors: []
                    result:
                      crm_connection:
                        id: 42_159001425_9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_connection
                      crm_record:
                        id: 9f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f
                        type: crm_organization
                    status: completed
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: enrich_crm_record_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/EnrichCRMRecordJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - crm_records:read
      summary: Get Enrich CRM Record Job
      tags:
        - CRM
        - v1
  /v1/geo-suggestions:
    get:
      description: |-
        Resolves a typed city name or postal code into geographic coordinates. The returned `latitude` / `longitude` can be used to populate the `value.lat` / `value.lon` of the Geo Filter (`field: geo`, `operator: within`). Results can be scoped to one or more countries via `country_codes`, and `search_fields` limits which address fields the text may match; when omitted, both cities and postal codes are searched.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getGeoSuggestions
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/GeoSearch"
        - $ref: "#/components/parameters/GeoSearchFields"
        - $ref: "#/components/parameters/GeoCountryCodes"
        - $ref: "#/components/parameters/GeoPageSize"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      city: London
                      country_code: GB
                      latitude: 51.51
                      longitude: -0.13
                      postal_code: null
                    id: 9b3f0a1c-2b7e-4e6f-9c1b-7f1a2c3d4e5f
                    type: geo_suggestion
                  - attributes:
                      city: Long Beach
                      country_code: US
                      latitude: 33.77
                      longitude: -118.19
                      postal_code: null
                    id: 1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f
                    type: geo_suggestion
                  - attributes:
                      city: Frankfurt am Main
                      country_code: DE
                      latitude: 50.11
                      longitude: 8.68
                      postal_code: "60311"
                    id: 2a3b4c5d-6e7f-8a9b-0c1d-2e3f4a5b6c7d
                    type: geo_suggestion
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/GeoSuggestionV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Matching location suggestions
        "400":
          content:
            application/json:
              examples:
                invalid_country_code:
                  value:
                    errors:
                      - code: bad_request
                        title: country_code "INVALID" must be an ISO-2 letter code
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_search_fields:
                  value:
                    errors:
                      - code: bad_request
                        title: "search_fields must contain only: postal_code, city"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_search:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: search is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                short_search:
                  value:
                    errors:
                      - code: bad_request
                        title: search must be at least 3 characters
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Missing or invalid query parameter
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "503":
          content:
            application/json:
              example:
                errors:
                  - code: service_unavailable
                    title: Service temporarily unavailable. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Service unavailable
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Get Geo Suggestions
      tags:
        - Reference Data
        - Companies
        - v1
  /v1/icps:
    get:
      description: |-
        Retrieve all Ideal Customer Profiles (ICPs) defined in the account. Each ICP is a saved set of company-level filter criteria (employee count, industry, location) used to identify target companies. `relationships.custom_feed` links an ICP to the Web Visits custom feed created alongside it, which lists the visiting companies matching the ICP; it is `null` for the few ICPs that have no feed.

        Credit Note: Retrieving ICP definitions does not consume credits.

        :::info
        Requires the `icps:read` OAuth2 scope.
        :::
      operationId: getIcps
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      app_url: https://app.leadfeeder.com/f/settings/website/123456/company-segments/6080
                      created_at: "2024-12-10T15:57:25Z"
                      filters:
                        employee_count:
                          - display_value: 101-500 employees
                            negated: false
                            search_value: 101-500
                        industries:
                          - display_value: Software Development
                            negated: false
                            search_value: "1594.6"
                        location:
                          - display_value: United States
                            negated: false
                            search_value: US
                            type: country_code
                      name: US Tech Companies
                    id: "6080"
                    relationships:
                      custom_feed:
                        id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        type: custom_feed
                    type: icp
                  - attributes:
                      app_url: https://app.leadfeeder.com/f/settings/website/123456/company-segments/6081
                      created_at: "2024-11-05T10:30:00Z"
                      filters:
                        employee_count:
                          - display_value: 11-100 employees
                            negated: false
                            search_value: 11-100
                        location:
                          - display_value: Germany
                            negated: false
                            search_value: DE
                            type: country_code
                      name: European ICPs
                    id: "6081"
                    relationships:
                      custom_feed:
                        id: b2c3d4e5-f6a7-8901-bcde-f23456789012
                        type: custom_feed
                    type: icp
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/ICPV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - icps:read
      summary: Retrieve Ideal Customer Profiles
      tags:
        - Ideal Customer Profiles
        - v1
    post:
      description: |-
        Create a new Ideal Customer Profile (ICP) in the account. Creating an ICP also creates the custom feed that surfaces the companies matching it.

        Credit Note: Creating an ICP does not consume credits.

        :::info
        Requires the `icps:write` OAuth2 scope.
        :::
      operationId: createIcp
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              europeExcludingDach:
                description: European companies, excluding the DACH countries
                summary: A continent with an exclusion
                value:
                  data:
                    attributes:
                      filters:
                        location:
                          - display_value: Europe
                            search_value: europe
                            type: continent
                          - display_value: DACH
                            negated: true
                            search_value: dach
                            type: world_region
                      name: Europe excluding DACH
                    type: icp
              softwareCompaniesInTheUs:
                description: Mid-sized US software companies
                summary: Industry, size and country
                value:
                  data:
                    attributes:
                      filters:
                        employee_count:
                          - search_value: 101-500
                        industries:
                          - display_value: Software Development
                            search_value: 1594.6.4
                        location:
                          - display_value: United States
                            search_value: US
                            type: country_code
                      name: US Software Companies
                    type: icp
            schema:
              $ref: "#/components/schemas/IcpRequestV1"
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/company-segments/6080
                    created_at: "2024-12-10T15:57:25Z"
                    filters:
                      employee_count:
                        - display_value: 101-500 employees
                          negated: false
                          search_value: 101-500
                      industries:
                        - display_value: Software Development
                          negated: false
                          search_value: "1594.6"
                      location:
                        - display_value: United States
                          negated: false
                          search_value: US
                          type: country_code
                    name: US Tech Companies
                  id: "6080"
                  relationships:
                    custom_feed:
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      type: custom_feed
                  type: icp
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ICPV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - icps:write
      summary: Create an Ideal Customer Profile
      tags:
        - Ideal Customer Profiles
        - v1
  /v1/icps/companies:
    post:
      description: |-
        Find out which Ideal Customer Profiles each of your companies matches. Pass up to 100 company IDs in `ids` and get one entry per company, in the same order.

        A company that matches no ICP keeps its place in the response with an empty list. Companies unknown to Leadfeeder are reported the same way.

        Each entry names the matched ICPs by ID. Pass `include=icps` to get each ICP's full details instead — the same fields **Retrieve Ideal Customer Profiles** returns — so you do not need a second call to resolve names. An ICP matched by several of the requested companies is repeated under each of them.

        Credit Note: Retrieving ICP matches does not consume credits.

        :::info
        Requires the `icps:read` OAuth2 scope.
        :::
      operationId: getCompanyIcpMatches
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: Pass `icps` to include each ICP's full details in the response instead of bare references.
          in: query
          name: include
          schema:
            enum:
              - icps
            type: string
      requestBody:
        content:
          application/json:
            example:
              ids:
                - "159001425"
                - "129011"
            schema:
              additionalProperties: false
              properties:
                ids:
                  description: Company IDs to look up. A maximum of 100 IDs can be passed.
                  items:
                    example: "159001425"
                    type: string
                  maxItems: 100
                  minItems: 1
                  type: array
              required:
                - ids
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                loaded:
                  summary: With include=icps — each ICP in full
                  value:
                    data:
                      - id: "159001425"
                        relationships:
                          icps:
                            - attributes:
                                created_at: "2024-12-10T15:57:25Z"
                                filters:
                                  employee_count:
                                    - display_value: 11-100
                                      negated: false
                                      search_value: 11-100
                                  location:
                                    - display_value: United States
                                      negated: false
                                      search_value: US
                                      type: country_code
                                name: US Prospects
                              id: "6080"
                              relationships:
                                custom_feed:
                                  id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                                  type: custom_feed
                              type: icp
                            - attributes:
                                created_at: "2025-02-03T08:41:12Z"
                                filters:
                                  location:
                                    - display_value: Germany
                                      negated: false
                                      search_value: DE
                                      type: country_code
                                name: DACH Mid-Market
                              id: "6081"
                              relationships:
                                custom_feed:
                                  id: b2c3d4e5-f6a7-8901-bcde-f23456789012
                                  type: custom_feed
                              type: icp
                        type: company
                      - id: "129011"
                        relationships:
                          icps: []
                        type: company
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                references:
                  summary: Default — the ICPs a company matches, by ID
                  value:
                    data:
                      - id: "159001425"
                        relationships:
                          icps:
                            - id: "6080"
                              type: icp
                            - id: "6081"
                              type: icp
                        type: company
                      - id: "129011"
                        relationships:
                          icps: []
                        type: company
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    description: One entry per requested company, in the order the IDs were supplied.
                    items:
                      description: A company from the request, carrying the ICPs it matches. No company attributes are returned — this resource reports matches only.
                      properties:
                        id:
                          description: The Leadfeeder company ID.
                          example: "129011"
                          type: string
                        relationships:
                          properties:
                            icps:
                              description: The ICPs this company matches, empty when it matches none. Bare references by default — resolve names via **Retrieve Ideal Customer Profiles** — or full ICP records when the request passes `include=icps`. An ICP matched by several of the requested companies is repeated under each of them.
                              items:
                                anyOf:
                                  - additionalProperties: false
                                    description: A bare reference to an ICP by ID.
                                    properties:
                                      id:
                                        description: The ICP ID, as returned by the **Retrieve Ideal Customer Profiles** and **Get Ideal Customer Profile Details** endpoints.
                                        example: "6080"
                                        type: string
                                      type:
                                        const: icp
                                        example: icp
                                        type: string
                                    required:
                                      - type
                                      - id
                                    type: object
                                  - $ref: "#/components/schemas/ICPV1"
                              type: array
                          required:
                            - icps
                          type: object
                        type:
                          const: company
                          example: company
                          type: string
                      required:
                        - type
                        - id
                        - relationships
                      type: object
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Company ICP matches retrieved
        "400":
          content:
            application/json:
              examples:
                invalid_id:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The 'ids' field must be a valid array of company IDs.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_ids:
                  summary: The ids array was not supplied, is empty, or is not an array
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: "The request body requires at least the following field to be present: 'ids'."
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The number of IDs supplied exceeds the permitted limit of 100.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The supplied company IDs are missing or invalid
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - icps:read
      summary: Retrieve Company ICP Matches
      tags:
        - Ideal Customer Profiles
        - v1
  /v1/icps/{id}:
    delete:
      description: |-
        Delete an ICP by its ID. This also deletes the custom feed created alongside it.

        :::info
        Requires the `icps:write` OAuth2 scope.
        :::
      operationId: deleteIcp
      parameters:
        - description: The ICP ID.
          example: "6080"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - icps:write
      summary: Delete an Ideal Customer Profile
      tags:
        - Ideal Customer Profiles
        - v1
    get:
      description: |-
        Get the details of a specific Ideal Customer Profile (ICP) by ID, including its name, creation timestamp, and the full set of filter criteria that define it. `relationships.custom_feed` links the ICP to the Web Visits custom feed created alongside it, which lists the visiting companies matching the ICP; it is `null` for the few ICPs that have no feed.

        Credit Note: Retrieving an ICP definition does not consume credits.

        :::info
        Requires the `icps:read` OAuth2 scope.
        :::
      operationId: getIcp
      parameters:
        - description: The ICP ID.
          example: "6080"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/company-segments/6080
                    created_at: "2024-12-10T15:57:25Z"
                    filters:
                      employee_count:
                        - display_value: 101-500 employees
                          negated: false
                          search_value: 101-500
                      industries:
                        - display_value: Software Development
                          negated: false
                          search_value: "1594.6"
                      location:
                        - display_value: United States
                          negated: false
                          search_value: US
                          type: country_code
                    name: US Tech Companies
                  id: "6080"
                  relationships:
                    custom_feed:
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      type: custom_feed
                  type: icp
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ICPV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - icps:read
      summary: Get Ideal Customer Profile Details
      tags:
        - Ideal Customer Profiles
        - v1
    patch:
      description: |-
        Update an existing Ideal Customer Profile (ICP). All attributes are optional; only the attributes you send are changed. Sending `filters` replaces every category, not just the one you name.

        An ICP that still uses a replaced employee range (1-2, 3-10, 11-50, 51-200 or 201-500) can't be updated, not even renamed, unless the update sends `filters` with current ranges. Without them the request is rejected with a 422 naming the ranges to replace.

        :::info
        Requires the `icps:write` OAuth2 scope.
        :::
      operationId: updateIcp
      parameters:
        - description: The ICP ID.
          example: "6080"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              renameOnly:
                description: "Change the name without touching the filters. An ICP that still uses a replaced employee range (1-2, 3-10, 11-50, 51-200 or 201-500) can't be renamed on its own: send `filters` with current ranges in the same update."
                summary: Rename only
                value:
                  data:
                    attributes:
                      name: US Enterprise Software Companies
                    type: icp
              replaceFilters:
                description: Change the filters. Every category is resent, since categories omitted here would otherwise be dropped.
                summary: Replace filters
                value:
                  data:
                    attributes:
                      filters:
                        employee_count:
                          - search_value: 101-500
                        industries:
                          - display_value: Software Development
                            search_value: 1594.6.4
                        location:
                          - display_value: United States
                            search_value: US
                            type: country_code
                      name: US Software Companies
                    type: icp
            schema:
              $ref: "#/components/schemas/IcpRequestV1"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/company-segments/6080
                    created_at: "2024-12-10T15:57:25Z"
                    filters:
                      employee_count:
                        - display_value: 101-500 employees
                          negated: false
                          search_value: 101-500
                      industries:
                        - display_value: Software Development
                          negated: false
                          search_value: "1594.6"
                      location:
                        - display_value: United States
                          negated: false
                          search_value: US
                          type: country_code
                    name: US Tech Companies
                  id: "6080"
                  relationships:
                    custom_feed:
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      type: custom_feed
                  type: icp
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ICPV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - icps:write
      summary: Update an Ideal Customer Profile
      tags:
        - Ideal Customer Profiles
        - v1
  /v1/industries:
    get:
      description: |-
        Returns the full list of industries based on the provided industry classification.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getIndustries
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/Classification"
        - $ref: "#/components/parameters/Code"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      code: "62"
                      name: Computer programming, consultancy and related activities
                    id: nace_62
                    type: company_industry
                  - attributes:
                      code: "62.01"
                      name: Computer programming activities
                      parent_code: "62"
                      parent_name: Computer programming, consultancy and related activities
                    id: nace_62.01
                    type: company_industry
                  - attributes:
                      code: 62.01.1
                      name: Web-page design and programming
                      parent_code: "62.01"
                      parent_name: Computer programming activities
                    id: nace_62.01.1
                    type: company_industry
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CompanyIndustryV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Industries for the requested classification
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "503":
          content:
            application/json:
              example:
                errors:
                  - code: service_unavailable
                    title: Service temporarily unavailable. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Service unavailable
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Get Industries
      tags:
        - Reference Data
        - v1
  /v1/ip/enrich:
    get:
      description: |-
        Enriches an input IP (IPv4/IPv6) with matching company information (if any).
        **Note:**
        - This endpoint requires an active subscription to the IP Enrich product.
        - A request will only be counted as a successful match when the `company_type` attribute is set to `company`.

        :::info
        Requires the `ip:read` OAuth2 scope.
        :::
      operationId: enrichIp
      parameters:
        - $ref: "#/components/parameters/Ip"
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/EnrichedIpV1"
                  meta:
                    properties:
                      num_results:
                        description: Set to 1 if the request is considered successful. Otherwise, it is set to 0.
                        example: 1
                        type: integer
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - num_results
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                invalid_parameter:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The `ip` query parameter is required and must be a valid IPv4 or IPv6 address
                no_subscription:
                  value:
                    errors:
                      - code: missing_subscription
                        title: The account 12345 doesn't have a valid subscription to use the IP enrich endpoint
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid mandatory fields
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - ip:read
      summary: Enrich Company IP Address
      tags:
        - IP
        - v1
  /v1/lists:
    get:
      description: |-
        Retrieve all lists available in the account.
        The response includes each list's attributes and can be filtered through query parameters.

        Credit Note: Retrieving list definitions does not consume credits.

        :::info
        Requires the `lists:read` OAuth2 scope.
        :::
      operationId: getLists
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageNum"
        - $ref: "#/components/parameters/PageSize"
        - $ref: "#/components/parameters/ScopeRequired"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/ListV1"
                    type: array
                  meta:
                    properties:
                      pagination:
                        properties:
                          page_count:
                            example: 1
                            type: integer
                          page_num:
                            example: 1
                            type: integer
                          total_count:
                            example: 1
                            type: integer
                        required:
                          - page_num
                          - page_count
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:read
      summary: Retrieve Lists
      tags:
        - Lists
        - v1
    post:
      description: |-
        Create a new list in the account.

        :::info
        Requires the `lists:write` OAuth2 scope.
        :::
      operationId: createList
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  name: US Prospects
                  scope: company
                type: list
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        name:
                          description: The name of the list
                          type: string
                        scope:
                          description: The scope type of the list
                          enum:
                            - company
                            - contact
                          type: string
                      required:
                        - name
                        - scope
                      type: object
                    type:
                      default: list
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ListV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:write
      summary: Create a List
      tags:
        - Lists
        - v1
  /v1/lists/batch-add-to-list-jobs:
    post:
      description: |-
        Schedule an asynchronous job that adds members to a single list. The target list is identified by `data.attributes.list_id` in the request body; its prefix (`company_` or `contact_`) determines whether `company` or `contact` references are accepted. You need permission to change the list's members, and it can't be a read-only list, such as a revealed, CRM or custom feed list. The members are supplied either as an explicit `data.attributes.items` array (up to 100 items per request), or — for company lists only — as a `data.attributes.advanced_search` selection that is resolved into companies (up to 100,000) when the job runs. A list holds at most 1,000,000 members. To remove members, use `POST /v1/lists/batch-remove-from-list-jobs` — adding and removing are separate jobs.

        Returns `202 Accepted` with a job handle. Poll `GET /v1/lists/batch-add-to-list-jobs/{job_id}` to observe progress and the outcome: per-item `results` plus `summary` counts for `items` jobs, `summary` counts only for jobs created from a search selection.

        Credit Note: Adding members to a list does not consume credits.

        :::info
        Requires the `lists:write` OAuth2 scope.
        :::
      operationId: createBatchAddToListJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              add_companies:
                summary: Add companies to a company list
                value:
                  data:
                    attributes:
                      items:
                        - id: "159001425"
                          type: company
                        - id: "159001426"
                          type: company
                      list_id: company_123
                    type: batch_add_to_list_job
              add_contacts:
                summary: Add contacts to a contact list
                value:
                  data:
                    attributes:
                      items:
                        - id: "3170656125"
                          type: contact
                        - id: "3219787635"
                          type: contact
                      list_id: contact_456
                    type: batch_add_to_list_job
              add_search_results:
                summary: Add the companies matching an advanced search to a company list
                value:
                  data:
                    attributes:
                      advanced_search:
                        excluded_company_ids:
                          - "651713"
                        filters:
                          items:
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                            - field: employee_count
                              operator: in_range
                              type: filter
                              value:
                                gte: 50
                          operator: and
                          type: group
                        page:
                          size: 1000
                        sort:
                          direction: desc
                          field: employee_count
                      list_id: company_123
                    type: batch_add_to_list_job
            schema:
              description: Request body for creating a batch add-to-list job. The target list is identified by `list_id` inside `data.attributes` — the list ID's prefix (`company_` or `contact_`) determines which kind of references are valid. Supplying references whose type does not match the list scope yields `422 invalid_parameter` (scope mismatch). The members are supplied either as an explicit `items` array, or — for company lists only — as an `advanced_search` selection that is resolved into companies when the job runs. Exactly one way of supplying the members must be used.
              example:
                data:
                  attributes:
                    items:
                      - id: "159001425"
                        type: company
                      - id: "159001426"
                        type: company
                    list_id: company_123
                  type: batch_add_to_list_job
              properties:
                data:
                  properties:
                    attributes:
                      oneOf:
                        - required:
                            - items
                        - required:
                            - advanced_search
                      properties:
                        advanced_search:
                          allOf:
                            - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                              example:
                                excluded_company_ids:
                                  - "651713"
                                filters:
                                  items:
                                    - field: country_code
                                      operator: in
                                      type: filter
                                      value:
                                        - DE
                                    - field: employee_count
                                      operator: in_range
                                      type: filter
                                      value:
                                        gte: 50
                                  operator: and
                                  type: group
                                page:
                                  size: 1000
                                sort:
                                  direction: desc
                                  field: employee_count
                              properties:
                                excluded_company_ids:
                                  description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                                  example:
                                    - "651713"
                                  items:
                                    type: string
                                  type: array
                                filters:
                                  description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                                  example:
                                    items:
                                      - field: country_code
                                        operator: in
                                        type: filter
                                        value:
                                          - DE
                                      - items:
                                          - field: employee_count
                                            operator: in_range
                                            type: filter
                                            value:
                                              gte: 50
                                          - field: industries
                                            operator: in
                                            type: filter
                                            value:
                                              classification: nace
                                              codes:
                                                - "62.01"
                                        operator: or
                                        type: group
                                    operator: and
                                    type: group
                                  properties:
                                    items:
                                      description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                                      items:
                                        $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                                      type: array
                                    operator:
                                      description: The logical operator combining the items.
                                      enum:
                                        - and
                                        - or
                                      example: and
                                      type: string
                                    type:
                                      description: Indicates this is the root filter group.
                                      enum:
                                        - group
                                      example: group
                                      type: string
                                  required:
                                    - type
                                    - operator
                                    - items
                                  type: object
                                page:
                                  description: Bounds how many of the matching companies are selected.
                                  properties:
                                    size:
                                      description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                                      example: 1000
                                      minimum: 1
                                      type: integer
                                  type: object
                                sort:
                                  description: Ordering applied to the matching companies. Omit to use the default ordering.
                                  properties:
                                    direction:
                                      default: asc
                                      description: Sort direction. Defaults to `asc`.
                                      enum:
                                        - asc
                                        - desc
                                      example: desc
                                      type: string
                                    field:
                                      description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                                      example: employee_count,name
                                      type: string
                                  type: object
                              required:
                                - filters
                              type: object
                            - properties:
                                page:
                                  properties:
                                    size:
                                      maximum: 100000
                            - description: "Add every company matching an advanced search to the list, instead of listing companies one by one in `items`. Use the same `filters`, `sort` and `page` you would when browsing companies. When the job runs, it takes the matches in `sort` order up to `page.size` (at most 100,000, which is also the default), then drops the `excluded_company_ids`, so fewer than `page.size` can be added. The search checks the filters and the sort only then: a filter tree or sort it rejects fails the job with the search's own error, such as `invalid_filters`. This is only available for company lists — it can't be used on a contact list or together with `items`. The outcome is reported as `summary` counts rather than a per-company `results` list; any companies that couldn't be added are counted under `not_found`. If the matches would take the list past 1,000,000 members, the job fails with `list_capacity_exceeded` and adds none of them. Matches that are already on the list count toward this limit."
                        items:
                          description: The company or contact references to add to the list. A maximum of 100 items may be supplied, repeats included. Every item's `type` must match the target list's kind (company list → `company`, contact list → `contact`). An item sent more than once is added and reported once. The IDs are checked when the job runs, so an unknown ID is reported as `not_found` rather than rejected. Mutually exclusive with `advanced_search`.
                          items:
                            properties:
                              id:
                                description: The Dealfront entity ID.
                                example: "159001425"
                                type: string
                              type:
                                description: The entity type of the reference — must match the target list's kind.
                                enum:
                                  - company
                                  - contact
                                example: company
                                type: string
                            required:
                              - type
                              - id
                            type: object
                          maxItems: 100
                          minItems: 1
                          type: array
                        list_id:
                          description: The scope-prefixed target list identifier (e.g. `company_123` or `contact_456`). Its prefix determines which kind of references may appear in `items`. You need permission to change its members, and it can't be a read-only list, such as a revealed, CRM or custom feed list.
                          example: company_123
                          type: string
                      required:
                        - list_id
                      type: object
                    type:
                      default: batch_add_to_list_job
                      description: The job resource type. Optional — the operation is fixed by the endpoint, so a value supplied here is ignored.
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      items:
                        - id: "159001425"
                          type: company
                        - id: "159001426"
                          type: company
                      list_id: company_123
                    created_at: "2026-05-13T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: batch_add_to_list_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchAddToListJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch add-to-list job accepted and enqueued
        "400":
          content:
            application/json:
              examples:
                invalid_json:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must be valid JSON
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_attributes:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must include a 'data.attributes' object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Malformed request envelope — the body is not valid JSON or is missing the required `data.attributes` object.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User has no API access on the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the `lists:write` scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `lists:write` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include API access
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_not_editable:
                  summary: You may not change the list's members
                  value:
                    errors:
                      - code: list_access_denied
                        title: You do not have permission to change the members of the list
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The list is read-only
                  value:
                    errors:
                      - code: list_read_only
                        title: The list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "Forbidden: the credentials are valid but don't allow this request. The gateway refuses a user without API access on the account, a plan without API access, a token without the `lists:write` scope, and a missing or foreign `account_id`. The request is also refused when you may not change the list's members (for example, because it is shared with you for viewing only), or when it is a read-only list, such as a revealed, CRM or custom feed list."
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested list could not be found
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: List not found in this account, or you may not read it. Returned synchronously, before any job is created.
        "422":
          content:
            application/json:
              examples:
                advanced_search_excluded_ids_not_an_array:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.excluded_company_ids must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_filters_too_large:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.filters must not exceed 65536 bytes
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_on_contact_list:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search is only supported for company lists
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_size_out_of_range:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page.size must be an integer between 1 and 100000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_sort_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.sort must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_without_filters:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.filters is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                empty_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must contain at least one item
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_list_id:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Invalid list ID format
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                item_without_type_or_id:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Each item must have type and id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                items_and_advanced_search:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: items and advanced_search are mutually exclusive
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_capacity_exceeded:
                  value:
                    errors:
                      - code: list_capacity_exceeded
                        title: Applying these operations would exceed the maximum list size
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                no_members:
                  summary: Neither `items` nor a selection was sent, or `items` isn't an array
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                scope_mismatch:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: List 'company' only accepts company members
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                scope_mismatch_contact_list:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: List 'contact' only accepts contact members
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: A maximum of 100 items may be supplied per request
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: A well-formed envelope that fails domain validation — scope mismatch (item `type` does not match the list's kind), empty `items`, more than 100 items, both `items` and `advanced_search` supplied, an `advanced_search` selection on a contact list, without `filters` or with `filters` over 65,536 bytes, a list ID, item or selection field that breaks another rule (the title says which), or per-list capacity exceeded (adding these members would push the list beyond its maximum size of 1,000,000 members; fail-fast, no changes applied). The synchronous capacity check applies to `items` jobs only — a search selection's member count is unknown until the search is resolved, so its capacity limit is enforced during execution and exceeding it fails the job with `list_capacity_exceeded`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:write
      summary: Create Batch Add to List Job
      tags:
        - Lists
        - v1
  /v1/lists/batch-add-to-list-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a batch add-to-list job created via `POST /v1/lists/batch-add-to-list-jobs`.

        While `status` is `running`, `results` and `summary` are omitted. Once `status` becomes `completed`, `results` carries the per-item outcome and `summary` carries the per-outcome counts (including `failed_count`) together with `list_size_before` and `list_size_after`. A job created from a search selection reports `summary` counts only — no per-item `results`. On `failed`, `errors` describes the failure.

        Jobs are kept for 7 days after creation.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `lists:read` OAuth2 scope.
        :::
      operationId: getBatchAddToListJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the batch add-to-list job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                completed:
                  summary: Job completed — results and summary populated
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:02Z"
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                            - id: "159001426"
                              type: company
                          list_id: company_123
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        results:
                          - id: "159001425"
                            status: added
                            type: company
                          - id: "159001426"
                            status: already_present
                            type: company
                        status: completed
                        summary:
                          added: 1
                          already_present: 1
                          failed_count: 0
                          list_size_after: 52
                          list_size_before: 51
                          not_found: 0
                          scope_mismatch: 0
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_to_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                completed_advanced_search:
                  summary: Advanced-search job completed — summary only, no per-item results
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:41Z"
                        configuration:
                          advanced_search:
                            filters:
                              items:
                                - field: country_code
                                  operator: in
                                  type: filter
                                  value:
                                    - DE
                              operator: and
                              type: group
                            page:
                              size: 1000
                          list_id: company_123
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: completed
                        summary:
                          added: 975
                          already_present: 12
                          failed_count: 0
                          list_size_after: 1026
                          list_size_before: 51
                          not_found: 13
                          scope_mismatch: 0
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_to_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed:
                  summary: Job failed — errors populated, no results
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:05Z"
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                            - id: "159001426"
                              type: company
                          list_id: company_123
                        created_at: "2026-05-13T12:00:00Z"
                        errors:
                          - code: job_failed
                            title: Membership update could not be applied
                        status: failed
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_to_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed_advanced_search_capacity:
                  summary: Advanced-search job failed — selection would exceed the list's capacity
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:29Z"
                        configuration:
                          advanced_search:
                            filters:
                              items:
                                - field: country_code
                                  operator: in
                                  type: filter
                                  value:
                                    - DE
                              operator: and
                              type: group
                          list_id: company_123
                        created_at: "2026-05-13T12:00:00Z"
                        errors:
                          - code: list_capacity_exceeded
                            title: Applying these operations would exceed the maximum list size
                        status: failed
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_to_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                running:
                  summary: Job still running — no results yet
                  value:
                    data:
                      attributes:
                        completed_at: null
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                            - id: "159001426"
                              type: company
                          list_id: company_123
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: running
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_to_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchAddToListJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch add-to-list job status retrieved
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The job with the ID 'job_550e8400-e29b-41d4-a716-446655440000' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The job wasn't found: the ID is unknown, the job has expired, it belongs to another account, or it is another kind of job."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:read
      summary: Get Batch Add to List Job
      tags:
        - Lists
        - v1
  /v1/lists/batch-remove-from-list-jobs:
    post:
      description: |-
        Schedule an asynchronous job that removes members from a single list. The target list is identified by `data.attributes.list_id` in the request body; its prefix (`company_` or `contact_`) determines whether `company` or `contact` references are accepted. You need permission to change the list's members, and it can't be a read-only list, such as a revealed, CRM or custom feed list. The members are supplied either as an explicit `data.attributes.items` array (up to 100 items per request), or — for company lists only — as a `data.attributes.advanced_search` selection that is resolved into the list's matching companies (up to 100,000) when the job runs. To add members, use `POST /v1/lists/batch-add-to-list-jobs` — adding and removing are separate jobs.

        Returns `202 Accepted` with a job handle. Poll `GET /v1/lists/batch-remove-from-list-jobs/{job_id}` to observe progress and the outcome: per-item `results` plus `summary` counts for `items` jobs, `summary` counts only for jobs created from a search selection.

        Credit Note: Removing members from a list does not consume credits.

        :::info
        Requires the `lists:write` OAuth2 scope.
        :::
      operationId: createBatchRemoveFromListJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              remove_companies:
                summary: Remove companies from a company list
                value:
                  data:
                    attributes:
                      items:
                        - id: "159001425"
                          type: company
                        - id: "159001426"
                          type: company
                      list_id: company_123
                    type: batch_remove_from_list_job
              remove_contacts:
                summary: Remove contacts from a contact list
                value:
                  data:
                    attributes:
                      items:
                        - id: "3170656125"
                          type: contact
                        - id: "3219787635"
                          type: contact
                      list_id: contact_456
                    type: batch_remove_from_list_job
              remove_search_results:
                summary: Remove the companies matching an advanced search from a company list
                value:
                  data:
                    attributes:
                      advanced_search:
                        excluded_company_ids:
                          - "651713"
                        filters:
                          items:
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                            - field: employee_count
                              operator: in_range
                              type: filter
                              value:
                                gte: 50
                          operator: and
                          type: group
                        page:
                          size: 1000
                        sort:
                          direction: desc
                          field: employee_count
                      list_id: company_123
                    type: batch_remove_from_list_job
            schema:
              description: Request body for creating a batch remove-from-list job. The target list is identified by `list_id` inside `data.attributes` — the list ID's prefix (`company_` or `contact_`) determines which kind of references are valid. Supplying references whose type does not match the list scope yields `422 invalid_parameter` (scope mismatch). The members are supplied either as an explicit `items` array, or — for company lists only — as an `advanced_search` selection that is resolved into the list's matching companies when the job runs. Exactly one way of supplying the members must be used.
              example:
                data:
                  attributes:
                    items:
                      - id: "3170656125"
                        type: contact
                      - id: "3219787635"
                        type: contact
                    list_id: contact_456
                  type: batch_remove_from_list_job
              properties:
                data:
                  properties:
                    attributes:
                      oneOf:
                        - required:
                            - items
                        - required:
                            - advanced_search
                      properties:
                        advanced_search:
                          allOf:
                            - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                              example:
                                excluded_company_ids:
                                  - "651713"
                                filters:
                                  items:
                                    - field: country_code
                                      operator: in
                                      type: filter
                                      value:
                                        - DE
                                    - field: employee_count
                                      operator: in_range
                                      type: filter
                                      value:
                                        gte: 50
                                  operator: and
                                  type: group
                                page:
                                  size: 1000
                                sort:
                                  direction: desc
                                  field: employee_count
                              properties:
                                excluded_company_ids:
                                  description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                                  example:
                                    - "651713"
                                  items:
                                    type: string
                                  type: array
                                filters:
                                  description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                                  example:
                                    items:
                                      - field: country_code
                                        operator: in
                                        type: filter
                                        value:
                                          - DE
                                      - items:
                                          - field: employee_count
                                            operator: in_range
                                            type: filter
                                            value:
                                              gte: 50
                                          - field: industries
                                            operator: in
                                            type: filter
                                            value:
                                              classification: nace
                                              codes:
                                                - "62.01"
                                        operator: or
                                        type: group
                                    operator: and
                                    type: group
                                  properties:
                                    items:
                                      description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                                      items:
                                        $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                                      type: array
                                    operator:
                                      description: The logical operator combining the items.
                                      enum:
                                        - and
                                        - or
                                      example: and
                                      type: string
                                    type:
                                      description: Indicates this is the root filter group.
                                      enum:
                                        - group
                                      example: group
                                      type: string
                                  required:
                                    - type
                                    - operator
                                    - items
                                  type: object
                                page:
                                  description: Bounds how many of the matching companies are selected.
                                  properties:
                                    size:
                                      description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                                      example: 1000
                                      minimum: 1
                                      type: integer
                                  type: object
                                sort:
                                  description: Ordering applied to the matching companies. Omit to use the default ordering.
                                  properties:
                                    direction:
                                      default: asc
                                      description: Sort direction. Defaults to `asc`.
                                      enum:
                                        - asc
                                        - desc
                                      example: desc
                                      type: string
                                    field:
                                      description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                                      example: employee_count,name
                                      type: string
                                  type: object
                              required:
                                - filters
                              type: object
                            - properties:
                                page:
                                  properties:
                                    size:
                                      maximum: 100000
                            - description: "Remove every company on the list that matches an advanced search, instead of listing companies one by one in `items`. Use the same `filters`, `sort` and `page` you would when browsing companies; the search runs only on the companies on the list. When the job runs, it takes the matches in `sort` order up to `page.size` (at most 100,000, which is also the default), then drops the `excluded_company_ids`, so fewer than `page.size` can be removed. The search checks the filters and the sort only then: a filter tree or sort it rejects fails the job with the search's own error, such as `invalid_filters`. To search only the list, the job combines your filters with a filter on the list, which counts toward the search's limits of 50 filters and groups and 5 levels. A company on the list whose ID the global company database no longer has, for example after a merge with another company, can't match and stays on the list. This is only available for company lists — it can't be used on a contact list or together with `items`. The outcome is reported as `summary` counts rather than a per-company `results` list."
                        items:
                          description: "The company or contact references to remove from the list. A maximum of 100 items may be supplied, repeats included. Every item's `type` must match the target list's kind (company list → `company`, contact list → `contact`). An item sent more than once is removed and reported once. The job doesn't check whether an item is on the list: an item whose ID is a number is reported as `removed` either way, and one whose ID isn't a number as `not_found`. Mutually exclusive with `advanced_search`."
                          items:
                            properties:
                              id:
                                description: The Dealfront entity ID.
                                example: "3170656125"
                                type: string
                              type:
                                description: The entity type of the reference — must match the target list's kind.
                                enum:
                                  - company
                                  - contact
                                example: contact
                                type: string
                            required:
                              - type
                              - id
                            type: object
                          maxItems: 100
                          minItems: 1
                          type: array
                        list_id:
                          description: The scope-prefixed target list identifier (e.g. `company_123` or `contact_456`). Its prefix determines which kind of references may appear in `items`. You need permission to change its members, and it can't be a read-only list, such as a revealed, CRM or custom feed list.
                          example: contact_456
                          type: string
                      required:
                        - list_id
                      type: object
                    type:
                      default: batch_remove_from_list_job
                      description: The job resource type. Optional — the operation is fixed by the endpoint, so a value supplied here is ignored.
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      items:
                        - id: "3170656125"
                          type: contact
                        - id: "3219787635"
                          type: contact
                      list_id: contact_456
                    created_at: "2026-05-13T12:00:00Z"
                    errors: []
                    status: running
                  id: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
                  type: batch_remove_from_list_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchRemoveFromListJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch remove-from-list job accepted and enqueued
        "400":
          content:
            application/json:
              examples:
                invalid_json:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must be valid JSON
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_attributes:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must include a 'data.attributes' object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Malformed request envelope — the body is not valid JSON or is missing the required `data.attributes` object.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User has no API access on the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the `lists:write` scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `lists:write` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include API access
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_not_editable:
                  summary: You may not change the list's members
                  value:
                    errors:
                      - code: list_access_denied
                        title: You do not have permission to change the members of the list
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The list is read-only
                  value:
                    errors:
                      - code: list_read_only
                        title: The list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "Forbidden: the credentials are valid but don't allow this request. The gateway refuses a user without API access on the account, a plan without API access, a token without the `lists:write` scope, and a missing or foreign `account_id`. The request is also refused when you may not change the list's members (for example, because it is shared with you for viewing only), or when it is a read-only list, such as a revealed, CRM or custom feed list."
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested list could not be found
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: List not found in this account, or you may not read it. Returned synchronously, before any job is created.
        "422":
          content:
            application/json:
              examples:
                advanced_search_excluded_ids_not_an_array:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.excluded_company_ids must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_filters_too_large:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.filters must not exceed 65536 bytes
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_on_contact_list:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search is only supported for company lists
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_size_out_of_range:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page.size must be an integer between 1 and 100000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_sort_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.sort must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_without_filters:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.filters is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                empty_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must contain at least one item
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_list_id:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Invalid list ID format
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                item_without_type_or_id:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Each item must have type and id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                items_and_advanced_search:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: items and advanced_search are mutually exclusive
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                no_members:
                  summary: Neither `items` nor a selection was sent, or `items` isn't an array
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                scope_mismatch:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: List 'contact' only accepts contact members
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                scope_mismatch_company_list:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: List 'company' only accepts company members
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: A maximum of 100 items may be supplied per request
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: A well-formed envelope that fails domain validation — scope mismatch (item `type` does not match the list's kind), empty `items`, more than 100 items, both `items` and `advanced_search` supplied, an `advanced_search` selection on a contact list, without `filters` or with `filters` over 65,536 bytes, or a list ID, item or selection field that breaks another rule (the title says which). Removals cannot exceed list capacity, so there is no `list_capacity_exceeded` on this endpoint.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:write
      summary: Create Batch Remove from List Job
      tags:
        - Lists
        - v1
  /v1/lists/batch-remove-from-list-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a batch remove-from-list job created via `POST /v1/lists/batch-remove-from-list-jobs`.

        While `status` is `running`, `results` and `summary` are omitted. Once `status` becomes `completed`, `results` carries the per-item outcome and `summary` carries the per-outcome counts (including `failed_count`) together with `list_size_after`. A job created from a search selection reports `summary` counts only — no per-item `results`. On `failed`, `errors` describes the failure.

        Jobs are kept for 7 days after creation.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `lists:read` OAuth2 scope.
        :::
      operationId: getBatchRemoveFromListJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the batch remove-from-list job.
          example: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                completed:
                  summary: Job completed — results and summary populated
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:02Z"
                        configuration:
                          items:
                            - id: "3170656125"
                              type: contact
                            - id: "3219787635"
                              type: contact
                          list_id: contact_456
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        results:
                          - id: "3170656125"
                            status: removed
                            type: contact
                          - id: "3219787635"
                            status: removed
                            type: contact
                        status: completed
                        summary:
                          failed_count: 0
                          list_size_after: 49
                          not_found: 0
                          not_present: 0
                          removed: 2
                          scope_mismatch: 0
                      id: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
                      type: batch_remove_from_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                completed_advanced_search:
                  summary: Advanced-search job completed — summary only, no per-item results
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:41Z"
                        configuration:
                          advanced_search:
                            filters:
                              items:
                                - field: country_code
                                  operator: in
                                  type: filter
                                  value:
                                    - DE
                              operator: and
                              type: group
                            page:
                              size: 1000
                          list_id: company_123
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: completed
                        summary:
                          failed_count: 0
                          list_size_after: 51
                          not_found: 0
                          not_present: 0
                          removed: 987
                          scope_mismatch: 0
                      id: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
                      type: batch_remove_from_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed:
                  summary: Job failed — errors populated, no results
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:05Z"
                        configuration:
                          items:
                            - id: "3170656125"
                              type: contact
                            - id: "3219787635"
                              type: contact
                          list_id: contact_456
                        created_at: "2026-05-13T12:00:00Z"
                        errors:
                          - code: job_failed
                            title: Membership update could not be applied
                        status: failed
                      id: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
                      type: batch_remove_from_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed_advanced_search_list_deleted:
                  summary: Advanced-search job failed — the list was deleted before the job ran
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:03Z"
                        configuration:
                          advanced_search:
                            filters:
                              items:
                                - field: country_code
                                  operator: in
                                  type: filter
                                  value:
                                    - DE
                              operator: and
                              type: group
                          list_id: company_123
                        created_at: "2026-05-13T12:00:00Z"
                        errors:
                          - code: unprocessable_entity
                            title: A list used in the search no longer exists or cannot be accessed.
                        status: failed
                      id: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
                      type: batch_remove_from_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                running:
                  summary: Job still running — no results yet
                  value:
                    data:
                      attributes:
                        completed_at: null
                        configuration:
                          items:
                            - id: "3170656125"
                              type: contact
                            - id: "3219787635"
                              type: contact
                          list_id: contact_456
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: running
                      id: job_7c9e6679-7425-40de-944b-e07fc1f90ae7
                      type: batch_remove_from_list_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchRemoveFromListJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch remove-from-list job status retrieved
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The job with the ID 'job_550e8400-e29b-41d4-a716-446655440000' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The job wasn't found: the ID is unknown, the job has expired, it belongs to another account, or it is another kind of job."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:read
      summary: Get Batch Remove from List Job
      tags:
        - Lists
        - v1
  /v1/lists/companies:
    post:
      description: |-
        Find out which lists each of your companies belongs to. Pass up to 100 company IDs in `ids` and get one entry per company, in the same order.

        Each entry names the lists by ID. Pass `include=lists` to get each list's full details instead, so you do not need a second call to resolve names.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `lists:read` OAuth2 scope.
        :::
      operationId: getCompanyListMemberships
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: Pass `lists` to include each list's full details in the response instead of bare references.
          in: query
          name: include
          schema:
            enum:
              - lists
            type: string
      requestBody:
        content:
          application/json:
            example:
              ids:
                - "159001425"
                - "129011"
            schema:
              additionalProperties: false
              properties:
                ids:
                  description: Company IDs to look up. A maximum of 100 IDs can be passed.
                  items:
                    example: "159001425"
                    type: string
                  maxItems: 100
                  minItems: 1
                  type: array
              required:
                - ids
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                loaded:
                  summary: With include=lists — each list in full
                  value:
                    data:
                      - id: "159001425"
                        relationships:
                          lists:
                            - attributes:
                                created_at: "2024-12-10T15:57:25Z"
                                name: US Prospects
                                scope: company
                                updated_at: "2024-11-24T11:50:00Z"
                              id: company_123
                              relationships:
                                created_by:
                                  id: "12345"
                                  type: user
                              type: list
                            - attributes:
                                created_at: "2024-12-11T09:12:03Z"
                                name: Target Accounts
                                scope: company
                                updated_at: "2024-12-11T09:12:03Z"
                              id: company_456
                              relationships:
                                created_by:
                                  id: "12345"
                                  type: user
                              type: list
                        type: company
                      - id: "129011"
                        relationships:
                          lists: []
                        type: company
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                references:
                  summary: Default — the lists a company belongs to, by ID
                  value:
                    data:
                      - id: "159001425"
                        relationships:
                          lists:
                            - id: company_123
                              type: list
                            - id: company_456
                              type: list
                        type: company
                      - id: "129011"
                        relationships:
                          lists: []
                        type: company
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    description: One entry per requested company, in the order the IDs were supplied.
                    items:
                      description: A company from the request, carrying the lists it belongs to. No company attributes are returned — this resource reports membership only.
                      properties:
                        id:
                          description: The Leadfeeder company ID.
                          example: "129011"
                          type: string
                        relationships:
                          properties:
                            lists:
                              description: The lists this company belongs to, empty when it belongs to none. Bare references by default — resolve names via **Retrieve Lists** — or full list records when the request passes `include=lists`.
                              items:
                                anyOf:
                                  - additionalProperties: false
                                    description: A bare reference to a list by ID.
                                    properties:
                                      id:
                                        description: The list ID, as returned by the **Retrieve Lists** and **Get List Details** endpoints.
                                        example: company_123
                                        type: string
                                      type:
                                        const: list
                                        example: list
                                        type: string
                                    required:
                                      - type
                                      - id
                                    type: object
                                  - $ref: "#/components/schemas/ListV1"
                              type: array
                          required:
                            - lists
                          type: object
                        type:
                          const: company
                          example: company
                          type: string
                      required:
                        - type
                        - id
                        - relationships
                      type: object
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Company list memberships retrieved
        "400":
          content:
            application/json:
              examples:
                invalid_id:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The ID 'not-an-id' is not a valid numeric ID.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_ids:
                  summary: The ids array was not supplied or holds no IDs
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The list of IDs is required and cannot be left empty.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                not_an_array:
                  summary: ids was supplied as something other than an array
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The list of IDs must be an array.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The number of IDs supplied exceeds the permitted limit of 100.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The supplied company IDs are missing or invalid
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:read
      summary: Retrieve Company List Memberships
      tags:
        - Lists
        - v1
  /v1/lists/contacts:
    post:
      description: |-
        Find out which lists each of your contacts belongs to. Pass up to 100 contact IDs in `ids` and get one entry per contact, in the same order.

        Each entry names the lists by ID. Pass `include=lists` to get each list's full details instead, so you do not need a second call to resolve names.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `lists:read` OAuth2 scope.
        :::
      operationId: getContactListMemberships
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: Pass `lists` to include each list's full details in the response instead of bare references.
          in: query
          name: include
          schema:
            enum:
              - lists
            type: string
      requestBody:
        content:
          application/json:
            example:
              ids:
                - "3219787601"
                - "3219787635"
            schema:
              additionalProperties: false
              properties:
                ids:
                  description: Contact IDs to look up. A maximum of 100 IDs can be passed.
                  items:
                    example: "3219787601"
                    type: string
                  maxItems: 100
                  minItems: 1
                  type: array
              required:
                - ids
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                loaded:
                  summary: With include=lists — each list in full
                  value:
                    data:
                      - id: "3219787601"
                        relationships:
                          lists:
                            - attributes:
                                created_at: "2024-12-10T15:57:25Z"
                                name: Decision Makers
                                scope: contact
                                updated_at: "2024-11-24T11:50:00Z"
                              id: contact_321
                              relationships:
                                created_by:
                                  id: "12345"
                                  type: user
                              type: list
                        type: contact
                      - id: "3219787635"
                        relationships:
                          lists: []
                        type: contact
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                references:
                  summary: Default — the lists a contact belongs to, by ID
                  value:
                    data:
                      - id: "3219787601"
                        relationships:
                          lists:
                            - id: contact_321
                              type: list
                        type: contact
                      - id: "3219787635"
                        relationships:
                          lists: []
                        type: contact
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    description: One entry per requested contact, in the order the IDs were supplied.
                    items:
                      description: A contact from the request, carrying the lists it belongs to. No contact attributes are returned — this resource reports membership only.
                      properties:
                        id:
                          description: The Leadfeeder contact ID.
                          example: "435834"
                          type: string
                        relationships:
                          properties:
                            lists:
                              description: The lists this contact belongs to, empty when it belongs to none. Bare references by default — resolve names via **Retrieve Lists** — or full list records when the request passes `include=lists`.
                              items:
                                anyOf:
                                  - additionalProperties: false
                                    description: A bare reference to a list by ID.
                                    properties:
                                      id:
                                        description: The list ID, as returned by the **Retrieve Lists** and **Get List Details** endpoints.
                                        example: company_123
                                        type: string
                                      type:
                                        const: list
                                        example: list
                                        type: string
                                    required:
                                      - type
                                      - id
                                    type: object
                                  - $ref: "#/components/schemas/ListV1"
                              type: array
                          required:
                            - lists
                          type: object
                        type:
                          const: contact
                          example: contact
                          type: string
                      required:
                        - type
                        - id
                        - relationships
                      type: object
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Contact list memberships retrieved
        "400":
          content:
            application/json:
              examples:
                invalid_id:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The ID 'not-an-id' is not a valid numeric ID.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_ids:
                  summary: The ids array was not supplied or holds no IDs
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The list of IDs is required and cannot be left empty.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                not_an_array:
                  summary: ids was supplied as something other than an array
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The list of IDs must be an array.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_ids:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The number of IDs supplied exceeds the permitted limit of 100.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The supplied contact IDs are missing or invalid
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:read
      summary: Retrieve Contact List Memberships
      tags:
        - Lists
        - v1
  /v1/lists/{id}:
    delete:
      description: |-
        Delete a list from the account.
        Once removed, the list will no longer be accessible.

        Credit Note: Deleting list does not consume credits.

        :::info
        Requires the `lists:write` OAuth2 scope.
        :::
      operationId: deleteList
      parameters:
        - description: Unique identifier of the list (e.g. `company_123`)
          example: company_123
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:write
      summary: Delete List
      tags:
        - Lists
        - v1
    get:
      description: |-
        Retrieve the details of a specific list using its unique ID.
        The response includes the list's attributes, such as its name and scope, along with any related information requested through query parameters. This endpoint is used to fetch the full definition of a list before viewing, updating, or managing its assigned items.

        Credit Note: Retrieving list definitions does not consume credits.

        :::info
        Requires the `lists:read` OAuth2 scope.
        :::
      operationId: getList
      parameters:
        - description: Unique identifier of the list (e.g. `company_123`)
          example: company_123
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ListV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:read
      summary: Get List Details
      tags:
        - Lists
        - v1
    patch:
      description: |-
        Update the name of a list.

        Credit Note: Updating list name does not consume credits.

        :::info
        Requires the `lists:write` OAuth2 scope.
        :::
      operationId: updateList
      parameters:
        - description: Unique identifier of the list (e.g. `company_123`)
          example: company_123
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  name: Updated List Name
                type: list
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        name:
                          description: The new name of the list
                          type: string
                      required:
                        - name
                      type: object
                    type:
                      default: list
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/ListV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:write
      summary: Update List
      tags:
        - Lists
        - v1
  /v1/lists/{id}/items:
    get:
      description: |-
        Retrieve the members of a list. The list is addressed by its `{id}`, a scope-prefixed list identifier (e.g. `company_123` or `contact_456`). There is a single `List` resource: the list's `list_type` determines whether the members are companies or contacts.

        The response contains bare references (IDs only) in `data`, with `type` following the list's `list_type` (`company` for a company list, `contact` for a contact list). Results are cursor-paginated. To retrieve the full company or contact data for these members, pass the returned IDs to the Retrieve Companies (`GET /v1/companies`) or Retrieve Contacts (`GET /v1/contacts`) endpoints.

        Credit Note: Retrieving list members does not consume credits.

        :::info
        Requires the `lists:read` OAuth2 scope.
        :::
      operationId: getListItems
      parameters:
        - description: Unique identifier of the list (e.g. `company_123`)
          example: company_123
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageCursor"
        - $ref: "#/components/parameters/PageSize"
      responses:
        "200":
          content:
            application/json:
              examples:
                company_references_only:
                  summary: Company list — bare company references
                  value:
                    data:
                      - id: "159001425"
                        type: company
                      - id: "129011"
                        type: company
                    meta:
                      pagination:
                        next_cursor: MzUzNTQxMzEyMQ==
                        total_count: 51
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                contact_references_only:
                  summary: Contact list — bare contact references
                  value:
                    data:
                      - id: "3170656125"
                        type: contact
                      - id: "3219787635"
                        type: contact
                    meta:
                      pagination:
                        next_cursor: MzUzNTQxMzEyMQ==
                        total_count: 320
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    anyOf:
                      - items:
                          additionalProperties: false
                          properties:
                            id:
                              description: The Leadfeeder company ID.
                              example: "129011"
                              type: string
                            type:
                              const: company
                              type: string
                          required:
                            - id
                            - type
                          type: object
                        type: array
                      - items:
                          additionalProperties: false
                          description: A bare reference to a contact by ID.
                          properties:
                            id:
                              description: The Leadfeeder contact ID.
                              example: "435834"
                              type: string
                            type:
                              const: contact
                              example: contact
                              type: string
                          required:
                            - type
                            - id
                          type: object
                        type: array
                    description: "The members belonging to the list, as bare references (`type` + `id`). The member type follows the list's `list_type`: company lists return company references, contact lists contact references."
                  meta:
                    properties:
                      pagination:
                        properties:
                          next_cursor:
                            description: Cursor to fetch the next page of results, or `null` when there are no more pages.
                            example: MzUzNTQxMzEyMQ==
                            type:
                              - string
                              - "null"
                          total_count:
                            description: Total number of members in the list.
                            example: 51
                            type: integer
                        required:
                          - next_cursor
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: List items retrieved
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: invalid_parameter
                    title: Invalid pagination cursor
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Invalid pagination cursor
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              examples:
                unknown_list:
                  value:
                    errors:
                      - code: entity_not_found
                        title: The requested list could not be found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                unresolvable_id:
                  value:
                    errors:
                      - code: entity_not_found
                        title: The list with the ID '999999999' could not be found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: List not found — the id is unknown, not accessible in this account, or not a resolvable list identifier (e.g. missing the `company_`/`contact_` scope prefix)
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: invalid_parameter
                    title: page[size] must be a positive integer
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: A pagination parameter is present but invalid (e.g. `page[size]` is zero, negative, or non-numeric)
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - lists:read
      summary: Retrieve List Items
      tags:
        - Lists
        - v1
  /v1/settings/cookie-consent:
    get:
      description: |-
        Returns the account's cookie consent management state.

        :::info
        Requires the `accounts:read` OAuth2 scope.
        :::
      operationId: getCookieConsentSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    consent_management_enabled: false
                  id: "123456"
                  type: cookie_consent_settings
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: "#/components/schemas/CookieConsentSettingsV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Cookie consent settings
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - accounts:read
      summary: Get Cookie Consent Settings
      tags:
        - Settings
        - v1
    patch:
      description: |-
        Toggles cookie consent management for the account. When enabled, the Leadfeeder tracker does not set its cookie on page load until the visitor grants consent. Integration cookies cannot be modified through the API.

        **Side effect:** if `consent_management_enabled` is set to `true` and the Leadfeeder Analytics cookie (`lfa_cookie_enabled`) is currently `false`, enabling consent management will also activate the Leadfeeder cookie automatically.

        :::info
        Requires the `accounts:write` OAuth2 scope.
        :::
      operationId: updateCookieConsentSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  consent_management_enabled: true
                type: cookie_consent_settings
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        consent_management_enabled:
                          description: "`true` to enable consent-gated cookie placement; `false` to set the cookie immediately on page load."
                          type: boolean
                      required:
                        - consent_management_enabled
                      type: object
                    type:
                      const: cookie_consent_settings
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    consent_management_enabled: false
                  id: "123456"
                  type: cookie_consent_settings
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: "#/components/schemas/CookieConsentSettingsV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Cookie consent settings
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - accounts:write
      summary: Update Cookie Consent Settings
      tags:
        - Settings
        - v1
  /v1/settings/data-processing:
    get:
      description: |-
        Returns the current "Allow third-party providers" state for the account and its full change history, ordered most-recent-first. Each changelog entry records what was set, who set it, and when.

        :::info
        Requires the `accounts:read` OAuth2 scope.
        :::
      operationId: getDataProcessingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    changelog:
                      - changed_at: "2026-06-15T09:30:00Z"
                        changed_by_email: jane.smith@example.com
                        changed_by_name: Jane Smith
                        enabled: true
                      - changed_at: "2026-05-01T14:00:00Z"
                        changed_by_email: john.doe@example.com
                        changed_by_name: John Doe
                        enabled: false
                    enabled: true
                  id: "123456"
                  type: data_processing_settings
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: "#/components/schemas/DataProcessingSettingsV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Data processing settings
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - accounts:read
      summary: Get Data Processing Settings
      tags:
        - Settings
        - v1
    patch:
      description: |-
        Enables or disables third-party data enrichment providers for the account. Disabling stops contact data enrichment via third-party providers. The change is recorded in the changelog with the acting API user's identity.

        :::info
        Requires the `accounts:write` OAuth2 scope.
        :::
      operationId: updateDataProcessingSettings
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  enabled: false
                type: data_processing_settings
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        enabled:
                          description: "`true` to allow third-party enrichment providers; `false` to disable them."
                          type: boolean
                      required:
                        - enabled
                      type: object
                    type:
                      const: data_processing_settings
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    changelog:
                      - changed_at: "2026-06-15T09:30:00Z"
                        changed_by_email: jane.smith@example.com
                        changed_by_name: Jane Smith
                        enabled: true
                      - changed_at: "2026-05-01T14:00:00Z"
                        changed_by_email: john.doe@example.com
                        changed_by_name: John Doe
                        enabled: false
                    enabled: true
                  id: "123456"
                  type: data_processing_settings
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: "#/components/schemas/DataProcessingSettingsV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Data processing settings
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - accounts:write
      summary: Update Data Processing Settings
      tags:
        - Settings
        - v1
  /v1/subscriptions/purchase-links:
    post:
      description: |-
        Create a link to the account's purchase page in the Leadfeeder app, with the product, tier, billing option and payment method the user chose preselected. The purchase itself is made in the app, not through the API, by a user who can manage billing on the account. Every preselection is optional, and a request without a body creates a plain link.

        Take every value to preselect from the account's `GET /v1/subscriptions/purchase-options` response, which lists what the account can buy.

        Credit Note: Creating a purchase link does not consume credits.

        :::info
        Requires the `accounts:read` OAuth2 scope.
        :::
      operationId: createPurchaseLink
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  billing_interval_months: 12
                  initial_contract_term_months: 12
                  payment_method: invoiced
                  product_feature: leadfeeder_activate
                  tier_id: "1000_1000"
                type: purchase_link
            schema:
              properties:
                data:
                  description: The choices to preselect on the purchase page. Leave it out for a plain link.
                  properties:
                    attributes:
                      description: Every attribute is optional, and `null` is the same as leaving it out. Take the values from `GET /v1/subscriptions/purchase-options`.
                      properties:
                        billing_interval_months:
                          description: Months between charges. Defaults to `initial_contract_term_months`, or to `12` when that's left out too.
                          enum:
                            - 1
                            - 12
                            - null
                          type:
                            - integer
                            - "null"
                        initial_contract_term_months:
                          description: Length of the first contract term in months. Defaults to `billing_interval_months`, or to `12` when that's left out too.
                          enum:
                            - 1
                            - 12
                            - null
                          type:
                            - integer
                            - "null"
                        payment_method:
                          default: credit_card
                          description: How the purchase is paid, one of the billing option's `payment_methods`. Defaults to `credit_card`.
                          enum:
                            - credit_card
                            - invoiced
                            - null
                          type:
                            - string
                            - "null"
                          x-apidog-enum:
                            - description: Paid by credit card
                              value: credit_card
                            - description: Paid by invoice
                              value: invoiced
                        product_feature:
                          description: The product to preselect, as a product's `feature` from `GET /v1/subscriptions/purchase-options` (`data.attributes.products[].feature`).
                          type:
                            - string
                            - "null"
                        tier_id:
                          description: The tier to preselect, as the `id` of a tier in the chosen product's billing option from `GET /v1/subscriptions/purchase-options` (`data.attributes.products[].billing_options[].tiers[].id`). Requires `product_feature`.
                          type:
                            - string
                            - "null"
                      type: object
                    type:
                      const: purchase_link
                      description: The type of the object
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              type: object
        required: false
      responses:
        "201":
          content:
            application/json:
              examples:
                plain_link:
                  summary: A plain link, with the defaults filled in
                  value:
                    data:
                      attributes:
                        billing_interval_months: 12
                        expires_at: "2026-11-03T10:15:00Z"
                        initial_contract_term_months: 12
                        payment_method: credit_card
                        product_feature: null
                        tier_id: null
                        url: https://app.leadfeeder.com/f/settings/purchase/123456?purchaseLink=pl_Hq7nC4wY1sK6dPeR
                      id: pl_Hq7nC4wY1sK6dPeR
                      type: purchase_link
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                selection:
                  summary: A product, tier, billing option and payment method preselected
                  value:
                    data:
                      attributes:
                        billing_interval_months: 12
                        expires_at: "2026-11-03T10:15:00Z"
                        initial_contract_term_months: 12
                        payment_method: invoiced
                        product_feature: leadfeeder_activate
                        tier_id: "1000_1000"
                        url: https://app.leadfeeder.com/f/settings/purchase/123456?purchaseLink=pl_Zk3m9QxT2vR8wLbN
                      id: pl_Zk3m9QxT2vR8wLbN
                      type: purchase_link
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/PurchaseLinkV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Created
        "400":
          content:
            application/json:
              examples:
                not_a_json_object:
                  summary: The body isn't a JSON object
                  value:
                    errors:
                      - code: bad_request
                        title: The request body must be a JSON object.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                outside_the_schema:
                  summary: Two values outside the schema
                  value:
                    errors:
                      - code: bad_request
                        source:
                          pointer: /data/attributes/billing_interval_months
                        title: "must be one of: 1, 12"
                      - code: bad_request
                        source:
                          pointer: /data/attributes/payment_method
                        title: "must be one of: credit_card, invoiced"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                tier_without_product:
                  summary: tier_id without product_feature
                  value:
                    errors:
                      - code: bad_request
                        title: tier_id requires product_feature.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The body isn't a JSON object, a value is outside the schema, or `tier_id` is sent without `product_feature`. Each value outside the schema gets its own error, with a `source.pointer` to it.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              examples:
                account_cant_buy:
                  summary: The account can't buy anything
                  value:
                    errors:
                      - code: unprocessable_entity
                        title: The tracker was installed 3 days ago. Purchases unlock in 4 days, once it has collected enough data.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                billing_option_not_sold:
                  summary: The product isn't sold with the billing option
                  value:
                    errors:
                      - code: unprocessable_entity
                        title: Leadfeeder Scale isn't sold with billing_interval_months 1 and initial_contract_term_months 1.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                payment_method_not_offered:
                  summary: The billing option doesn't offer the payment method
                  value:
                    errors:
                      - code: unprocessable_entity
                        title: Invoiced payment isn't offered with billing_interval_months 1 and initial_contract_term_months 1.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                product_cant_be_bought:
                  summary: The account can't buy the product
                  value:
                    errors:
                      - code: unprocessable_entity
                        title: Leadfeeder Discover needs the tracker installed on your website.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The account can't buy anything in the Leadfeeder app, not even with a plain link, or it can't buy the selection: an unknown product or tier, a product the account can't buy, a billing option the product isn't sold with, or a payment method the billing option doesn't offer. The `title` names the rule that failed."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - accounts:read
      summary: Create a Purchase Link
      tags:
        - Subscriptions
        - v1
  /v1/subscriptions/purchase-options:
    get:
      description: |-
        Retrieve what the account can buy in the Leadfeeder app if it starts a new subscription now: the products, how each can be billed, the tiers and their prices, and the product to recommend. The purchase itself is made in the app, not through the API. A product with a `disallow_reason` can't be bought. When the account can't buy any product, `disallow_reason` says why and `products` is empty.

        Credit Note: Retrieving purchase options does not consume credits.

        :::info
        Requires the `accounts:read` OAuth2 scope.
        :::
      operationId: getPurchaseOptions
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              examples:
                currentPricing:
                  summary: Current pricing, no tracker installed, account in Germany
                  value:
                    data:
                      attributes:
                        currency: EUR
                        disallow_reason: null
                        products:
                          - billing_options:
                              - billing_interval_months: 1
                                credits_reset_interval_months: 1
                                initial_contract_term_months: 1
                                payment_methods:
                                  - credit_card
                                tiers:
                                  - credits_per_reset_interval: 50
                                    id: "50_50"
                                    leads_per_month: 50
                                    price_without_vat: 113
                              - billing_interval_months: 12
                                credits_reset_interval_months: 12
                                initial_contract_term_months: 12
                                payment_methods:
                                  - credit_card
                                  - invoiced
                                tiers:
                                  - credits_per_reset_interval: 600
                                    id: "50_50"
                                    leads_per_month: 50
                                    price_without_vat: 948
                            description: See which companies are on your site, in real time.
                            disallow_reason:
                              title: Leadfeeder Discover needs the tracker installed on your website.
                            feature: leadfeeder_discover
                            highlights:
                              - Real-time company identification
                              - Notifications on target accounts
                              - AI notifications on high-intent visits
                              - CRM, API, Google Ads, and LinkedIn integrations
                            name: Leadfeeder Discover
                            recommended: false
                          - billing_options:
                              - billing_interval_months: 1
                                credits_reset_interval_months: 1
                                initial_contract_term_months: 1
                                payment_methods:
                                  - credit_card
                                tiers:
                                  - credits_per_reset_interval: 200
                                    id: "1000_200"
                                    leads_per_month: 1000
                                    price_without_vat: 527
                                  - credits_per_reset_interval: 500
                                    id: "1000_500"
                                    leads_per_month: 1000
                                    price_without_vat: 599
                                  - credits_per_reset_interval: 1000
                                    id: "1000_1000"
                                    leads_per_month: 1000
                                    price_without_vat: 641
                                  - credits_per_reset_interval: 1500
                                    id: "1000_1500"
                                    leads_per_month: 1000
                                    price_without_vat: 713
                              - billing_interval_months: 12
                                credits_reset_interval_months: 12
                                initial_contract_term_months: 12
                                payment_methods:
                                  - credit_card
                                  - invoiced
                                tiers:
                                  - credits_per_reset_interval: 2400
                                    id: "1000_200"
                                    leads_per_month: 1000
                                    price_without_vat: 4428
                                  - credits_per_reset_interval: 6000
                                    id: "1000_500"
                                    leads_per_month: 1000
                                    price_without_vat: 5028
                                  - credits_per_reset_interval: 12000
                                    id: "1000_1000"
                                    leads_per_month: 1000
                                    price_without_vat: 5388
                                  - credits_per_reset_interval: 18000
                                    id: "1000_1500"
                                    leads_per_month: 1000
                                    price_without_vat: 5988
                            description: Prioritize the accounts showing buying intent.
                            disallow_reason: null
                            feature: leadfeeder_activate
                            highlights:
                              - Everything in Discover
                              - Advanced search filters
                              - AI list enrichment
                              - CRM automations
                              - Campaigns - B2B Display Ads
                            name: Leadfeeder Activate
                            recommended: true
                          - billing_options:
                              - billing_interval_months: 12
                                credits_reset_interval_months: 12
                                initial_contract_term_months: 12
                                payment_methods:
                                  - credit_card
                                  - invoiced
                                tiers:
                                  - credits_per_reset_interval: 12000
                                    id: "2000_1000"
                                    leads_per_month: 2000
                                    price_without_vat: 7188
                                  - credits_per_reset_interval: 18000
                                    id: "2000_1500"
                                    leads_per_month: 2000
                                    price_without_vat: 7908
                                  - credits_per_reset_interval: 24000
                                    id: "2000_2000"
                                    leads_per_month: 2000
                                    price_without_vat: 8748
                                  - credits_per_reset_interval: 30000
                                    id: "2000_2500"
                                    leads_per_month: 2000
                                    price_without_vat: 9708
                                  - credits_per_reset_interval: 36000
                                    id: "2000_3000"
                                    leads_per_month: 2000
                                    price_without_vat: 10788
                                  - credits_per_reset_interval: 48000
                                    id: "2000_4000"
                                    leads_per_month: 2000
                                    price_without_vat: 12708
                                  - credits_per_reset_interval: 66000
                                    id: "2000_5500"
                                    leads_per_month: 2000
                                    price_without_vat: 14028
                            description: Automate your pipeline motion.
                            disallow_reason: null
                            feature: leadfeeder_scale
                            highlights:
                              - Everything in Activate
                              - Automatic CRM data enrichment
                              - Single record exports & CRM syncs without credits
                              - Dedicated CSM
                            name: Leadfeeder Scale
                            recommended: false
                        start_date: "2026-10-05"
                      id: "123456"
                      relationships:
                        account:
                          id: "123456"
                          type: account
                      type: purchase_options
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                legacyPricing:
                  summary: Legacy pricing, at the 200-leads level
                  value:
                    data:
                      attributes:
                        currency: EUR
                        disallow_reason: null
                        products:
                          - billing_options:
                              - billing_interval_months: 1
                                credits_reset_interval_months: null
                                initial_contract_term_months: 1
                                payment_methods:
                                  - credit_card
                                tiers:
                                  - credits_per_reset_interval: null
                                    id: "200"
                                    leads_per_month: 200
                                    price_without_vat: 204
                              - billing_interval_months: 1
                                credits_reset_interval_months: null
                                initial_contract_term_months: 12
                                payment_methods:
                                  - credit_card
                                tiers:
                                  - credits_per_reset_interval: null
                                    id: "200"
                                    leads_per_month: 200
                                    price_without_vat: 163.33
                              - billing_interval_months: 12
                                credits_reset_interval_months: null
                                initial_contract_term_months: 12
                                payment_methods:
                                  - credit_card
                                  - invoiced
                                tiers:
                                  - credits_per_reset_interval: null
                                    id: "200"
                                    leads_per_month: 200
                                    price_without_vat: 1714
                            description: Identify the companies visiting your website and see what they're interested in.
                            disallow_reason: null
                            feature: web_visitors
                            highlights:
                              - Company identification for website visitors
                              - Unlimited users
                              - Unlimited visit data storage
                              - Visit history and pages viewed
                              - Custom feeds and lead scoring
                              - CRM and email integrations
                            name: Web Visitors
                            recommended: true
                        start_date: "2026-10-05"
                      id: "234567"
                      relationships:
                        account:
                          id: "234567"
                          type: account
                      type: purchase_options
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                nothingToBuy:
                  summary: Nothing the account can buy
                  value:
                    data:
                      attributes:
                        currency: null
                        disallow_reason:
                          title: The tracker was installed 3 days ago. Purchases unlock in 4 days, once it has collected enough data.
                        products: []
                        start_date: null
                      id: "123456"
                      relationships:
                        account:
                          id: "123456"
                          type: account
                      type: purchase_options
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/PurchaseOptionsV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - accounts:read
      summary: Get Purchase Options
      tags:
        - Subscriptions
        - v1
  /v1/tags:
    get:
      description: |-
        Retrieve the list of all tags available in the account.
        The response contains all tag definitions, including their identifiers, display names, and colors, which can be used to classify or filter companies within the platform.
        Credit Note: Retrieving tag data does not consume credits.

        :::info
        Requires the `tags:read` OAuth2 scope.
        :::
      operationId: getTags
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageNum"
        - $ref: "#/components/parameters/PageSize"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      color: 0
                      created_at: "2024-12-10T15:57:25Z"
                      name: Prospects
                      updated_at: "2024-11-24T11:50:00Z"
                    id: 4b7e2c9f
                    relationships:
                      created_by:
                        id: abc123
                        type: user
                    type: tag
                meta:
                  pagination:
                    page_count: 1
                    page_num: 1
                    total_count: 1
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/TagV1"
                    type: array
                  meta:
                    properties:
                      pagination:
                        properties:
                          page_count:
                            example: 1
                            type: integer
                          page_num:
                            example: 1
                            type: integer
                          total_count:
                            example: 1
                            type: integer
                        required:
                          - page_num
                          - page_count
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - tags:read
      summary: Retrieve Tags
      tags:
        - Tags
        - v1
    post:
      description: |-
        Create a new tag with the provided attributes.
        This endpoint allows clients to define a new tag that can be assigned to companies. The response returns the full tag object, including its generated identifier and timestamps.
        Credit Note: Creating tags doe not consume credits.

        :::info
        Requires the `tags:write` OAuth2 scope.
        :::
      operationId: createTag
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  color: 2
                  name: US Prospects
                type: tag
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        color:
                          description: List of supported color codes
                          enum:
                            - 0
                            - 1
                            - 2
                            - 3
                            - 4
                            - 5
                            - 6
                            - 7
                            - 8
                            - 9
                          type: integer
                          x-apidog-enum:
                            - name: "#1B70F0"
                              value: 0
                            - name: "#08A360"
                              value: 1
                            - name: "#AE540D"
                              value: 2
                            - name: "#D42422"
                              value: 3
                            - name: "#5A219B"
                              value: 4
                            - name: "#073572"
                              value: 5
                            - name: "#00838F"
                              value: 6
                            - name: "#D42422"
                              value: 7
                            - name: "#B61A5C"
                              value: 8
                            - name: "#4C3AED"
                              value: 9
                        name:
                          description: The name of the tag
                          type: string
                      required:
                        - name
                        - color
                      type: object
                    type:
                      default: tag
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    color: 0
                    created_at: "2024-12-10T15:57:25Z"
                    name: Prospects
                    updated_at: "2024-11-24T11:50:00Z"
                  id: 4b7e2c9f
                  relationships:
                    created_by:
                      id: abc123
                      type: user
                  type: tag
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/TagV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - tags:write
      summary: Create Tag
      tags:
        - Tags
        - v1
  /v1/tags/batch-add-tags-jobs:
    post:
      description: |-
        Schedule an asynchronous job that adds the tags in `data.attributes.tags` to a set of companies. Every tag is added to every selected company. The companies are supplied either as an explicit `items` array (up to 100 items per request), or as an `advanced_search` selection that is resolved into companies (up to 100,000) when the job runs. To remove tags, use `POST /v1/tags/batch-remove-tags-jobs` — adding and removing are separate jobs.

        **Side effect:** a company your account has no data for yet is added to your account when it is tagged. Past your account's company limit, tagging can fail, also for companies already in your account; those companies count in `summary.failed_count`.

        Poll **Get Batch Add Tags Job** (`GET /v1/tags/batch-add-tags-jobs/{job_id}`) until `status` is `completed` or `failed`. The job reports `summary` counts, not the outcome of each company.

        Credit Note: Adding tags does not consume credits.

        :::info
        Requires the `companies:write` OAuth2 scope.
        :::
      operationId: createBatchAddTagsJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              add_search_results:
                summary: Tag every company matching an advanced search
                value:
                  data:
                    attributes:
                      advanced_search:
                        excluded_company_ids:
                          - "651713"
                        filters:
                          items:
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                            - field: employee_count
                              operator: in_range
                              type: filter
                              value:
                                gte: 50
                          operator: and
                          type: group
                        page:
                          size: 1000
                        sort:
                          direction: desc
                          field: employee_count
                      tags:
                        - id: dd11fc370098e78e
                          type: tag
                    type: batch_add_tags_job
              add_tags:
                summary: Add tags to a set of companies
                value:
                  data:
                    attributes:
                      items:
                        - id: "159001425"
                          type: company
                        - id: "159001426"
                          type: company
                      tags:
                        - id: dd11fc370098e78e
                          type: tag
                        - id: 8bb95c4d8e7c5fd2
                          type: tag
                    type: batch_add_tags_job
            schema:
              description: Request body for creating a batch add-tags job. The job adds every tag in `data.attributes.tags` to every selected company. The companies are supplied either as an explicit `items` array, or as an `advanced_search` selection that is resolved into companies when the job runs. Exactly one way of selecting the companies must be used.
              example:
                data:
                  attributes:
                    items:
                      - id: "159001425"
                        type: company
                      - id: "159001426"
                        type: company
                    tags:
                      - id: dd11fc370098e78e
                        type: tag
                      - id: 8bb95c4d8e7c5fd2
                        type: tag
                  type: batch_add_tags_job
              properties:
                data:
                  properties:
                    attributes:
                      oneOf:
                        - required:
                            - items
                        - required:
                            - advanced_search
                      properties:
                        advanced_search:
                          allOf:
                            - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                              example:
                                excluded_company_ids:
                                  - "651713"
                                filters:
                                  items:
                                    - field: country_code
                                      operator: in
                                      type: filter
                                      value:
                                        - DE
                                    - field: employee_count
                                      operator: in_range
                                      type: filter
                                      value:
                                        gte: 50
                                  operator: and
                                  type: group
                                page:
                                  size: 1000
                                sort:
                                  direction: desc
                                  field: employee_count
                              properties:
                                excluded_company_ids:
                                  description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                                  example:
                                    - "651713"
                                  items:
                                    type: string
                                  type: array
                                filters:
                                  description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                                  example:
                                    items:
                                      - field: country_code
                                        operator: in
                                        type: filter
                                        value:
                                          - DE
                                      - items:
                                          - field: employee_count
                                            operator: in_range
                                            type: filter
                                            value:
                                              gte: 50
                                          - field: industries
                                            operator: in
                                            type: filter
                                            value:
                                              classification: nace
                                              codes:
                                                - "62.01"
                                        operator: or
                                        type: group
                                    operator: and
                                    type: group
                                  properties:
                                    items:
                                      description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                                      items:
                                        $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                                      type: array
                                    operator:
                                      description: The logical operator combining the items.
                                      enum:
                                        - and
                                        - or
                                      example: and
                                      type: string
                                    type:
                                      description: Indicates this is the root filter group.
                                      enum:
                                        - group
                                      example: group
                                      type: string
                                  required:
                                    - type
                                    - operator
                                    - items
                                  type: object
                                page:
                                  description: Bounds how many of the matching companies are selected.
                                  properties:
                                    size:
                                      description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                                      example: 1000
                                      minimum: 1
                                      type: integer
                                  type: object
                                sort:
                                  description: Ordering applied to the matching companies. Omit to use the default ordering.
                                  properties:
                                    direction:
                                      default: asc
                                      description: Sort direction. Defaults to `asc`.
                                      enum:
                                        - asc
                                        - desc
                                      example: desc
                                      type: string
                                    field:
                                      description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                                      example: employee_count,name
                                      type: string
                                  type: object
                              required:
                                - filters
                              type: object
                            - properties:
                                page:
                                  properties:
                                    size:
                                      maximum: 100000
                                      type: integer
                                  type: object
                              type: object
                          description: "Tag the companies matching an advanced search instead of listing them in `items`. When the job runs, it takes the matches in `sort` order up to `page.size` (at most 100,000, which is also the default), then drops the `excluded_company_ids`, so fewer than `page.size` can be tagged. The search checks the filters and the sort only then: a filter tree or sort it rejects fails the job with the search's own error, such as `invalid_filters`."
                          type: object
                        items:
                          description: "The companies to add the tags to: up to 100. An ID that isn't a number isn't rejected: it counts in `summary.failed_count` when the job runs."
                          items:
                            properties:
                              id:
                                description: The Leadfeeder company ID.
                                example: "129011"
                                type: string
                              type:
                                const: company
                                example: company
                                type: string
                            required:
                              - type
                              - id
                            type: object
                          maxItems: 100
                          minItems: 1
                          type: array
                        tags:
                          description: "The tags to add to every selected company: at least one. The IDs aren't checked against your account's tags, so an unknown ID isn't rejected."
                          items:
                            description: A bare reference to a tag by ID.
                            properties:
                              id:
                                description: The tag ID, as returned by the **Retrieve Tags** and **Get Tag Details** endpoints.
                                example: dd11fc370098e78e
                                type: string
                              type:
                                const: tag
                                example: tag
                                type: string
                            required:
                              - type
                              - id
                            type: object
                          minItems: 1
                          type: array
                      required:
                        - tags
                      type: object
                    type:
                      default: batch_add_tags_job
                      description: The job resource type. Optional — the operation is fixed by the endpoint, so a value supplied here is ignored.
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      items:
                        - id: "159001425"
                          type: company
                        - id: "159001426"
                          type: company
                      tags:
                        - id: dd11fc370098e78e
                          type: tag
                        - id: 8bb95c4d8e7c5fd2
                          type: tag
                    created_at: "2026-05-13T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: batch_add_tags_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchAddTagsJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch add-tags job accepted and enqueued
        "400":
          content:
            application/json:
              examples:
                invalid_json:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must be valid JSON
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_attributes:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: data.attributes is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_data:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: data is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The request body isn't valid JSON, or it is a JSON object without a `data.attributes` object.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User has no API access on the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the `companies:write` scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:write` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include API access
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "Forbidden: the credentials are valid but don't allow this request. The gateway refuses a user without API access on the account, a plan without API access, a token without the `companies:write` scope, and a missing or foreign `account_id`."
        "422":
          content:
            application/json:
              examples:
                advanced_search_excluded_ids_not_an_array:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.excluded_company_ids must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_size_out_of_range:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page.size must be an integer between 1 and 100000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_sort_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.sort must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_without_filters:
                  summary: "`advanced_search` isn't an object or has no `filters` object"
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.filters is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                empty_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must contain at least one item
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_item_type:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Only company items are supported
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_tag_reference:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Each tags entry must be a tag reference with an id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                item_without_id:
                  summary: An item isn't an object or has no `id`
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Each item must have type and id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                items_and_advanced_search:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: items and advanced_search are mutually exclusive
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_tags:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.tags must contain at least one tag
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                no_companies:
                  summary: Neither `items` nor a selection was sent, or `items` isn't an array
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                tags_not_an_array:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.tags must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: A maximum of 100 items may be supplied per request
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The request can be read but not accepted (`invalid_parameter`): the tags or the companies to tag break a rule, or more than one way of selecting the companies was sent. The title says which rule. A search selection's filters, and the sort of an `advanced_search`, are checked only when the job runs, so ones the search rejects fail the job instead."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:write
      summary: Create Batch Add Tags Job
      tags:
        - Tags
        - v1
  /v1/tags/batch-add-tags-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a batch add-tags job created via `POST /v1/tags/batch-add-tags-jobs`.

        While `status` is `running`, `summary` is omitted. Once `status` becomes `completed`, `summary` carries the outcome counts (including `failed_count`). On `failed`, `errors` describes the failure, and `summary` can carry the counts of the companies the job handled before it failed.

        Jobs are kept for 7 days after creation. A job that stops unexpectedly can stay `running` until then.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getBatchAddTagsJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the batch add-tags job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                completed:
                  summary: Job completed — summary populated
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:02Z"
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                            - id: "159001426"
                              type: company
                          tags:
                            - id: dd11fc370098e78e
                              type: tag
                            - id: 8bb95c4d8e7c5fd2
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: completed
                        summary:
                          added: 2
                          failed_count: 0
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                completed_advanced_search:
                  summary: Advanced-search job completed
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:41Z"
                        configuration:
                          advanced_search:
                            filters:
                              items:
                                - field: country_code
                                  operator: in
                                  type: filter
                                  value:
                                    - DE
                              operator: and
                              type: group
                            page:
                              size: 1000
                          tags:
                            - id: dd11fc370098e78e
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: completed
                        summary:
                          added: 987
                          failed_count: 13
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed:
                  summary: Job failed — errors populated
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:05Z"
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                          tags:
                            - id: dd11fc370098e78e
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors:
                          - code: job_failed
                            title: Tag assignment could not be applied
                        status: failed
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                running:
                  summary: Job still running — no summary yet
                  value:
                    data:
                      attributes:
                        completed_at: null
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                            - id: "159001426"
                              type: company
                          tags:
                            - id: dd11fc370098e78e
                              type: tag
                            - id: 8bb95c4d8e7c5fd2
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: running
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_add_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchAddTagsJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch add-tags job status retrieved
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The job with the ID 'job_550e8400-e29b-41d4-a716-446655440000' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The job wasn't found: the ID is unknown, the job has expired, it belongs to another account, or it is another kind of job."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Get Batch Add Tags Job
      tags:
        - Tags
        - v1
  /v1/tags/batch-remove-tags-jobs:
    post:
      description: |-
        Schedule an asynchronous job that removes the tags in `data.attributes.tags` from a set of companies. Every tag is removed from every selected company. The companies are supplied either as an explicit `items` array (up to 100 items per request), or as an `advanced_search` selection that is resolved into companies (up to 100,000) when the job runs. To add tags, use `POST /v1/tags/batch-add-tags-jobs` — adding and removing are separate jobs.

        Poll **Get Batch Remove Tags Job** (`GET /v1/tags/batch-remove-tags-jobs/{job_id}`) until `status` is `completed` or `failed`. The job reports `summary` counts, not the outcome of each company.

        Credit Note: Removing tags does not consume credits.

        :::info
        Requires the `companies:write` OAuth2 scope.
        :::
      operationId: createBatchRemoveTagsJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              remove_search_results:
                summary: Remove a tag from up to 1,000 of the German companies that have it
                value:
                  data:
                    attributes:
                      advanced_search:
                        filters:
                          items:
                            - field: tags
                              operator: in
                              type: filter
                              value:
                                - 3f7a1b9c0e5d2648
                            - field: country_code
                              operator: in
                              type: filter
                              value:
                                - DE
                          operator: and
                          type: group
                        page:
                          size: 1000
                      tags:
                        - id: 3f7a1b9c0e5d2648
                          type: tag
                    type: batch_remove_tags_job
              remove_tags:
                summary: Remove tags from a set of companies
                value:
                  data:
                    attributes:
                      items:
                        - id: "159001425"
                          type: company
                        - id: "159001426"
                          type: company
                      tags:
                        - id: 3f7a1b9c0e5d2648
                          type: tag
                    type: batch_remove_tags_job
            schema:
              description: Request body for creating a batch remove-tags job. The job removes every tag in `data.attributes.tags` from every selected company. The companies are supplied either as an explicit `items` array, or as an `advanced_search` selection that is resolved into companies when the job runs. Exactly one way of selecting the companies must be used.
              example:
                data:
                  attributes:
                    items:
                      - id: "159001425"
                        type: company
                      - id: "159001426"
                        type: company
                    tags:
                      - id: 3f7a1b9c0e5d2648
                        type: tag
                  type: batch_remove_tags_job
              properties:
                data:
                  properties:
                    attributes:
                      oneOf:
                        - required:
                            - items
                        - required:
                            - advanced_search
                      properties:
                        advanced_search:
                          allOf:
                            - description: A set of companies selected by an advanced search query, instead of an explicit `company_ids` list. The companies matching `filters` are taken in `sort` order, limited to `page.size`, with any `excluded_company_ids` removed.
                              example:
                                excluded_company_ids:
                                  - "651713"
                                filters:
                                  items:
                                    - field: country_code
                                      operator: in
                                      type: filter
                                      value:
                                        - DE
                                    - field: employee_count
                                      operator: in_range
                                      type: filter
                                      value:
                                        gte: 50
                                  operator: and
                                  type: group
                                page:
                                  size: 1000
                                sort:
                                  direction: desc
                                  field: employee_count
                              properties:
                                excluded_company_ids:
                                  description: Company IDs to remove from the matched set (for example, rows the user deselected). Removed after the `page.size` limit is applied, so the final selection may be smaller than `page.size`.
                                  example:
                                    - "651713"
                                  items:
                                    type: string
                                  type: array
                                filters:
                                  description: Recursive filter tree applied to the company population. The root is always a `group` whose `items` are either individual filters or further `group` nodes (combined with `and`/`or`). The tree holds at most 50 filters and groups, the root included, and at most 5 levels of groups.
                                  example:
                                    items:
                                      - field: country_code
                                        operator: in
                                        type: filter
                                        value:
                                          - DE
                                      - items:
                                          - field: employee_count
                                            operator: in_range
                                            type: filter
                                            value:
                                              gte: 50
                                          - field: industries
                                            operator: in
                                            type: filter
                                            value:
                                              classification: nace
                                              codes:
                                                - "62.01"
                                        operator: or
                                        type: group
                                    operator: and
                                    type: group
                                  properties:
                                    items:
                                      description: Nested filter conditions or sub-groups. Each item is either a `filter` or a nested `group`. An empty list matches every company.
                                      items:
                                        $ref: "#/components/schemas/CompaniesAdvancedSearchFilterItem"
                                      type: array
                                    operator:
                                      description: The logical operator combining the items.
                                      enum:
                                        - and
                                        - or
                                      example: and
                                      type: string
                                    type:
                                      description: Indicates this is the root filter group.
                                      enum:
                                        - group
                                      example: group
                                      type: string
                                  required:
                                    - type
                                    - operator
                                    - items
                                  type: object
                                page:
                                  description: Bounds how many of the matching companies are selected.
                                  properties:
                                    size:
                                      description: Maximum number of matching companies to select, taken in `sort` order. Omit to select every match, up to the endpoint's per-job maximum.
                                      example: 1000
                                      minimum: 1
                                      type: integer
                                  type: object
                                sort:
                                  description: Ordering applied to the matching companies. Omit to use the default ordering.
                                  properties:
                                    direction:
                                      default: asc
                                      description: Sort direction. Defaults to `asc`.
                                      enum:
                                        - asc
                                        - desc
                                      example: desc
                                      type: string
                                    field:
                                      description: "Comma-separated list of company attributes to sort by, applied in order (e.g. `employee_count,name`). Allowed values: `relevance`, `name`, `employee_count`, `revenue`, `founded_year`. Unknown values are rejected with `invalid_parameter`."
                                      example: employee_count,name
                                      type: string
                                  type: object
                              required:
                                - filters
                              type: object
                            - properties:
                                page:
                                  properties:
                                    size:
                                      maximum: 100000
                                      type: integer
                                  type: object
                              type: object
                          description: "Remove the tags from the companies matching an advanced search instead of listing them in `items`. When the job runs, it takes the matches in `sort` order up to `page.size` (at most 100,000, which is also the default), then drops the `excluded_company_ids`, so it can take fewer than `page.size`. The search checks the filters and the sort only then: a filter tree or sort it rejects fails the job with the search's own error, such as `invalid_filters`. The search covers every company, tagged or not: add a `tags` filter to take only the companies that have the tags."
                          type: object
                        items:
                          description: "The companies to remove the tags from: up to 100. An ID that isn't a number isn't rejected: it counts in `summary.failed_count` when the job runs."
                          items:
                            properties:
                              id:
                                description: The Leadfeeder company ID.
                                example: "129011"
                                type: string
                              type:
                                const: company
                                example: company
                                type: string
                            required:
                              - type
                              - id
                            type: object
                          maxItems: 100
                          minItems: 1
                          type: array
                        tags:
                          description: "The tags to remove from every selected company: at least one. The IDs aren't checked against your account's tags, so an unknown ID isn't rejected."
                          items:
                            description: A bare reference to a tag by ID.
                            properties:
                              id:
                                description: The tag ID, as returned by the **Retrieve Tags** and **Get Tag Details** endpoints.
                                example: dd11fc370098e78e
                                type: string
                              type:
                                const: tag
                                example: tag
                                type: string
                            required:
                              - type
                              - id
                            type: object
                          minItems: 1
                          type: array
                      required:
                        - tags
                      type: object
                    type:
                      default: batch_remove_tags_job
                      description: The job resource type. Optional — the operation is fixed by the endpoint, so a value supplied here is ignored.
                      type: string
                  required:
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "202":
          content:
            application/json:
              example:
                data:
                  attributes:
                    completed_at: null
                    configuration:
                      items:
                        - id: "159001425"
                          type: company
                        - id: "159001426"
                          type: company
                      tags:
                        - id: 3f7a1b9c0e5d2648
                          type: tag
                    created_at: "2026-05-13T12:00:00Z"
                    errors: []
                    status: running
                  id: job_550e8400-e29b-41d4-a716-446655440000
                  type: batch_remove_tags_job
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchRemoveTagsJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch remove-tags job accepted and enqueued
        "400":
          content:
            application/json:
              examples:
                invalid_json:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: Request body must be valid JSON
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_attributes:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: data.attributes is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_data:
                  value:
                    errors:
                      - code: invalid_request_body
                        title: data is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: The request body isn't valid JSON, or it is a JSON object without a `data.attributes` object.
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User has no API access on the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the `companies:write` scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:write` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include API access
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "Forbidden: the credentials are valid but don't allow this request. The gateway refuses a user without API access on the account, a plan without API access, a token without the `companies:write` scope, and a missing or foreign `account_id`."
        "422":
          content:
            application/json:
              examples:
                advanced_search_excluded_ids_not_an_array:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.excluded_company_ids must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_page_size_out_of_range:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.page.size must be an integer between 1 and 100000
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_sort_not_an_object:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.sort must be an object
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                advanced_search_without_filters:
                  summary: "`advanced_search` isn't an object or has no `filters` object"
                  value:
                    errors:
                      - code: invalid_parameter
                        title: advanced_search.filters is required
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                empty_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must contain at least one item
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_item_type:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Only company items are supported
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_tag_reference:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Each tags entry must be a tag reference with an id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                item_without_id:
                  summary: An item isn't an object or has no `id`
                  value:
                    errors:
                      - code: invalid_parameter
                        title: Each item must have type and id
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                items_and_advanced_search:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: items and advanced_search are mutually exclusive
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_tags:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.tags must contain at least one tag
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                no_companies:
                  summary: Neither `items` nor a selection was sent, or `items` isn't an array
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.items must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                tags_not_an_array:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: data.attributes.tags must be an array
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_items:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: A maximum of 100 items may be supplied per request
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The request can be read but not accepted (`invalid_parameter`): the tags or the companies to remove them from break a rule, or more than one way of selecting the companies was sent. The title says which rule. A search selection's filters, and the sort of an `advanced_search`, are checked only when the job runs, so ones the search rejects fail the job instead."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:write
      summary: Create Batch Remove Tags Job
      tags:
        - Tags
        - v1
  /v1/tags/batch-remove-tags-jobs/{job_id}:
    get:
      description: |-
        Retrieve the status of a batch remove-tags job created via `POST /v1/tags/batch-remove-tags-jobs`.

        While `status` is `running`, `summary` is omitted. Once `status` becomes `completed`, `summary` carries the outcome counts (including `failed_count`). On `failed`, `errors` describes the failure, and `summary` can carry the counts of the companies the job handled before it failed.

        Jobs are kept for 7 days after creation. A job that stops unexpectedly can stay `running` until then.

        Credit Note: This endpoint does not consume credits.

        :::info
        Requires the `companies:read` OAuth2 scope.
        :::
      operationId: getBatchRemoveTagsJob
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The unique identifier of the batch remove-tags job.
          example: job_550e8400-e29b-41d4-a716-446655440000
          in: path
          name: job_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                completed:
                  summary: Job completed — summary populated
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:02Z"
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                            - id: "159001426"
                              type: company
                          tags:
                            - id: 3f7a1b9c0e5d2648
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: completed
                        summary:
                          failed_count: 0
                          removed: 2
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_remove_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                completed_advanced_search:
                  summary: Advanced-search job completed
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:41Z"
                        configuration:
                          advanced_search:
                            filters:
                              items:
                                - field: tags
                                  operator: in
                                  type: filter
                                  value:
                                    - 3f7a1b9c0e5d2648
                                - field: country_code
                                  operator: in
                                  type: filter
                                  value:
                                    - DE
                              operator: and
                              type: group
                            page:
                              size: 1000
                          tags:
                            - id: 3f7a1b9c0e5d2648
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: completed
                        summary:
                          failed_count: 13
                          removed: 987
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_remove_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                failed:
                  summary: Job failed — errors populated
                  value:
                    data:
                      attributes:
                        completed_at: "2026-05-13T12:00:05Z"
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                          tags:
                            - id: 3f7a1b9c0e5d2648
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors:
                          - code: job_failed
                            title: Tag removal could not be applied
                        status: failed
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_remove_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                running:
                  summary: Job still running — no summary yet
                  value:
                    data:
                      attributes:
                        completed_at: null
                        configuration:
                          items:
                            - id: "159001425"
                              type: company
                            - id: "159001426"
                              type: company
                          tags:
                            - id: 3f7a1b9c0e5d2648
                              type: tag
                        created_at: "2026-05-13T12:00:00Z"
                        errors: []
                        status: running
                      id: job_550e8400-e29b-41d4-a716-446655440000
                      type: batch_remove_tags_job
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/BatchRemoveTagsJobV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Batch remove-tags job status retrieved
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The job with the ID 'job_550e8400-e29b-41d4-a716-446655440000' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: "The job wasn't found: the ID is unknown, the job has expired, it belongs to another account, or it is another kind of job."
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - companies:read
      summary: Get Batch Remove Tags Job
      tags:
        - Tags
        - v1
  /v1/tags/{id}:
    delete:
      description: |-
        Delete a specific tag identified by its ID

        Removes the tag from the account and unassigns it from all associated companies.
        Once deleted, the tag cannot be recovered.

        Credit Note: Deleting tags does not consume credits.

        :::info
        Requires the `tags:write` OAuth2 scope.
        :::
      operationId: deleteTag
      parameters:
        - $ref: "#/components/parameters/TagId"
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - tags:write
      summary: Delete Tag
      tags:
        - Tags
        - v1
    get:
      description: |-
        Fetch the details of a specific tag using its unique tag ID.
        Returns the tag’s attributes, including its name, color, and timestamps indicating when it was created and last updated.
        Credit Note: Retrieving tag data does not consume credits.

        :::info
        Requires the `tags:read` OAuth2 scope.
        :::
      operationId: getTag
      parameters:
        - $ref: "#/components/parameters/TagId"
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    color: 0
                    created_at: "2024-12-10T15:57:25Z"
                    name: Prospects
                    updated_at: "2024-11-24T11:50:00Z"
                  id: 4b7e2c9f
                  relationships:
                    created_by:
                      id: abc123
                      type: user
                  type: tag
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/TagV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - tags:read
      summary: Get Tag Details
      tags:
        - Tags
        - v1
    patch:
      description: |-
        Update the attributes of a specific tag identified by its ID.

        This endpoint applies a partial update to a single tag.
        Only the fields provided in the request body will be modified; all other fields remain unchanged.

        Credit Note: Updating tags does not consume credits.

        :::info
        Requires the `tags:write` OAuth2 scope.
        :::
      operationId: updateTag
      parameters:
        - $ref: "#/components/parameters/TagId"
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            example:
              data:
                attributes:
                  name: Updated Tag Name
                type: tag
            schema:
              properties:
                data:
                  properties:
                    attributes:
                      properties:
                        color:
                          description: List of supported color codes
                          enum:
                            - 0
                            - 1
                            - 2
                            - 3
                            - 4
                            - 5
                            - 6
                            - 7
                            - 8
                            - 9
                          type: integer
                          x-apidog-enum:
                            - name: "#1B70F0"
                              value: 0
                            - name: "#08A360"
                              value: 1
                            - name: "#AE540D"
                              value: 2
                            - name: "#D42422"
                              value: 3
                            - name: "#5A219B"
                              value: 4
                            - name: "#073572"
                              value: 5
                            - name: "#00838F"
                              value: 6
                            - name: "#D42422"
                              value: 7
                            - name: "#B61A5C"
                              value: 8
                            - name: "#4C3AED"
                              value: 9
                        name:
                          description: The new name of the tag
                          type: string
                      type: object
                    type:
                      default: tag
                      type: string
                  required:
                    - type
                    - attributes
                  type: object
              required:
                - data
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    color: 0
                    created_at: "2024-12-10T15:57:25Z"
                    name: Prospects
                    updated_at: "2024-11-24T11:50:00Z"
                  id: 4b7e2c9f
                  relationships:
                    created_by:
                      id: abc123
                      type: user
                  type: tag
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/TagV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - tags:write
      summary: Update Tag
      tags:
        - Tags
        - v1
  /v1/usage:
    get:
      description: |-
        Access usage statistics for various API endpoints for monitoring and auditing purposes.
        Returns usage data for all endpoints accessible by the requesting account within the specified date range.


        :::info
        Requires the `usage:read` OAuth2 scope.
        :::
      operationId: usage
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The starting month for the usage period, formatted as YYYY-MM
          example: 2025-01
          in: query
          name: start_period
          required: true
          schema:
            pattern: ^\d{4}-\d{2}$
            type: string
        - description: The ending month for the usage period, formatted as YYYY-MM. Must be greater than or equal to start_period.
          example: 2026-01
          in: query
          name: end_period
          required: true
          schema:
            pattern: ^\d{4}-\d{2}$
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      endpoint_path: /companies/search
                      http_method: POST
                      num_failed_requests: 1
                      num_requests: 10
                      num_returned_entities: 100
                      num_successful_requests: 5
                      period: 2025-01
                    id: 2025-01_companies/search_POST
                    type: api_usage
                  - attributes:
                      endpoint_path: /companies
                      http_method: GET
                      num_failed_requests: 1
                      num_requests: 25
                      num_returned_entities: 48
                      num_successful_requests: 24
                      period: 2025-03
                    id: 2025-03_companies_GET
                    type: api_usage
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
                  total_records: 2
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/ApiUsageV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                      total_records:
                        description: The total number of records in the response.
                        example: 100
                        type: integer
                    required:
                      - total_records
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              examples:
                empty_body:
                  value:
                    errors:
                      - code: missing_mandatory_fields
                        title: At least one field in the request body must be provided.
                invalid_parameter:
                  value:
                    errors:
                      - code: invalid_parameter
                        title: The search_terms field must be a valid array of strings.
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                type: object
          description: Invalid parameters or validation errors
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - usage:read
      summary: Get Endpoints Usage
      tags:
        - Usage
        - v1
  /v1/users/me:
    get:
      description: |-
        Retrieves the identity of the current API user - a "whoami" endpoint.
        Unlike most endpoints, this one does not require the `account_id` query parameter — the user's identity is independent of the account they are currently working on.
      operationId: getCurrentUserInfo
      responses:
        "200":
          content:
            application/json:
              examples:
                currentUser:
                  summary: Current user identity
                  value:
                    data:
                      attributes:
                        country_code: DE
                        email: jane.smith@leadfeeder.com
                        first_name: Jane
                        last_name: Smith
                        phone_number: +49 721 50057501
                        team_role: admin
                      id: "123456"
                      type: user
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: "#/components/schemas/UserV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      summary: Get Current User
      tags:
        - Users
        - v1
  /v1/web-visits:
    post:
      description: |-
        Search for web visits within a date range. Returns a paginated list of visit records including engagement data, visitor information, and location. Visits can be narrowed with the simple inline `filters` or with a custom-feed-style `advanced_filters` tree (one or the other, not both).

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: searchWebVisits
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - $ref: "#/components/parameters/PageNum"
        - $ref: "#/components/parameters/PageSize"
        - description: Specify which additional data should be attached to the result.
          example: company
          in: query
          name: include
          schema:
            enum:
              - company
            type: string
      requestBody:
        content:
          application/json:
            examples:
              advanced_search:
                description: Search visits of companies matching a custom-feed-style filter tree — here, companies from Germany whose visitors viewed a pricing page.
                summary: Search visits with advanced filters
                value:
                  advanced_filters:
                    items:
                      - items:
                          - items:
                              - items:
                                  - field: country_code
                                    operator: is
                                    type: filter
                                    value: DE
                                operator: or
                                type: group
                              - items:
                                  - field: page_url
                                    operator: contains
                                    type: filter
                                    value: /pricing
                                operator: or
                                type: group
                            operator: and
                            type: group
                        operator: or
                        type: group
                      - items: []
                        negated: true
                        operator: or
                        type: group
                    operator: and
                    type: group
                    version: 1
                  end_date: "2026-01-31"
                  start_date: "2026-01-01"
              basic_search:
                description: Search all web visits within a date range
                summary: Basic date range search
                value:
                  end_date: "2026-01-31"
                  start_date: "2026-01-01"
              company_search:
                description: Search visits associated with a specific company
                summary: Search visits for a specific company
                value:
                  end_date: "2026-01-31"
                  filters:
                    company_id: "159001425"
                  start_date: "2026-01-01"
            schema:
              not:
                properties:
                  advanced_filters: {}
                  filters: {}
                required:
                  - filters
                  - advanced_filters
              properties:
                advanced_filters:
                  allOf:
                    - description: |-
                        Advanced filter tree, shared by the Custom Feed endpoints and the Search Web Visits endpoint. This is NOT a free-form recursive tree — it has a FIXED shape that must be followed exactly or the request is rejected with `422 invalid_filters`:

                        1. The root is always `{ type: group, operator: and }`.
                        2. Its `items` array holds EXACTLY TWO groups, in this order: `[0]` the INCLUDE bucket `{ type: group, operator: or }` and `[1]` the EXCLUDE bucket `{ type: group, operator: or, negated: true }`. The exclude bucket is mandatory even when nothing is excluded — pass it with `items: []`.
                        3. Inside each bucket, `items` is a list of AND rows `{ type: group, operator: and }`.
                        4. Inside each AND row, `items` is a list of OR groups `{ type: group, operator: or }`.
                        5. Inside each OR group, `items` is a list of leaf conditions `{ type: filter, field, operator, value }`.

                        So the nesting is always `and → [ or(include), or(exclude, negated) ] → and → or → filter`. Never put a `filter` directly under an AND row or a bucket, and never add `negated` to the root.
                      properties:
                        items:
                          description: 'Exactly two groups: `[0]` the include bucket (operator "or") and `[1]` the exclude bucket (operator "or", negated true). Pass the exclude bucket with `items: []` when nothing is excluded.'
                          example:
                            - items: []
                              negated: false
                              operator: or
                              type: group
                            - items: []
                              negated: true
                              operator: or
                              type: group
                          maxItems: 2
                          minItems: 2
                          prefixItems:
                            - properties:
                                items:
                                  description: AND rows whose matches are INCLUDED.
                                  items:
                                    properties:
                                      items:
                                        description: One or more OR groups, AND-ed together.
                                        items:
                                          properties:
                                            items:
                                              description: One or more leaf conditions, OR-ed together.
                                              items:
                                                properties:
                                                  display_value:
                                                    description: Human-readable label for the value, shown in the UI. Set it equal to `value` when in doubt (e.g. value "DE" → display_value "Germany").
                                                    example: Germany
                                                    type: string
                                                  field:
                                                    description: |
                                                      The field name to which the filter is applied. Available fields include:

                                                      **Company/Organization:**
                                                      - `organization` - Company name, matched against the name and trade name. Not an ID: use `contains` with part of the name. To narrow to known companies by ID, use the Search Web Visits `filters.company_ids` instead
                                                      - `legal_organization` - Legal company name, matched like `organization`
                                                      - `website_address` - Company website URL
                                                      - `employee_count` - Number of employees (exact)
                                                      - `industry_code` - Industry code

                                                      **Location (Company HQ):**
                                                      - `country_code` - ISO country code
                                                      - `city` - City name
                                                      - `region` - State/region
                                                      - `continent` - Continent
                                                      - `world_region` - World region
                                                      - `hq_region`, `hq_country_code`, `hq_continent`, `hq_world_region`, `hq_postal_code` - Headquarters location

                                                      **Location (Visit-based):**
                                                      - `visit_city`, `visit_region`, `visit_country_code`, `visit_continent`, `visit_world_region` - Visit location data

                                                      **Traffic Source:**
                                                      - `source_medium` - Combined traffic source and medium
                                                      - `referrer` - Referring source
                                                      - `referring_url` - Full referring URL
                                                      - `medium` - Traffic medium (organic, cpc, referral, etc.)
                                                      - `campaign` - Campaign name
                                                      - `campaign_type` - Type of campaign
                                                      - `keyword` - Search keyword

                                                      **Visit Behavior:**
                                                      - `device_type` - Device type (desktop, mobile, tablet)
                                                      - `visit_length` - Duration of visit
                                                      - `visit_pageviews` - Number of page views in visit
                                                      - `visits` - Number of visits
                                                      - `pageviews` - Page views count
                                                      - `quality` - Visit quality score

                                                      **Page & Content:**
                                                      - `page` - Page title
                                                      - `page_url` - Full page URL
                                                      - `landing_page_path` - Landing page path
                                                      - `hostname` - Website hostname
                                                      - `file_download_name` - Downloaded file name
                                                      - `form_id` - Form identifier
                                                      - `form_submit` - Form submission event
                                                      - `video_title`, `video_url` - Video engagement

                                                      **CRM Integration:**
                                                      - `crm_connection` - Has CRM connection
                                                      - `crm_opportunity` - CRM entity IDs
                                                      - `crm_lead_owner`, `crm_opportunity_owner`, `crm_organization_owner` - CRM owners
                                                      - `crm_lead_created_in_leadfeeder`, `crm_opportunity_created_in_leadfeeder`, `crm_organization_created_in_leadfeeder` - Created in Leadfeeder
                                                      - `crm_stage` - CRM pipeline stages
                                                      - `crm_opportunity_status` - Opportunity details
                                                      - `crm_task_status` - Task status

                                                      **People & Contacts:**
                                                      - `person_name`, `person_email`, `person_search` - Contact information
                                                      - `identified_visitors` - Identified visitor data

                                                      **Organization & Management:**
                                                      - `followed` - Is being followed
                                                      - `assignee` - Assigned user
                                                      - `tag` - Tags
                                                      - `icp_segment` - ICP segment
                                                      - `lead_id` - Lead identifier
                                                      - `goal` - Goal tracking

                                                      **Marketing Automation:**
                                                      - `ems_campaign`, `ems_list` - Email marketing segments
                                                      - `event_ems_click_campaign`, `event_ems_click_list` - Email click events
                                                      - `companies_list` - Company lists

                                                      **Advertising:**
                                                      - `ad_content` - Ad content/creative
                                                      - `ad_group` - Ad group identifier

                                                      **Special Filters:**
                                                      - `sent_to_im` - Sent to integration/messaging
                                                      - `emailed` - Has been emailed
                                                    example: country_code
                                                    type: string
                                                  operator:
                                                    description: 'The operator applied to the field. Not every operator is valid for every field — the accepted set is field-specific, and using an unsupported one returns `422 invalid_filters` ("Unsupported operator"). General rules of thumb: numeric fields (e.g. `employee_count`, `visits`, `pageviews`) use `at_least` / `less_than` with an integer value; short string/enum fields (e.g. `country_code`, `region`, `device_type`) use `is` / `is_not`; URL/text fields (e.g. `page_url`, `referring_url`, `keyword`) use `contains` / `begins_with` / `ends_with` (and their `not_` variants); presence checks (`is_present` / `is_empty`) only apply to fields that can be empty. For the authoritative per-field operator and value list see https://docs.leadfeeder.com/api/public/custom-feed-filter-reference-363484m0'
                                                    enum:
                                                      - all_are
                                                      - at_least
                                                      - begins_with
                                                      - contains
                                                      - ends_with
                                                      - includes
                                                      - is
                                                      - is_current_user
                                                      - is_empty
                                                      - is_not
                                                      - is_present
                                                      - less_than
                                                      - none_is
                                                      - not_begins_with
                                                      - not_contains
                                                      - not_includes
                                                    example: is
                                                    type: string
                                                  type:
                                                    const: filter
                                                    description: Indicates this is a leaf filter condition
                                                    example: filter
                                                    type: string
                                                  value:
                                                    description: The value used in the filter condition. Type depends on the field and operator (integer for numeric fields, string otherwise). Use ISO codes for `country_code` (e.g. "DE") and put the readable name in `display_value`.
                                                    example: DE
                                                    oneOf:
                                                      - type: string
                                                      - type: integer
                                                      - type: "null"
                                                required:
                                                  - type
                                                  - field
                                                  - operator
                                                  - value
                                                title: Filter condition
                                                type: object
                                              type: array
                                            operator:
                                              const: or
                                              description: A lead matches if ANY child condition matches.
                                              type: string
                                            type:
                                              const: group
                                              type: string
                                          required:
                                            - type
                                            - operator
                                            - items
                                          title: OR group (conditions)
                                          type: object
                                        type: array
                                      operator:
                                        const: and
                                        description: A lead matches only if EVERY child OR group matches.
                                        type: string
                                      type:
                                        const: group
                                        type: string
                                    required:
                                      - type
                                      - operator
                                      - items
                                    title: AND group
                                    type: object
                                  type: array
                                negated:
                                  description: Optional here; omit or set false for the include bucket.
                                  example: false
                                  type: boolean
                                operator:
                                  const: or
                                  type: string
                                type:
                                  const: group
                                  type: string
                              required:
                                - type
                                - operator
                                - items
                              title: Include bucket
                              type: object
                            - properties:
                                items:
                                  description: AND rows whose matches are EXCLUDED. Use `[]` when nothing should be excluded.
                                  items:
                                    properties:
                                      items:
                                        description: One or more OR groups, AND-ed together.
                                        items:
                                          properties:
                                            items:
                                              description: One or more leaf conditions, OR-ed together.
                                              items:
                                                properties:
                                                  display_value:
                                                    description: Human-readable label for the value, shown in the UI. Set it equal to `value` when in doubt (e.g. value "DE" → display_value "Germany").
                                                    example: Germany
                                                    type: string
                                                  field:
                                                    description: |
                                                      The field name to which the filter is applied. Available fields include:

                                                      **Company/Organization:**
                                                      - `organization` - Company name, matched against the name and trade name. Not an ID: use `contains` with part of the name. To narrow to known companies by ID, use the Search Web Visits `filters.company_ids` instead
                                                      - `legal_organization` - Legal company name, matched like `organization`
                                                      - `website_address` - Company website URL
                                                      - `employee_count` - Number of employees (exact)
                                                      - `industry_code` - Industry code

                                                      **Location (Company HQ):**
                                                      - `country_code` - ISO country code
                                                      - `city` - City name
                                                      - `region` - State/region
                                                      - `continent` - Continent
                                                      - `world_region` - World region
                                                      - `hq_region`, `hq_country_code`, `hq_continent`, `hq_world_region`, `hq_postal_code` - Headquarters location

                                                      **Location (Visit-based):**
                                                      - `visit_city`, `visit_region`, `visit_country_code`, `visit_continent`, `visit_world_region` - Visit location data

                                                      **Traffic Source:**
                                                      - `source_medium` - Combined traffic source and medium
                                                      - `referrer` - Referring source
                                                      - `referring_url` - Full referring URL
                                                      - `medium` - Traffic medium (organic, cpc, referral, etc.)
                                                      - `campaign` - Campaign name
                                                      - `campaign_type` - Type of campaign
                                                      - `keyword` - Search keyword

                                                      **Visit Behavior:**
                                                      - `device_type` - Device type (desktop, mobile, tablet)
                                                      - `visit_length` - Duration of visit
                                                      - `visit_pageviews` - Number of page views in visit
                                                      - `visits` - Number of visits
                                                      - `pageviews` - Page views count
                                                      - `quality` - Visit quality score

                                                      **Page & Content:**
                                                      - `page` - Page title
                                                      - `page_url` - Full page URL
                                                      - `landing_page_path` - Landing page path
                                                      - `hostname` - Website hostname
                                                      - `file_download_name` - Downloaded file name
                                                      - `form_id` - Form identifier
                                                      - `form_submit` - Form submission event
                                                      - `video_title`, `video_url` - Video engagement

                                                      **CRM Integration:**
                                                      - `crm_connection` - Has CRM connection
                                                      - `crm_opportunity` - CRM entity IDs
                                                      - `crm_lead_owner`, `crm_opportunity_owner`, `crm_organization_owner` - CRM owners
                                                      - `crm_lead_created_in_leadfeeder`, `crm_opportunity_created_in_leadfeeder`, `crm_organization_created_in_leadfeeder` - Created in Leadfeeder
                                                      - `crm_stage` - CRM pipeline stages
                                                      - `crm_opportunity_status` - Opportunity details
                                                      - `crm_task_status` - Task status

                                                      **People & Contacts:**
                                                      - `person_name`, `person_email`, `person_search` - Contact information
                                                      - `identified_visitors` - Identified visitor data

                                                      **Organization & Management:**
                                                      - `followed` - Is being followed
                                                      - `assignee` - Assigned user
                                                      - `tag` - Tags
                                                      - `icp_segment` - ICP segment
                                                      - `lead_id` - Lead identifier
                                                      - `goal` - Goal tracking

                                                      **Marketing Automation:**
                                                      - `ems_campaign`, `ems_list` - Email marketing segments
                                                      - `event_ems_click_campaign`, `event_ems_click_list` - Email click events
                                                      - `companies_list` - Company lists

                                                      **Advertising:**
                                                      - `ad_content` - Ad content/creative
                                                      - `ad_group` - Ad group identifier

                                                      **Special Filters:**
                                                      - `sent_to_im` - Sent to integration/messaging
                                                      - `emailed` - Has been emailed
                                                    example: country_code
                                                    type: string
                                                  operator:
                                                    description: 'The operator applied to the field. Not every operator is valid for every field — the accepted set is field-specific, and using an unsupported one returns `422 invalid_filters` ("Unsupported operator"). General rules of thumb: numeric fields (e.g. `employee_count`, `visits`, `pageviews`) use `at_least` / `less_than` with an integer value; short string/enum fields (e.g. `country_code`, `region`, `device_type`) use `is` / `is_not`; URL/text fields (e.g. `page_url`, `referring_url`, `keyword`) use `contains` / `begins_with` / `ends_with` (and their `not_` variants); presence checks (`is_present` / `is_empty`) only apply to fields that can be empty. For the authoritative per-field operator and value list see https://docs.leadfeeder.com/api/public/custom-feed-filter-reference-363484m0'
                                                    enum:
                                                      - all_are
                                                      - at_least
                                                      - begins_with
                                                      - contains
                                                      - ends_with
                                                      - includes
                                                      - is
                                                      - is_current_user
                                                      - is_empty
                                                      - is_not
                                                      - is_present
                                                      - less_than
                                                      - none_is
                                                      - not_begins_with
                                                      - not_contains
                                                      - not_includes
                                                    example: is
                                                    type: string
                                                  type:
                                                    const: filter
                                                    description: Indicates this is a leaf filter condition
                                                    example: filter
                                                    type: string
                                                  value:
                                                    description: The value used in the filter condition. Type depends on the field and operator (integer for numeric fields, string otherwise). Use ISO codes for `country_code` (e.g. "DE") and put the readable name in `display_value`.
                                                    example: DE
                                                    oneOf:
                                                      - type: string
                                                      - type: integer
                                                      - type: "null"
                                                required:
                                                  - type
                                                  - field
                                                  - operator
                                                  - value
                                                title: Filter condition
                                                type: object
                                              type: array
                                            operator:
                                              const: or
                                              description: A lead matches if ANY child condition matches.
                                              type: string
                                            type:
                                              const: group
                                              type: string
                                          required:
                                            - type
                                            - operator
                                            - items
                                          title: OR group (conditions)
                                          type: object
                                        type: array
                                      operator:
                                        const: and
                                        description: A lead matches only if EVERY child OR group matches.
                                        type: string
                                      type:
                                        const: group
                                        type: string
                                    required:
                                      - type
                                      - operator
                                      - items
                                    title: AND group
                                    type: object
                                  type: array
                                negated:
                                  const: true
                                  description: Must be true — this marks the exclude bucket.
                                  example: true
                                  type: boolean
                                operator:
                                  const: or
                                  type: string
                                type:
                                  const: group
                                  type: string
                              required:
                                - type
                                - operator
                                - negated
                                - items
                              title: Exclude bucket
                              type: object
                          type: array
                        operator:
                          const: and
                          description: The root group is always AND.
                          example: and
                          type: string
                        type:
                          const: group
                          description: The root filter type is always a group.
                          example: group
                          type: string
                        version:
                          const: 1
                          description: Optional schema version; the only supported value is 1.
                          example: 1
                          type: integer
                      required:
                        - type
                        - operator
                        - items
                      type: object
                    - description: Custom-feed-style filter tree, using the exact same structure, fields, and operators as the Custom Feed endpoints (see Create Custom Feed). Returns the visits of the companies matching the filters; visit-level conditions (page URL, source/medium, device type, …) also narrow which of their visits are returned. Cannot be combined with `filters` — passing both returns `400 invalid_filter`, and a structurally invalid tree returns `422 invalid_filters`. Unlike on custom feeds, the person fields (`person_name`, `person_email`, `person_search`) are not supported here and return `422 invalid_filters`.
                end_date:
                  description: The end of the date range to search (inclusive). Must be a valid ISO 8601 date.
                  example: "2026-01-31"
                  format: date
                  type: string
                filters:
                  description: Simple inline filters. Cannot be combined with `advanced_filters` — passing both returns `400 invalid_filter`.
                  properties:
                    company_id:
                      description: Filter visits by company ID. Cannot be combined with `company_ids` — passing both returns `400 invalid_filter`.
                      example: abc123
                      type: string
                    company_ids:
                      description: Filter visits by several company IDs at once (up to 1000), returning the visits of any of them. Cannot be combined with `company_id` — passing both returns `400 invalid_filter`.
                      example:
                        - "159001425"
                        - "176121"
                      items:
                        type: string
                      maxItems: 1000
                      type: array
                    location_cities:
                      description: Filter visits by city names.
                      example:
                        - Munich
                        - Berlin
                      items:
                        type: string
                      type: array
                    location_country_codes:
                      description: Filter visits by ISO 3166-1 alpha-2 country codes.
                      example:
                        - DE
                        - AT
                      items:
                        type: string
                      type: array
                  type: object
                start_date:
                  description: The start of the date range to search (inclusive). Must be a valid ISO 8601 date.
                  example: "2026-01-01"
                  format: date
                  type: string
              required:
                - start_date
                - end_date
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                webVisits:
                  summary: A list of web visits
                  value:
                    data:
                      - attributes:
                          app_url: https://app.leadfeeder.com/f/123456/feed/all-companies/lead/5b4f313e-46de-11e8-b981-05bebed8e58b_1d2c3b4a-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                          campaign: Homepage Split
                          device_type: smartphone
                          engagements:
                            - event_type: page-view
                              has_met_goals: false
                              hostname: www.leadfeeder.com
                              id: b4ebc08c-8c1f-11f1-9b9e-633b755451a0_0
                              page:
                                path: /pricing/
                                title: Pricing for all stages of growth
                                url: http://www.leadfeeder.com/pricing/
                              previous_page_path: (entrance)
                              time: "2026-01-15T10:30:00+02:00"
                              time_on_page: 22
                          identifiers:
                            adobe_cookies: []
                            ga_client_ids:
                              - "5829104736.1742616961"
                            lf_client_id: LF1.1.a3f8b2d1e4c90123.1742597607000
                          keyword: website leads
                          landing_page_path: /home
                          medium: cpc
                          page_depth: 4
                          referring_url: https://www.google.com/search?q=leadfeeder
                          source: google
                          started_at: "2026-01-15T10:30:00.000Z"
                          visit_length: 80
                          visitor:
                            email: null
                            first_name: null
                            last_name: null
                        id: 5b4f313e-46de-11e8-b981-05bebed8e58b
                        relationships:
                          company:
                            id: "129011"
                            type: company
                          location:
                            attributes:
                              city: Helsinki
                              country: Finland
                              country_code: FI
                              geonames_id: "658225"
                              postal_code: "00100"
                              region: Uusimaa
                            id: 6xeTMh2VfiAzFd86n7GNJ3
                            type: visit_location
                        type: web_visit
                    meta:
                      pagination:
                        page_count: 1
                        page_num: 1
                        total_count: 1
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/WebVisitV1"
                    type: array
                  meta:
                    properties:
                      pagination:
                        properties:
                          page_count:
                            example: 1
                            type: integer
                          page_num:
                            example: 1
                            type: integer
                          total_count:
                            example: 1
                            type: integer
                        required:
                          - page_num
                          - page_count
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Search Web Visits
      tags:
        - Web Visits
        - v1
  /v1/web-visits/companies:
    get:
      description: |-
        Retrieve a paginated list of companies that visited your website within a given date range. Each item includes references to the company and its inferred geographic location.

        Order the list with `sort[field]` and `sort[direction]`. Without either, the companies that visited most recently come first. `sort[direction]` defaults to `asc`, so for the highest intent score first pass `sort[field]=intent_score&sort[direction]=desc`.

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: getWebVisitsCompanies
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: Start of the date range (ISO 8601).
          example: "2026-01-01"
          in: query
          name: start_date
          required: true
          schema:
            format: date
            type: string
        - description: End of the date range (ISO 8601).
          example: "2026-01-31"
          in: query
          name: end_date
          required: true
          schema:
            format: date
            type: string
        - $ref: "#/components/parameters/PageNum"
        - $ref: "#/components/parameters/PageSize"
        - description: Filter results to companies matching a specific custom feed.
          example: abc123def456
          in: query
          name: custom_feed_id
          schema:
            type: string
        - description: Specify which additional data should be attached to the result.
          example: company
          in: query
          name: include
          schema:
            enum:
              - company
            type: string
        - description: Attribute to sort the companies by. This endpoint sorts on a single attribute, so a comma-separated list is rejected with `invalid_parameter`, as is any other value, an empty one included. Without it, a `sort[direction]` on its own orders by `last_visit`. Omit both sort parameters to get the most recent visitors first.
          example: intent_score
          in: query
          name: sort[field]
          schema:
            enum:
              - intent_score
              - last_visit
            type: string
            x-apidog-enum:
              - description: The company's intent score, returned as `intent.score` with `include=company`.
                value: intent_score
              - description: The company's most recent visit within the date range.
                value: last_visit
        - $ref: "#/components/parameters/SortDirection"
      responses:
        "200":
          content:
            application/json:
              examples:
                companies:
                  summary: A list of visitor companies
                  value:
                    data:
                      - attributes:
                          app_url: https://app.leadfeeder.com/f/123456/feed/all-companies/lead/5b4f313e-46de-11e8-b981-05bebed8e58b_1d2c3b4a-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                        id: 5b4f313e-46de-11e8-b981-05bebed8e58b
                        relationships:
                          company:
                            id: "129011"
                            type: company
                          location:
                            attributes:
                              city: Helsinki
                              country: Finland
                              country_code: FI
                              geonames_id: "658225"
                              region: Uusimaa
                              region_code: FI-18
                              state_code: FI-18
                            id: 6xeTMh2VfiAzFd86n7GNJ3
                            type: location
                        type: company_location
                    meta:
                      pagination:
                        page_count: 1
                        page_num: 1
                        total_count: 1
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CompanyLocationV1"
                    type: array
                  meta:
                    properties:
                      pagination:
                        properties:
                          page_count:
                            example: 1
                            type: integer
                          page_num:
                            example: 1
                            type: integer
                          total_count:
                            example: 1
                            type: integer
                        required:
                          - page_num
                          - page_count
                          - total_count
                        type: object
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - pagination
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Retrieve Visitor Companies
      tags:
        - Web Visits
        - v1
  /v1/web-visits/custom-feeds:
    get:
      description: |-
        Retrieve all custom feeds accessible to the current user for the given account.

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: getWebVisitsCustomFeeds
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: Specify which additional data should be attached to the result.
          example: folder
          in: query
          name: include
          schema:
            enum:
              - folder
              - connected_list
            type: string
        - description: When `true`, return only custom feeds connected to a Leadfeeder list. Omit or set to `false` to return all custom feeds.
          example: true
          in: query
          name: filter[has_connected_list]
          schema:
            type: boolean
      responses:
        "200":
          content:
            application/json:
              examples:
                customFeeds:
                  summary: A list of custom feeds
                  value:
                    data:
                      - attributes:
                          app_url: https://app.leadfeeder.com/f/123456/feed/a1b2c3d4-e5f6-7890-abcd-ef1234567890
                          created_at: "2026-01-15T10:30:00.000Z"
                          deletable: true
                          name: All companies
                          notifications: []
                          updated_at: "2026-01-20T14:00:00.000Z"
                          viewable: true
                        id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        relationships:
                          connected_list:
                            id: "512"
                            type: connected_list
                          created_by:
                            id: "12345"
                            type: user
                          folder:
                            id: "42"
                            type: custom_feed_folder
                        type: custom_feed
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CustomFeedV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Retrieve Custom Feeds
      tags:
        - Web Visits
        - v1
    post:
      description: |-
        Create a new custom feed for the given account.

        :::info
        Requires the `web_visits:write` OAuth2 scope.
        :::
      operationId: createWebVisitsCustomFeed
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              enterpriseHighIntent:
                description: Filter large German companies (201+ employees) with pricing intent or extended visits
                summary: Simple AND conditions
                value:
                  data:
                    attributes:
                      advanced_filters:
                        items:
                          - items:
                              - items:
                                  - items:
                                      - display_value: pricing
                                        field: page_url
                                        operator: contains
                                        type: filter
                                        value: pricing
                                    operator: or
                                    type: group
                                  - items:
                                      - display_value: Germany
                                        field: country_code
                                        operator: is
                                        type: filter
                                        value: DE
                                    operator: or
                                    type: group
                                  - items:
                                      - display_value: "201"
                                        field: employee_count
                                        operator: at_least
                                        type: filter
                                        value: 201
                                    operator: or
                                    type: group
                                operator: and
                                type: group
                              - items:
                                  - items:
                                      - display_value: 5 minutes
                                        field: visit_length
                                        operator: at_least
                                        type: filter
                                        value: 5 minutes
                                    operator: or
                                    type: group
                                operator: and
                                type: group
                            negated: false
                            operator: or
                            type: group
                          - items: []
                            negated: true
                            operator: or
                            type: group
                        operator: and
                        type: group
                      name: DE Enterprise High-Intent Accounts
                      notifications: []
                    relationships:
                      folder: null
                    type: custom_feed
              highIntentEngaged:
                description: Filter accounts with both pricing and demo visits OR extended visit duration
                summary: Multiple AND conditions joined by OR
                value:
                  data:
                    attributes:
                      advanced_filters:
                        items:
                          - items:
                              - items:
                                  - items:
                                      - display_value: pricing
                                        field: page_url
                                        operator: contains
                                        type: filter
                                        value: pricing
                                    operator: or
                                    type: group
                                  - items:
                                      - display_value: demo
                                        field: page_url
                                        operator: contains
                                        type: filter
                                        value: demo
                                    operator: or
                                    type: group
                                operator: and
                                type: group
                              - items:
                                  - items:
                                      - display_value: 5 minutes
                                        field: visit_length
                                        operator: at_least
                                        type: filter
                                        value: 5 minutes
                                    operator: or
                                    type: group
                                operator: and
                                type: group
                            negated: false
                            operator: or
                            type: group
                          - items: []
                            negated: true
                            operator: or
                            type: group
                        operator: and
                        type: group
                      name: High-Intent Engaged Accounts
                      notifications: []
                    relationships:
                      folder: null
                    type: custom_feed
              regionalCleanIntent:
                description: Filter companies from Hamburg or Brandenburg with pricing/demo page visits
                summary: Multiple OR conditions joined by AND
                value:
                  data:
                    attributes:
                      advanced_filters:
                        items:
                          - items:
                              - items:
                                  - items:
                                      - display_value: Hamburg
                                        field: region
                                        operator: is
                                        type: filter
                                        value: Hamburg
                                      - display_value: Brandenburg
                                        field: region
                                        operator: is
                                        type: filter
                                        value: Brandenburg
                                    operator: or
                                    type: group
                                  - items:
                                      - display_value: pricing
                                        field: page_url
                                        operator: contains
                                        type: filter
                                        value: pricing
                                      - display_value: demo
                                        field: page_url
                                        operator: contains
                                        type: filter
                                        value: demo
                                    operator: or
                                    type: group
                                operator: and
                                type: group
                            negated: false
                            operator: or
                            type: group
                          - items: []
                            negated: true
                            operator: or
                            type: group
                        operator: and
                        type: group
                      name: Hamburg/Brandenburg – Clean Intent Traffic
                      notifications: []
                    relationships:
                      folder: null
                    type: custom_feed
            schema:
              $ref: "#/components/schemas/CustomFeedRequestV1"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                customFeed:
                  summary: A single custom feed
                  value:
                    data:
                      attributes:
                        app_url: https://app.leadfeeder.com/f/123456/feed/a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        created_at: "2026-01-15T10:30:00.000Z"
                        deletable: true
                        name: All companies
                        notifications: []
                        updated_at: "2026-01-20T14:00:00.000Z"
                        viewable: true
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      relationships:
                        connected_list: null
                        created_by:
                          id: "12345"
                          type: user
                        folder:
                          id: "42"
                          type: custom_feed_folder
                      type: custom_feed
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CustomFeedV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:write
      summary: Create a Custom Feed
      tags:
        - Web Visits
        - v1
  /v1/web-visits/custom-feeds-folders:
    get:
      description: |-
        Retrieve all custom feed folders accessible to the current user for the given account.

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: getWebVisitsCustomFeedFolders
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: Specify which additional data should be attached to the result.
          example: custom_feeds
          in: query
          name: include
          schema:
            enum:
              - custom_feeds
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                folders:
                  summary: A list of custom feed folders
                  value:
                    data:
                      - attributes:
                          created_at: "2026-01-10T08:00:00.000Z"
                          name: Marketing Feeds
                          preset_folder: null
                          updated_at: "2026-01-15T12:00:00.000Z"
                        id: "42"
                        relationships:
                          custom_feeds:
                            - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                              type: custom_feed
                        type: custom_feed_folder
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/CustomFeedFolderV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Retrieve Custom Feeds Folders
      tags:
        - Web Visits
        - v1
  /v1/web-visits/custom-feeds/{custom_feed_id}:
    delete:
      description: |-
        Delete a custom feed by its ID.

        :::info
        Requires the `web_visits:write` OAuth2 scope.
        :::
      operationId: deleteWebVisitsCustomFeed
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The ID of the custom feed.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          in: path
          name: custom_feed_id
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:write
      summary: Delete a Custom Feed
      tags:
        - Web Visits
        - v1
    get:
      description: |-
        Retrieve a single custom feed by its ID.

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: getWebVisitsCustomFeed
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The ID of the custom feed.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          in: path
          name: custom_feed_id
          required: true
          schema:
            type: string
        - description: Specify which additional data should be attached to the result.
          example: folder
          in: query
          name: include
          schema:
            enum:
              - folder
              - connected_list
            type: string
      responses:
        "200":
          content:
            application/json:
              examples:
                customFeed:
                  summary: A single custom feed
                  value:
                    data:
                      attributes:
                        app_url: https://app.leadfeeder.com/f/123456/feed/a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        created_at: "2026-01-15T10:30:00.000Z"
                        deletable: true
                        name: All companies
                        notifications: []
                        updated_at: "2026-01-20T14:00:00.000Z"
                        viewable: true
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      relationships:
                        connected_list: null
                        created_by:
                          id: "12345"
                          type: user
                        folder:
                          id: "42"
                          type: custom_feed_folder
                      type: custom_feed
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CustomFeedV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Get Custom Feed Details
      tags:
        - Web Visits
        - v1
    patch:
      description: |-
        Update an existing custom feed. All attributes are optional; only provided attributes will be updated.

        :::info
        Requires the `web_visits:write` OAuth2 scope.
        :::
      operationId: updateWebVisitsCustomFeed
      parameters:
        - $ref: "#/components/parameters/AccountId"
        - description: The ID of the custom feed.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          in: path
          name: custom_feed_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            examples:
              moveToFolder:
                description: Assign feed to a different folder
                summary: Move feed to folder
                value:
                  data:
                    attributes:
                      name: My Custom Feed
                    relationships:
                      folder:
                        id: "194"
                        type: custom_feed_folder
                    type: custom_feed
              removeFolder:
                description: Remove feed from its folder
                summary: Remove folder assignment
                value:
                  data:
                    attributes:
                      name: My Custom Feed
                    relationships:
                      folder: null
                    type: custom_feed
              updateFilters:
                description: Update the advanced filters for a feed
                summary: Update filters
                value:
                  data:
                    attributes:
                      advanced_filters:
                        items:
                          - items:
                              - items:
                                  - items:
                                      - display_value: 500+
                                        field: employee_count
                                        operator: at_least
                                        type: filter
                                        value: 500
                                    operator: or
                                    type: group
                                operator: and
                                type: group
                            negated: false
                            operator: or
                            type: group
                          - items: []
                            negated: true
                            operator: or
                            type: group
                        operator: and
                        type: group
                      name: Enterprise Companies
                    type: custom_feed
              updateName:
                description: Update only the name of an existing feed
                summary: Update feed name
                value:
                  data:
                    attributes:
                      name: Updated Feed Name
                    type: custom_feed
            schema:
              $ref: "#/components/schemas/CustomFeedRequestV1"
        required: true
      responses:
        "200":
          content:
            application/json:
              examples:
                customFeed:
                  summary: A single custom feed
                  value:
                    data:
                      attributes:
                        app_url: https://app.leadfeeder.com/f/123456/feed/a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        created_at: "2026-01-15T10:30:00.000Z"
                        deletable: true
                        name: All companies
                        notifications: []
                        updated_at: "2026-01-20T14:00:00.000Z"
                        viewable: true
                      id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      relationships:
                        connected_list: null
                        created_by:
                          id: "12345"
                          type: user
                        folder:
                          id: "42"
                          type: custom_feed_folder
                      type: custom_feed
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/CustomFeedV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:write
      summary: Update Custom Feed
      tags:
        - Web Visits
        - v1
  /v1/web-visits/goals:
    get:
      description: |-
        Retrieve all goals defined in the account. A goal is a page-view condition — on the page URL or title, a form submission, a file download or a video — that marks the page views signalling buying intent, such as visits to a pricing page. `relationships.custom_feed` links a goal to the Web Visits custom feed listing the companies with a page view meeting it, and a custom feed's `advanced_filters` can filter on the `goal` field with a goal's `id`.

        Credit Note: Retrieving goals does not consume credits.

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: getWebVisitsGoals
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  - attributes:
                      app_url: https://app.leadfeeder.com/f/settings/website/123456/goals/4182/edit
                      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
                  - attributes:
                      app_url: https://app.leadfeeder.com/f/settings/website/123456/goals/4183/edit
                      created_at: "2026-10-03T08:30:00.000Z"
                      criterion:
                        field: form_submit
                        operator: is_present
                        value: null
                      enabled: false
                      name: Any form
                      updated_at: "2026-10-03T08:30:00.000Z"
                    id: "4183"
                    relationships:
                      custom_feed: null
                    type: goal
                meta:
                  request_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/GoalV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Retrieve Goals
      tags:
        - Web Visits
        - v1
    post:
      description: |-
        Create a goal in the account. A goal only marks page views tracked after it is created; earlier visits are not re-checked. The goal's custom feed is created in the background, so `relationships.custom_feed` is usually `null` in the response.

        The operators each `criterion.field` accepts:

        | `field` | Operators |
        | --- | --- |
        | `page_url` | `is`, `is_not`, `begins_with`, `not_begins_with`, `ends_with`, `contains`, `not_contains` |
        | `page` | `is`, `is_not`, `begins_with`, `ends_with`, `contains`, `not_contains` |
        | `form_submit` | `is`, `is_not`, `is_present`, `is_empty` |
        | `file_download_name` | `is`, `is_not`, `contains`, `is_present`, `is_empty` |
        | `video_title` | `is`, `is_not`, `begins_with`, `contains`, `is_present`, `is_empty` |
        | `video_url` | `is`, `is_not`, `begins_with`, `is_present`, `is_empty` |

        Credit Note: Creating a goal does not consume credits.

        :::info
        Requires the `web_visits:write` OAuth2 scope.
        :::
      operationId: createWebVisitsGoal
      parameters:
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              anyForm:
                description: A goal met by every form submission, created disabled
                summary: Any form submission
                value:
                  data:
                    attributes:
                      criterion:
                        field: form_submit
                        operator: is_present
                      enabled: false
                      name: Any form
                    type: goal
              pricingPage:
                description: Any page whose URL contains /pricing
                summary: Page URL
                value:
                  data:
                    attributes:
                      criterion:
                        field: page_url
                        operator: contains
                        value: /pricing
                      name: Pricing page
                    type: goal
            schema:
              $ref: "#/components/schemas/GoalCreateRequestV1"
        required: true
      responses:
        "201":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/goals/4182/edit
                    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: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/GoalV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:write
      summary: Create a Goal
      tags:
        - Web Visits
        - v1
  /v1/web-visits/goals/{id}:
    delete:
      description: |-
        Delete a goal by its ID. Its custom feed is deleted too, and the goal is removed from the page views it marked. The deletion completes in the background, so the goal can still be returned by the other goal endpoints for a short time; the request does not need retrying.

        :::info
        Requires the `web_visits:write` OAuth2 scope.
        :::
      operationId: deleteWebVisitsGoal
      parameters:
        - description: The goal ID.
          example: "4182"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data: null
                meta:
                  request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    type: "null"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:write
      summary: Delete a Goal
      tags:
        - Web Visits
        - v1
    get:
      description: |-
        Get a goal by its ID, including its name, whether it is enabled and the page-view condition that defines it.

        Credit Note: Retrieving a goal does not consume credits.

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: getWebVisitsGoal
      parameters:
        - description: The goal ID.
          example: "4182"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/goals/4182/edit
                    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: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/GoalV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Get Goal Details
      tags:
        - Web Visits
        - v1
    patch:
      description: |-
        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:

        | `field` | Operators |
        | --- | --- |
        | `page_url` | `is`, `is_not`, `begins_with`, `not_begins_with`, `ends_with`, `contains`, `not_contains` |
        | `page` | `is`, `is_not`, `begins_with`, `ends_with`, `contains`, `not_contains` |
        | `form_submit` | `is`, `is_not`, `is_present`, `is_empty` |
        | `file_download_name` | `is`, `is_not`, `contains`, `is_present`, `is_empty` |
        | `video_title` | `is`, `is_not`, `begins_with`, `contains`, `is_present`, `is_empty` |
        | `video_url` | `is`, `is_not`, `begins_with`, `is_present`, `is_empty` |

        :::info
        Requires the `web_visits:write` OAuth2 scope.
        :::
      operationId: updateWebVisitsGoal
      parameters:
        - description: The goal ID.
          example: "4182"
          in: path
          name: id
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/AccountId"
      requestBody:
        content:
          application/json:
            examples:
              disable:
                description: Stop the goal matching new page views
                summary: Disable
                value:
                  data:
                    attributes:
                      enabled: false
                    type: goal
              renameOnly:
                description: Change the name without touching the criterion
                summary: Rename only
                value:
                  data:
                    attributes:
                      name: Plans page
                    type: goal
              replaceCriterion:
                description: Match a different URL, keeping the field
                summary: Replace the criterion
                value:
                  data:
                    attributes:
                      criterion:
                        operator: begins_with
                        value: /plans
                    type: goal
            schema:
              $ref: "#/components/schemas/GoalUpdateRequestV1"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                data:
                  attributes:
                    app_url: https://app.leadfeeder.com/f/settings/website/123456/goals/4182/edit
                    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: a1b2c3d4-e5f6-7890-abcd-ef1234567890
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/GoalV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "400":
          content:
            application/json:
              example:
                errors:
                  - code: bad_request
                    title: Invalid request body or missing required fields
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Bad Request
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "422":
          content:
            application/json:
              example:
                errors:
                  - code: unprocessable_entity
                    title: The request could not be processed.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unprocessable entity
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:write
      summary: Update a Goal
      tags:
        - Web Visits
        - v1
  /v1/web-visits/tracker:
    get:
      description: |-
        Retrieve the tracking script for the given account. The response includes the script hash and a ready-to-use HTML snippet to embed on your website to enable visitor tracking.

        It also reports whether the script is actually sending data. `status` is `receiving_data` when an event arrived in the last 48 hours, `stopped_receiving` when events were received before that but not since, and `never_received_data` when no event has ever been received. Use it to tell a tracker that was never installed from one that has stopped working.

        `status` reflects whether events are arriving, not whether they produce results: an account can be `receiving_data` while `visiting_companies.last_30_days` is `0`, which means the script is working but no companies could be identified from the traffic.

        :::info
        Requires the `web_visits:read` OAuth2 scope.
        :::
      operationId: getWebVisitsTracker
      parameters:
        - $ref: "#/components/parameters/AccountId"
      responses:
        "200":
          content:
            application/json:
              examples:
                tracker:
                  summary: Tracker script details
                  value:
                    data:
                      attributes:
                        data_processed:
                          first_at: "2026-07-18T04:22:07Z"
                          last_at: "2026-08-17T09:35:00Z"
                        last_event_received_at: "2026-08-17T09:41:12Z"
                        script:
                          hash: a1b2c3d4e5f6
                          html: <script>(function(ss,ex){ window.ldfdr=window.ldfdr||function(){(ldfdr._q=ldfdr._q||[]).push([].slice.call(arguments));}; (function(d,s){ fs=d.getElementsByTagName(s)[0]; function ce(src){ var cs=d.createElement(s); cs.src=src; cs.async=1; fs.parentNode.insertBefore(cs,fs); }; ce('https://sc.lfeeder.com/lftracker_v1_'+ss+(ex?'_'+ex:'')+'.js'); })(document,'script'); })('a1b2c3d4e5f6');</script>
                        status: receiving_data
                        timezone: Europe/Helsinki
                        visiting_companies:
                          last_30_days: 128
                          monthly_average: 140
                      id: "123456"
                      type: web_visits_tracker_script
                    meta:
                      request_id: cf054205-dd8c-4473-8689-07c30fe0789f
              schema:
                properties:
                  data:
                    $ref: "#/components/schemas/WebVisitsTrackerScriptV1"
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    required:
                      - request_id
                    type: object
                required:
                  - data
                  - meta
                type: object
          description: Success
        "401":
          content:
            application/json:
              examples:
                api_key_expired:
                  summary: API key has an `expires_at` in the past
                  value:
                    errors:
                      - code: api_key_expired
                        title: The provided API key has expired. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_api_key:
                  summary: API key value is not recognised
                  value:
                    errors:
                      - code: invalid_api_key
                        title: The provided API key is invalid. Please generate a new API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_token:
                  summary: OAuth access token is not recognised
                  value:
                    errors:
                      - code: invalid_token
                        title: The provided token is invalid.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_token:
                  summary: No API key or Authorization header was presented
                  value:
                    errors:
                      - code: missing_token
                        title: You need to pass a header named `X-Api-Key` that contains a valid API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_inactive:
                  summary: OAuth application bound to the token has been disabled
                  value:
                    errors:
                      - code: oauth_app_inactive
                        title: The OAuth application is not active.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                oauth_app_not_found:
                  summary: OAuth application bound to the token no longer exists
                  value:
                    errors:
                      - code: oauth_app_not_found
                        title: The OAuth application was not found.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_expired:
                  summary: OAuth access token has expired
                  value:
                    errors:
                      - code: token_expired
                        title: The provided token has expired.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                token_revoked:
                  summary: OAuth access token has been revoked
                  value:
                    errors:
                      - code: token_revoked
                        title: The provided token has been revoked.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Unauthorized. The request was rejected because the credentials are missing, invalid, expired, or have been revoked. The client must re-authenticate before retrying. Clients can differentiate via the `code` value of the first item in `errors`.
          headers:
            WWW-Authenticate:
              description: Per RFC 7235, the value advertises the authentication scheme expected by the API.
              schema:
                example: Bearer realm="api.leadfeeder.com"
                type: string
        "403":
          content:
            application/json:
              examples:
                insufficient_permissions:
                  summary: User lacks `manage_api` permission for the account
                  value:
                    errors:
                      - code: insufficient_permissions
                        title: Your current user permissions do not allow access to this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                insufficient_scope:
                  summary: OAuth access token does not carry the required scope
                  value:
                    errors:
                      - code: insufficient_scope
                        title: The token does not have the required `companies:read` scope for this endpoint.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_account_id:
                  summary: account_id does not belong to the authenticated user
                  value:
                    errors:
                      - code: invalid_account_id
                        title: The provided account ID does not belong to the user associated with the API key.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                invalid_subscription:
                  summary: Subscription plan does not include the required entitlement
                  value:
                    errors:
                      - code: access_denied
                        title: "Your plan doesn't include access to this endpoint. See your upgrade options: https://app.leadfeeder.com/l/settings/purchase/subscription"
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                list_read_only:
                  summary: The target list is read-only (e.g. a revealed or CRM-managed list)
                  value:
                    errors:
                      - code: access_denied
                        title: This list is read-only and its members cannot be modified
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                missing_account_id:
                  summary: Required `account_id` query parameter is absent
                  value:
                    errors:
                      - code: missing_account_id
                        title: The `account_id` query parameter is required to identify which account to access.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Forbidden. The credentials are valid but the caller is not authorized to perform the request — typically because the user lacks the required permission, the OAuth scope is insufficient, the subscription plan does not include the required entitlement, the `account_id` does not belong to the authenticated user, or the target list is read-only and its members cannot be modified. Clients can differentiate via the `code` value of the first item in `errors`.
        "404":
          content:
            application/json:
              example:
                errors:
                  - code: entity_not_found
                    title: The requested resource with the ID 'xyz' could not be found.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Not found
        "429":
          content:
            application/json:
              examples:
                quota_exceeded:
                  summary: Monthly request quota exceeded
                  value:
                    errors:
                      - code: quota_exceeded
                        title: You've exceeded your monthly request quota. Please try again next month or contact your account manager to increase the quota.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                rate_limit_exceeded:
                  summary: Per-second rate limit exceeded
                  value:
                    errors:
                      - code: rate_limit_exceeded
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
                too_many_requests:
                  summary: API Gateway throttling (legacy)
                  value:
                    errors:
                      - code: too_many_requests
                        title: You've exceeded the maximum amount of allowed requests. Please try again later.
                    meta:
                      request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Too many requests. Either the per-second rate limit or the monthly quota configured for the API key / OAuth application has been exceeded. Clients can differentiate via the `code` value of the first item in `errors`.
        "500":
          content:
            application/json:
              example:
                errors:
                  - code: internal_server_error
                    title: An internal error occurred on the server side. Please try again later.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Internal server error
        "504":
          content:
            application/json:
              example:
                errors:
                  - code: server_timeout
                    title: The request could not be completed because the server took too long to respond.
                meta:
                  request_id: 123e4567-e89b-12d3-a456-426614174000
              schema:
                properties:
                  errors:
                    items:
                      $ref: "#/components/schemas/ErrorObjectV1"
                    type: array
                  meta:
                    properties:
                      request_id:
                        description: A unique identifier assigned to each API request for end-to-end traceability.
                        example: cf054205-dd8c-4473-8689-07c30fe0789f
                        type: string
                    type: object
                type: object
          description: Server timeout
      security:
        - ApiKeyAuth: []
        - OAuth2:
            - web_visits:read
      summary: Retrieve Web Visits Tracker Script
      tags:
        - Web Visits
        - v1
security:
  - ApiKeyAuth: []
  - OAuth2: []
servers:
  - url: https://api.leadfeeder.com
