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

# Draft an ICP Builder, Intent Builder or Persona Builder profile from the account's data

> A first draft to review and save with POST /profiles/{kind}. `kind=icp`: sector (SIC major groups on branch_international), size and country rules from the companies tagged customer on the tracker (`basis=customers`), from the CRM-linked companies (`basis=crm`), or, for accounts without either, from what similar Leadinfo customers hold in their CRMs (`basis=cohort`: same SIC code prefix, every customer weighted equally, values under five customers hidden). `basis=auto` tries them in that order. `kind=intent`: url rules from the pages identified companies viewed in the last 180 days, grouped by page family (pricing, demo, contact, comparison, integrations, product, cases). `kind=persona`: one Persona Builder draft per role family (marketing, sales, customer success, IT, HR, finance, owners and executives) from the identified visitors with a job title at customer-tagged, CRM-linked or all companies (`basis=customers|crm|visitors`, 365 days), or from the personas of similar customers (`basis=cohort`). Persona drafts are returned in `personas`, each with `as_rules` ready for POST /profiles/persona. Evidence carries the shares and lifts behind every rule.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/profiles/{kind}/suggestions
openapi: 3.1.0
info:
  title: Leadinfo Data API
  version: 0.1.0
  x-logo:
    url: https://asset.leadinfo.com/assets/email_logo.png
servers:
  - url: https://data.leadinfo.com
    description: Production
security: []
paths:
  /v1/profiles/{kind}/suggestions:
    get:
      tags:
        - profiles
      summary: >-
        Draft an ICP Builder, Intent Builder or Persona Builder profile from the
        account's data
      description: >-
        A first draft to review and save with POST /profiles/{kind}. `kind=icp`:
        sector (SIC major groups on branch_international), size and country
        rules from the companies tagged customer on the tracker
        (`basis=customers`), from the CRM-linked companies (`basis=crm`), or,
        for accounts without either, from what similar Leadinfo customers hold
        in their CRMs (`basis=cohort`: same SIC code prefix, every customer
        weighted equally, values under five customers hidden). `basis=auto`
        tries them in that order. `kind=intent`: url rules from the pages
        identified companies viewed in the last 180 days, grouped by page family
        (pricing, demo, contact, comparison, integrations, product, cases).
        `kind=persona`: one Persona Builder draft per role family (marketing,
        sales, customer success, IT, HR, finance, owners and executives) from
        the identified visitors with a job title at customer-tagged, CRM-linked
        or all companies (`basis=customers|crm|visitors`, 365 days), or from the
        personas of similar customers (`basis=cohort`). Persona drafts are
        returned in `personas`, each with `as_rules` ready for POST
        /profiles/persona. Evidence carries the shares and lifts behind every
        rule.
      operationId: suggest_profile_v1_profiles__kind__suggestions_get
      parameters:
        - name: kind
          in: path
          required: true
          schema:
            type: string
            enum:
              - icp
              - intent
              - persona
            title: Kind
        - name: tracker_code
          in: query
          required: true
          schema:
            type: string
            description: The tracker whose data the draft is built from.
            title: Tracker Code
          description: The tracker whose data the draft is built from.
        - name: basis
          in: query
          required: false
          schema:
            enum:
              - auto
              - customers
              - crm
              - cohort
              - pages
              - visitors
            type: string
            description: >-
              icp: auto, customers, crm or cohort. intent: auto or pages.
              persona: auto, customers, crm, visitors or cohort.
            default: auto
            title: Basis
          description: >-
            icp: auto, customers, crm or cohort. intent: auto or pages. persona:
            auto, customers, crm, visitors or cohort.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileSuggestion'
        '401':
          description: Invalid credentials.
        '403':
          description: Tracker not owned by this client.
        '422':
          description: Not enough data for the requested basis.
        '504':
          description: The sample was too large to summarise in time.
      security:
        - HTTPBearer: []
