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

# Get a provider record journey

> Resolve a typed CRM record by providerExternalId and return its paginated cross-channel journey with first-touch and last-touch attribution. For a cloned Close lead, use `typeSlug=person` and `providerExternalId=close:lead:<lead_id>`. Authenticate with `Authorization: ApiKey <key>` using a project service-account key scoped to `crm_objects:read`.



## OpenAPI

````yaml https://api.sapt.ai/openapi.json get /projects/{projectId}/object-records:journey
openapi: 3.1.0
info:
  title: Sapt Platform API
  version: 1.0.0
  description: >-
    API for Sapt platform - project management, authentication, and email
    services
servers:
  - url: https://api.sapt.ai
    description: Production
  - url: http://localhost:8787
    description: Local development
security: []
tags:
  - name: Accounts
    description: >-
      The social accounts connected to a project. Start here — the `id` of an
      account is the `socialAccountId` that every posting, scheduling and
      analytics call takes.
  - name: Actions
  - name: Ads
  - name: Agents
  - name: Analytics
    description: >-
      Account- and post-level organic performance for connected Instagram and
      Facebook accounts.
  - name: Assets
  - name: Auth
  - name: CMS
  - name: CRM
  - name: Calendar
  - name: Comments
    description: >-
      Read, reply to, hide and delete comments on published Instagram and
      Facebook posts.
  - name: Content Calendar
    description: >-
      Create, schedule, update and publish organic posts, and stage the media
      they carry. Publishing a post whose status is `failed` retries it.
  - name: Contracts
  - name: Conversions
    description: >-
      Meta server-side Conversions API (CAPI): discover pixels, connect a pixel
      + CAPI token, and send deduped server-side conversions.
  - name: Dashboard Sidebar
  - name: Emails
  - name: Engagement
    description: >-
      Act as the Page or account on published posts: comment, like, unlike, and
      delete a published post.
  - name: Geo
  - name: Google Ads
  - name: Google Analytics
  - name: Google Business
  - name: Integrations
    description: >-
      Connect third-party providers (Meta, Gmail, Google Business Profile, …).
      List providers, mint OAuth connect links, and poll connection status.
  - name: Invitations
  - name: Memory
  - name: OAuth Clients
  - name: Project Roles
  - name: Project Templates
  - name: Projects
  - name: Schedules
  - name: Service Accounts
  - name: Socials
    description: >-
      Organic social: the connected accounts, the content calendar, media
      staging, publishing, comments and engagement across Instagram, Facebook,
      TikTok, YouTube and Google Business Profile.
  - name: Team
  - name: Users
  - name: Web Analytics
  - name: Workflows
