Skip to main content

query contacts

GET 

/org/:orgId/contact/query

Query contacts with advanced filtering, sorting, and pagination using CRUD query language. Supports complex filters, sorting by multiple fields, and pagination.

Request

Path Parameters

    orgId stringrequired

    Organization ID

Query Parameters

    page_size integer

    Number of items per page (default 20, max 1000)

    page_number integer

    Page number (default 1)

    qs string

    Query style: 'json' or 'lisp' (default 'lisp')

    q string

    Filter expression in the format specified by qs param

    ss string

    Sort style: 'json' or 'simple' (default 'simple')

    s string

    Sort expression in the format specified by ss param

Body

    object

Responses

Paginated list of contacts

Schema

    data

    object[]

  • Array [

  • companyContactId string

    CompanyContactID holds the value of the "company_contact_id" field.

    creationTime date-time

    CreationTime holds the value of the "creation_time" field.

    emailAddress string

    EmailAddress holds the value of the "email_address" field.

    id string

    ID of the ent.

    info

    object

    Info holds the value of the "info" field.

    companyLocation string
    companyName string

    cosellPartnerMetrics

    object

    CosellPartnerMetrics holds computed metrics for partner contacts (AWS PDMs, Azure PMs, GCP contacts). Only populated for contacts with tags containing "partner".

    accountCount integer

    AccountCount is the number of unique Salesforce accounts associated with this contact. This is len(Accounts) stored for efficient sorting/filtering.

    accounts

    object[]

    Accounts contains Salesforce accounts associated with this contact's referrals. Account IDs are extracted from referrals, names are fetched from Salesforce.

  • Array [

  • createdDate string

    CreatedDate is the account creation date in Salesforce (YYYY-MM-DD format).

    domain string

    Domain is the account's domain extracted from the Website field in Salesforce.

    id string

    ID is the Salesforce account ID.

    industry string

    Industry is the account's industry classification from Salesforce.

    name string

    Name is the account name (fetched from Salesforce).

    opportunities

    object[]

    Opportunities contains the Salesforce opportunities for this account. Fetched via SOQL relationship query during cron workflow.

  • Array [

  • amount number

    Amount is the opportunity deal value.

    closeDate string

    CloseDate is the expected or actual close date (YYYY-MM-DD format).

    createdDate string

    CreatedDate is the opportunity creation date in Salesforce (YYYY-MM-DDTHH:MM:SS.000+0000 format).

    currencyIsoCode string

    CurrencyIsoCode is the ISO currency code (e.g., "USD", "EUR").

    id string

    ID is the Salesforce opportunity ID.

    name string

    Name is the opportunity name.

    ownerEmail string

    OwnerEmail is the email of the opportunity owner (from Salesforce User).

    ownerName string

    OwnerName is the name of the opportunity owner (from Salesforce User).

    probability number

    Probability is the likelihood of closing the deal (0-100 percentage).

    stageName string

    StageName is the current sales stage (e.g., "Prospecting", "Closed Won", "Closed Lost").

  • ]

  • source string

    Source indicates how this account was added to the partner contact. "Predicted": Added through domain matching in predicted contacts workflow. "Referral": Added through actual referral activity, or transitioned from Predicted. Lifecycle: Predicted → Referral (when account gets referral activity). Uses PartnerContactSource* constants.

    type string

    Type is the account type from Salesforce (e.g., "Customer", "Prospect", "Target").

  • ]

  • closedLostCount integer

    ClosedLostCount is the number of referrals with status CLOSED_LOST where this contact is assigned.

    closedWonAmount

    object

    ClosedWonAmount is the sum of deal values for CLOSED_WON referrals, grouped by currency. Format: {"USD": 500000.00, "EUR": 100000.00}

    property name* number
    closedWonCount integer

    ClosedWonCount is the number of referrals with status CLOSED_WON where this contact is assigned.

    engagementTimeSeries

    object[]

    EngagementTimeSeries contains monthly engagement metrics for the last 6 months. Pre-computed during the daily cron workflow for efficient API responses. Sorted chronologically by period (oldest to newest).

  • Array [

  • cosellDeals integer

    CosellDeals is the number of referrals created in this month.

    opportunityActivity integer

    OpportunityActivity is the number of opportunities with activity in this month.

    period string

    Period is the month in YYYY-MM format (e.g., "2024-01").

  • ]

  • inboundReferralCount integer

    InboundReferralCount is the number of inbound referrals (direction = INBOUND) where this contact is assigned.

    industries string[]

    Industries contains unique standardized industry classifications for this contact. Values are normalized to AWS ACE industry picklist (28 values). Priority: CRM account industry > referral industry (AWS/GCP only).

    locations

    object[]

    Locations contains customer locations with their mapped sales regions. Extracted from referral customer addresses and mapped to sales territories.

  • Array [

  • location string

    Location is the customer location string (e.g., "Seattle, WA, US", "London, UK").

    region string

    Region is the mapped sales territory (e.g., "US West", "EMEA", "APAC").

  • ]

  • managedDomains string[]

    ManagedDomains contains the unique customer domains from referrals where this partner contact is assigned. Extracted from buyer company domains.

    oppOwners

    object[]

    OppOwners contains unique opportunity owners from the contact's associated accounts. Aggregated from opportunities across all accounts for quick display. Deduplicated by email and sorted by name.

  • Array [

  • email string

    Email is the opportunity owner's email address.

    name string

    Name is the opportunity owner's name.

  • ]

  • outboundReferralCount integer

    OutboundReferralCount is the number of outbound referrals (direction = OUTBOUND) where this contact is assigned.

    pipeline

    object

    Pipeline is the sum of deal values for active (accepted) referrals, grouped by currency. Format: {"USD": 150000.00, "CAD": 25000.00} Includes only referrals that have been accepted by the partner.

    property name* number
    predictionMetrics
    source string

    Source indicates how this partner contact was created and its lifecycle state. "Referral": Contact with actual referral activity (created directly or transitioned from Predicted). "Predicted": Contact suggested based on domain matching from another organization. Lifecycle: Predicted → Referral (when contact gets referral activity).

    successRate number

    SuccessRate is the win rate: (ClosedWonCount / [ClosedWonCount + ClosedLostCount]) × 100 nil if no closed referrals (ClosedWonCount + ClosedLostCount == 0) Note: Rejected/Declined/Expired referrals are NOT included (they were never active)

    enrichedContactInfo

    object

    Enriched contact information from enrichment service

    city string
    companyDomain string
    companyName string

    Company information

    country string

    Location information

    creationTime date-time

    Timestamps

    email string

    Contact information

    firstName string
    id string

    Core identification fields

    info

    object

    Additional structured information

    apolloId string

    ApolloID is the Apollo.io person ID for re-enrichment.

    isPrimary boolean

    IsPrimary indicates this is the highest-seniority partnership contact.

    seniority string

    Seniority is the contact's seniority level inferred from job title (e.g., "vp", "director", "manager", "ic").

    workExperiences

    object[]

  • Array [

  • current boolean

    true if the work experience is current

    endDate date-time
    organizationName string
    startDate date-time
    title string
  • ]

  • jobFunction string
    jobTitle string

    Professional information

    lastName string
    lastUpdateTime date-time
    linkedIn string
    name string
    phone string
    s3KeyPicture string

    Media and social

    status EnrichmentDataStatus (string)

    Possible values: [active, stale, archived]

    active/stale/archived

    twitter string
    lastModifiedBy string
    partner Partner (string)

    Possible values: [``, ADYEN, ALIBABA, ANTIGRAVITY, ANTHROPIC, AWS, AWS_CHINA, AZURE, CHARGEBEE, CLICKUP, DATABRICKS, DATADOG, DEEPSEEK, DOCUSIGN, DNS, GCP, GITHUB, GONG, GOOGLE, HUBSPOT, INTUIT, KIMI, LAGO, MARKETO, METRONOME, MICROSOFT, MINIMAX, NOTION, OPENAI, ORACLE, ORB, REDHAT, SALESFORCE, SLACK, SNOWFLAKE, STRIPE, ZOHO, OAUTH2, SALESFORCE, HUBSPOT, AWS, AZURE, GCP]

    The partner where this usage metering daily record is from. Such as AWS, AZURE or GCP.

    phoneNumber string
    role string
    lastUpdateTime date-time

    LastUpdateTime holds the value of the "last_update_time" field.

    name string

    Name holds the value of the "name" field.

    organizationID string

    OrganizationID holds the value of the "organization_id" field.

    tags string[]

    Tags holds the value of the "tags" field.

  • ]

  • page_number integer
    page_size integer
    total_count integer
Loading...