components:
  schemas:
    ProfileSuggestion:
      properties:
        kind:
          type: string
          enum:
            - icp
            - intent
            - persona
          title: Kind
        basis:
          type: string
          enum:
            - customers
            - crm
            - cohort
            - pages
            - visitors
            - site
          title: Basis
        sample_size:
          type: integer
          title: Sample Size
        sample:
          type: string
          title: Sample
          description: What the sample is and where it came from
        rules:
          items:
            $ref: '#/components/schemas/ProfileRule'
          type: array
          title: Rules
          description: >-
            A draft profile, ready for POST /profiles/{kind} after review
            (persona drafts are in personas)
        evidence:
          items:
            $ref: '#/components/schemas/SuggestionEvidence'
          type: array
          title: Evidence
        notes:
          items:
            type: string
          type: array
          title: Notes
        personas:
          items:
            $ref: '#/components/schemas/PersonaDraft'
          type: array
          title: Personas
          description: >-
            kind=persona only: one draft per role family; save one with POST
            /profiles/persona using the rules of its as_rules
      type: object
      required:
        - kind
        - basis
        - sample_size
        - sample
        - rules
        - evidence
        - notes
      title: ProfileSuggestion
    ProfileRule:
      properties:
        field:
          type: string
          enum:
            - name
            - domain
            - country
            - city
            - province
            - postal_code
            - employee_range
            - branch_local
            - branch_international
            - legal_form
            - description
            - region
            - employees
            - branch_code
            - sales_volume
            - founded_year
            - sessions
            - pages
            - duration
            - unique_visitors
            - active_days
            - visitors
            - persona_visitors
            - form_submissions
            - leadbot_submissions
            - sessions_total
            - pages_total
            - duration_total
            - is_new
            - is_returning
            - lead_score
            - is_ai_agent
            - in_crm
            - is_shared_network
            - engagement_score
            - icp_score
            - intent_score
            - score
            - first_seen
            - last_seen
            - source
            - medium
            - campaign
            - term
            - content
            - referrer
            - referrer_host
            - click_provider
            - paid_source
            - organic_source
            - social_source
            - ai_source
            - url
            - page_title
            - tag
          title: Field
          description: >-
            Intent rules match the page path for url (e.g. /pricing, without
            domain or query string) or the page title for page_title.
        operator:
          type: string
          enum:
            - equals
            - not_equals
            - contains
            - not_contains
            - starts_with
            - not_starts_with
            - ends_with
            - not_ends_with
            - in
            - not_in
            - all
            - greater_than
            - greater_than_or_equal
            - less_than
            - less_than_or_equal
            - between
            - not_between
            - is_known
            - is_unknown
            - less_than_x_units_ago
            - more_than_x_units_ago
          title: Operator
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
        unit:
          anyOf:
            - type: string
              enum:
                - hours
                - days
                - weeks
                - months
            - type: 'null'
          title: Unit
        weight:
          type: integer
          maximum: 100
          minimum: 1
          title: Weight
          description: >-
            Intent only: how much a match contributes; one matched rule of
            weight 10 gives intent about 50, two about 75. Not editable yet:
            every rule counts 10. ICP rules carry no weight: an ICP matches when
            all its rules match.
          default: 10
        label:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
          title: Label
          description: Shown in score explanations, e.g. 'Benelux' or 'Pricing page'.
      type: object
      required:
        - field
        - operator
      title: ProfileRule
    SuggestionEvidence:
      properties:
        field:
          type: string
          title: Field
        value:
          type: string
          title: Value
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Human name of the value, e.g. the SIC major group
        companies:
          type: integer
          title: Companies
          description: Companies in the sample with this value (0 when not applicable)
          default: 0
        people:
          anyOf:
            - type: integer
            - type: 'null'
          title: People
          description: 'Persona: identified visitors carrying this title'
        share:
          type: number
          title: Share
          description: Share of the sample, 0-1
        customers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customers
          description: >-
            Cohort basis: how many similar customers hold such companies in
            their CRM
        lift:
          anyOf:
            - type: number
            - type: 'null'
          title: Lift
          description: >-
            Share in the sample divided by the share among all identified
            companies
        views:
          anyOf:
            - type: integer
            - type: 'null'
          title: Views
          description: 'Intent: page views behind this value'
        pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pages
          description: 'Intent from the site: pages of the site carrying this value'
        examples:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Examples
          description: 'Intent from the site: example paths with this value'
      type: object
      required:
        - field
        - value
        - share
      title: SuggestionEvidence
    PersonaDraft:
      properties:
        name:
          type: string
          title: Name
          description: Role family, e.g. Marketing or Owners and executives
        job_title:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Job Title
          description: >-
            Persona Builder job-title rule: in_array -> exact titles
            (case-insensitive)
        country:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
          title: Country
          description: >-
            Persona Builder country rule: in_array -> ISO-2 codes; empty means
            any country
        people:
          type: integer
          title: People
          description: Identified visitors in this family (0 for cohort drafts)
        companies:
          type: integer
          title: Companies
          description: Distinct companies those visitors came from
        share:
          type: number
          title: Share
          description: Share of the sample this family covers, 0-1
        customers:
          anyOf:
            - type: integer
            - type: 'null'
          title: Customers
          description: 'Cohort basis: similar customers with a persona like this'
        as_rules:
          items:
            $ref: '#/components/schemas/PersonaRule'
          type: array
          title: As Rules
          description: The same draft as rules for POST /profiles/persona
      type: object
      required:
        - name
        - job_title
        - people
        - companies
        - share
      title: PersonaDraft
    PersonaRule:
      properties:
        field:
          type: string
          enum:
            - job_title
            - country
          title: Field
          description: >-
            job_title matches the person's job title, country their ISO-2
            country.
        operator:
          type: string
          enum:
            - in_array
            - contains
            - starts_with
            - not_in_array
          title: Operator
          description: >-
            job_title: in_array (exact titles, case-insensitive), contains (any
            of the words), starts_with (any of the prefixes) or not_in_array;
            country: in_array.
        value:
          items:
            type: string
          type: array
          title: Value
          description: >-
            Titles, words or ISO-2 country codes; a comma-separated string is
            split.
        label:
          anyOf:
            - type: string
              maxLength: 80
            - type: 'null'
          title: Label
      type: object
      required:
        - field
        - operator
        - value
      title: PersonaRule
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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