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

# Enrich Contacts (Sync)

> Enrich contacts synchronously and return results directly in the response — no webhook required.

The response contains all enriched contacts in a single call. **Maximum 10 contacts per request.** Rate limited to **5 requests per minute**.



## OpenAPI

````yaml POST /trigger/enrich/sync
openapi: 3.1.0
info:
  title: OpenAPI Lonescale
  description: A sample API for Lonescale
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://public-api.lonescale.com
security:
  - ApiKeyAuth: []
paths:
  /trigger/enrich/sync:
    post:
      description: >-
        Enrich contacts synchronously and return results directly in the
        response — no webhook required.


        The response contains all enriched contacts in a single call. **Maximum
        10 contacts per request.** Rate limited to **5 requests per minute**.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrichmentSyncRequest'
        required: true
      responses:
        '200':
          description: Contacts enriched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncEnrichmentResponse'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Bad request
                error: Bad request
                statusCode: 400
        '401':
          description: Invalid or missing authentication credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              example:
                message: Invalid API Key
                error: Unauthorized
                statusCode: 401
        '403':
          description: Insufficient enrichment credits or admin not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: User has no enrichment credits
                error: Forbidden
                statusCode: 403
        '429':
          description: Rate limit exceeded — max 5 requests per minute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: 'ThrottlerException: Too Many Requests'
                error: Too Many Requests
                statusCode: 429
components:
  schemas:
    EnrichmentSyncRequest:
      type: object
      additionalProperties: false
      required:
        - enrichment_type
        - contacts
      properties:
        enrichment_type:
          type: array
          description: Types of enrichment to perform.
          items:
            type: string
            enum:
              - email
              - phone
              - profile
          minItems: 1
          uniqueItems: true
        custom:
          $ref: '#/components/schemas/EnrichmentCustomOptions'
        contacts:
          type: array
          description: Contacts to enrich. Maximum 10 contacts per request.
          items:
            $ref: '#/components/schemas/Contact'
          minItems: 1
          maxItems: 10
        detect_job_change:
          type: boolean
          description: >-
            When `true`, each contact in the response will include a
            `jobChangeDetected` field indicating whether the contact has changed
            company since the input data was provided.


            Only effective when `enrichment_type` includes `"profile"`.
      example:
        enrichment_type:
          - email
          - phone
        contacts:
          - firstname: John
            lastname: Doe
            email: john@acme.com
            job_title: ceo
            linkedin_url: https://www.linkedin.com/in/john-doe/
            domain: acme.com
            company_name: Acme
            custom:
              contact_id: '44479301'
        custom:
          provider: lonescale
          enrichment_type: email and phone
    SyncEnrichmentResponse:
      type: object
      properties:
        contacts:
          type: array
          description: List of enriched contacts.
          items:
            $ref: '#/components/schemas/EnrichPayload'
      example:
        contacts:
          - firstName: John
            lastName: Doe
            fullName: John Doe
            linkedinUrl: https://www.linkedin.com/in/john-doe/
            jobTitle: CEO
            companyName: Acme
            companyDomain: acme.com
            email: john@acme.com
            emailStatus: valid
            phone: '+14155552671'
            phoneType: mobile
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    AuthError:
      required:
        - message
        - error
        - statusCode
      type: object
      properties:
        message:
          type: string
          example: Invalid API Key
        error:
          type: string
          example: Unauthorized
        statusCode:
          type: integer
          example: 401
    EnrichmentCustomOptions:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: >-
            Unique ID of the record from the CRM, database, or other source
            system.
        provider:
          type: string
          description: Downstream data provider to use (e.g., Lonescale).
        enrichment_type:
          type: string
          description: Provider-specific enrichment mode.
          example: phone
    Contact:
      type: object
      additionalProperties: false
      required:
        - firstname
        - lastname
      properties:
        firstname:
          type: string
        lastname:
          type: string
        email:
          type: string
          format: email
        job_title:
          type: string
        linkedin_url:
          type: string
          format: uri
        domain:
          type: string
          description: Company domain (e.g., acme.com).
        company_name:
          type: string
        custom:
          $ref: '#/components/schemas/ContactCustom'
    EnrichPayload:
      type: object
      properties:
        firstName:
          type: string
          description: The enriched first name.
        lastName:
          type: string
          description: The enriched last name.
        fullName:
          type: string
          description: The enriched full name.
        linkedinUrl:
          type: string
          description: The enriched LinkedIn URL.
        universalName:
          type: string
          description: The enriched universal name.
        companyDomain:
          type: string
          description: The enriched company domain.
        jobTitle:
          type: string
          description: The enriched job title.
        companyDescription:
          type: string
          description: The enriched company description.
        companyEmployeeCount:
          type: integer
          description: The enriched company employee count.
        companyIndustry:
          type: string
          description: The enriched company industry.
        companyLinkedinId:
          type: string
          description: The enriched company LinkedIn ID.
        companyLinkedinUrl:
          type: string
          description: The enriched company LinkedIn URL.
        companyName:
          type: string
          description: The enriched company name.
        companyEmployeeRange:
          type: string
          description: The enriched company employee range.
        companyCountryCode:
          type: string
          description: The enriched company country code.
        companyCountry:
          type: string
          description: The enriched company country.
        companyCity:
          type: string
          description: The enriched company city.
        jobTitleSince:
          type: object
          properties:
            month:
              type: integer
            year:
              type: integer
        companySince:
          type: object
          properties:
            month:
              type: integer
            year:
              type: integer
        email:
          type: string
          description: >-
            The enriched email address. When no email is found via the provider
            waterfall, this falls back to a pattern-based predicted email
            (free).
        emailStatus:
          type: string
          description: >-
            The enriched email status: `valid`, `catch_all`, `invalid`,
            `unknown`, or `predicted`. `predicted` means the email was derived
            from the company's email pattern as a free fallback and was not
            verified.
        predicted_email:
          type: string
          description: >-
            Pattern-based predicted email, set when the provider waterfall
            returned no email. Free — does not consume credits.
        email_pattern:
          type: string
          description: >-
            Detected company email format used to build the predicted email,
            e.g. `firstname.lastname@domain`.
        predicted_email_score:
          type: string
          description: >-
            Confidence of the detected email pattern (percentage when detected,
            `0` for the deterministic fallback).
        phone:
          type: string
          description: The enriched phone number.
        phoneType:
          type: string
          description: The enriched phone type.
        phoneCountryCode:
          type: string
          description: The enriched phone country code.
        emails:
          type: array
          description: List of enriched email addresses.
          items:
            type: object
            properties:
              email:
                type: string
              status:
                type: string
                description: >-
                  Email status: `valid`, `catch_all`, `invalid`, `unknown`, or
                  `predicted` (free pattern-based fallback).
        phones:
          type: array
          description: List of enriched phone numbers.
          items:
            type: object
            properties:
              number:
                type: string
              region:
                type: string
        jobChangeDetected:
          type: boolean
          description: >-
            Indicates whether the contact has changed company since the input
            data was provided.


            - `true` — the enriched company (domain or name) differs from the
            one in the input contact

            - `false` — the company is the same, or there is not enough data to
            determine a change


            Only present in the webhook payload when `detect_job_change: true`
            was set in the request. Detection first compares company domains
            using fuzzy matching, falling back to company name if domains are
            unavailable.
    ContactCustom:
      type: object
      additionalProperties: true
      properties:
        contact_id:
          type: string
          description: Optional CRM record id specific to this contact.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Provide your API key in the x-api-key header.

````