paths:
  /projects/{projectId}/object-records:journey:
    get:
      tags:
        - CRM
      summary: Get a provider record journey
      description: >-
        Resolve a typed CRM record by providerExternalId and return its
        paginated cross-channel journey with first-touch and last-touch
        attribution. For a cloned Close lead, use `typeSlug=person` and
        `providerExternalId=close:lead:<lead_id>`. Authenticate with
        `Authorization: ApiKey <key>` using a project service-account key scoped
        to `crm_objects:read`.
      operationId: getObjectRecordJourneyByProviderExternalId
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 100
          required: true
          name: typeSlug
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 500
          required: true
          name: providerExternalId
          in: query
        - schema:
            type: string
            maxLength: 500
          required: false
          name: cursor
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          required: false
          name: limit
          in: query
        - schema:
            type: string
            description: >-
              Comma-separated journey kinds: web, communication, engagement,
              commerce, lifecycle, advertising, system.
          required: false
          description: >-
            Comma-separated journey kinds: web, communication, engagement,
            commerce, lifecycle, advertising, system.
          name: kinds
          in: query
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  record:
                    type: object
                    properties:
                      id:
                        type: string
                      typeSlug:
                        type: string
                      displayName:
                        type:
                          - string
                          - 'null'
                      externalId:
                        type:
                          - string
                          - 'null'
                      data:
                        type: object
                        additionalProperties: {}
                      personRefId:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Person spine record id attached during create/update
                          when this type links to Person and the payload carries
                          matching identity. Use this as the durable join key
                          for all data about one human.
                      companyRefId:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Reserved promoted company attribution id. Company
                          spine support is not the primary public contract;
                          model company relationships through CRM relations
                          unless documented otherwise.
                      amountCents:
                        type:
                          - string
                          - 'null'
                        pattern: ^-?\d+$
                        description: >-
                          Money in minor units, decimal-string-encoded to
                          preserve precision beyond Number.MAX_SAFE_INTEGER.
                      currency:
                        type:
                          - string
                          - 'null'
                      status:
                        type:
                          - string
                          - 'null'
                      occurredAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                      providerExternalId:
                        type:
                          - string
                          - 'null'
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      createdBy:
                        type:
                          - string
                          - 'null'
                      updatedBy:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - typeSlug
                      - displayName
                      - externalId
                      - data
                      - personRefId
                      - companyRefId
                      - amountCents
                      - currency
                      - status
                      - occurredAt
                      - providerExternalId
                      - createdAt
                      - updatedAt
                      - createdBy
                      - updatedBy
                  journey:
                    type: object
                    properties:
                      header:
                        type: object
                        properties:
                          firstTouch:
                            type:
                              - object
                              - 'null'
                            properties:
                              utm_source:
                                type: string
                              utm_medium:
                                type: string
                              utm_campaign:
                                type: string
                              utm_term:
                                type: string
                              utm_content:
                                type: string
                              gclid:
                                type: string
                              fbclid:
                                type: string
                              msclkid:
                                type: string
                              ttclid:
                                type: string
                              wbraid:
                                type: string
                              gbraid:
                                type: string
                              li_fat_id:
                                type: string
                              twclid:
                                type: string
                              epik:
                                type: string
                              dclid:
                                type: string
                              sapt_cid:
                                type: string
                              referrer:
                                type: string
                              landingPath:
                                type: string
                              userAgent:
                                type: string
                              ip:
                                type: string
                              fbc:
                                type: string
                              fbp:
                                type: string
                          lastTouch:
                            type:
                              - object
                              - 'null'
                            properties:
                              utm_source:
                                type: string
                              utm_medium:
                                type: string
                              utm_campaign:
                                type: string
                              utm_term:
                                type: string
                              utm_content:
                                type: string
                              gclid:
                                type: string
                              fbclid:
                                type: string
                              msclkid:
                                type: string
                              ttclid:
                                type: string
                              wbraid:
                                type: string
                              gbraid:
                                type: string
                              li_fat_id:
                                type: string
                              twclid:
                                type: string
                              epik:
                                type: string
                              dclid:
                                type: string
                              sapt_cid:
                                type: string
                              referrer:
                                type: string
                              landingPath:
                                type: string
                              userAgent:
                                type: string
                              ip:
                                type: string
                              fbc:
                                type: string
                              fbp:
                                type: string
                          firstSeenAt:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          lastSeenAt:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          webSessions:
                            type: integer
                          pageviews:
                            type: integer
                          revenueCents:
                            type: integer
                          orderCount:
                            type: integer
                          totalTouches:
                            type: integer
                          deviceCount:
                            type: integer
                          identities:
                            type: object
                            properties:
                              email:
                                type: string
                              phone:
                                type: string
                              socials:
                                type: array
                                items:
                                  type: string
                        required:
                          - firstTouch
                          - lastTouch
                          - firstSeenAt
                          - lastSeenAt
                          - webSessions
                          - pageviews
                          - revenueCents
                          - orderCount
                          - totalTouches
                          - deviceCount
                          - identities
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            source:
                              type: string
                              enum:
                                - ledger
                                - analytics
                                - scheduled
                                - calendar
                            kind:
                              type: string
                              enum:
                                - web
                                - communication
                                - engagement
                                - commerce
                                - lifecycle
                                - advertising
                                - system
                            type:
                              type: string
                            occurredAt:
                              type: string
                              format: date-time
                            scheduledFor:
                              type: string
                              format: date-time
                            status:
                              type: string
                              enum:
                                - sent
                                - delivered
                                - opened
                                - clicked
                                - failed
                                - scheduled
                                - waiting
                            title:
                              type: string
                            channel:
                              type: string
                            direction:
                              type: string
                              enum:
                                - inbound
                                - outbound
                            recordId:
                              type: string
                            workflowId:
                              type: string
                            provenance:
                              type: object
                              properties:
                                workflowId:
                                  type: string
                                runId:
                                  type: string
                                stepIndex:
                                  type: integer
                                totalSteps:
                                  type: integer
                                campaignId:
                                  type: string
                            cancel:
                              type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - workflow_run_v2
                                    - scheduled_email_send
                                    - scheduled_post
                                    - scheduled_execution
                                id:
                                  type: string
                              required:
                                - kind
                                - id
                            detail:
                              type: object
                              additionalProperties: {}
                          required:
                            - id
                            - source
                            - kind
                            - type
                            - occurredAt
                            - title
                            - detail
                      nextCursor:
                        type:
                          - string
                          - 'null'
                    required:
                      - items
                      - nextCursor
                required:
                  - record
                  - journey
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  code:
                    type: string
                    description: Error code for programmatic handling
                required:
                  - message
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT token obtained from /api/auth/token endpoint. Token is verified
        using JWKS and must include a valid user identifier.

````