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

# Get a client Source's health as its agent operator

> Returns the source health object for one client Source your sales agent powers, through a live binding the client still authorizes; activation is not required. The object is operator-scoped: it offers no actions, replaces client- and Apostra-owned failure text with a generic sentence, does not name what the client has to decide for an operation waiting on them, and returns writes as `null`. Attempt bodies are withheld unless the client's debug grant for this Source is active, which `debugGrant` reports. Requires an organization administrator with Partner operating access.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml get /provider/account/connections/{bindingUid}/source-health
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: >-
    REST API for partners to manage Seller Accounts, inventory sources, and
    billing.


    ## Authentication


    All endpoints require a Bearer token in the Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```


    ## Base URL


    `https://api.apostra.com/api/v2/storefront`


    ## For AI Agents


    AI agents can use the MCP endpoint at `/mcp/v2/storefront` with three tools:

    - `initialize`: Start an MCP session

    - `api_call`: Make REST API calls

    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.apostra.com/api/v2/storefront
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Asks
    description: >-
      What you are waiting on Scope3 for — support, product, and supply asks in
      one list
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Payout bank details and billing configuration for Seller Accounts
  - name: AI Usage
    description: Seller Account AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /provider/account/connections/{bindingUid}/source-health:
    servers:
      - url: /api/v2
        description: Shared customer API base URL
    get:
      tags:
        - Storefront
      summary: Get a client Source's health as its agent operator
      description: >-
        Returns the source health object for one client Source your sales agent
        powers, through a live binding the client still authorizes; activation
        is not required. The object is operator-scoped: it offers no actions,
        replaces client- and Apostra-owned failure text with a generic sentence,
        does not name what the client has to decide for an operation waiting on
        them, and returns writes as `null`. Attempt bodies are withheld unless
        the client's debug grant for this Source is active, which `debugGrant`
        reports. Requires an organization administrator with Partner operating
        access.
      operationId: getPartnerSourceHealth
      parameters:
        - in: query
          name: windowHours
          schema:
            description: >-
              Number of trailing hours to analyze for the current diagnostics
              window. The previous comparison window uses the same duration
              immediately before it.
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 720
          description: >-
            Number of trailing hours to analyze for the current diagnostics
            window. The previous comparison window uses the same duration
            immediately before it.
        - in: path
          name: bindingUid
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          required: true
      responses:
        '200':
          description: Get a client Source's health as its agent operator
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerSourceHealth'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Organization administrator, Partner operating access, and a live
            client-authorized binding owned by your organization required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    PartnerSourceHealth:
      type: object
      properties:
        sourceHealth:
          $ref: '#/components/schemas/SourceHealth'
        debugGrant:
          nullable: true
          description: >-
            The seller's active debug grant for this source. While it is active,
            attempt bodies are visible; `null` when no grant is active.
          type: object
          properties:
            grantUid:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            expiresAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          required:
            - grantUid
            - expiresAt
          additionalProperties: false
      required:
        - sourceHealth
        - debugGrant
      additionalProperties: false
      description: >-
        One client source health object as the agent operator that powers the
        source may read it. No action is offered, seller- and Apostra-owned
        failure text is generic, an operation waiting on the seller does not
        name what the seller decides, writes are `null`, and attempt bodies are
        withheld unless the seller has granted debug access to this source.
    ErrorResponse:
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
      description: Standard error response
    SourceHealth:
      type: object
      properties:
        identity:
          type: object
          properties:
            sellerAccount:
              type: object
              properties:
                id:
                  type: string
                name:
                  nullable: true
                  type: string
              required:
                - id
                - name
              additionalProperties: false
            source:
              type: object
              properties:
                id:
                  type: string
                sourceId:
                  type: string
                name:
                  type: string
                executionType:
                  type: string
              required:
                - id
                - sourceId
                - name
                - executionType
              additionalProperties: false
            agent:
              nullable: true
              type: object
              properties:
                id:
                  type: string
                name:
                  nullable: true
                  type: string
                observedRevision:
                  nullable: true
                  type: string
              required:
                - id
                - name
                - observedRevision
              additionalProperties: false
            routing:
              nullable: true
              type: object
              properties:
                eligible:
                  type: boolean
                setupComplete:
                  type: boolean
                willReceiveRequest:
                  type: boolean
                reasonCodes:
                  type: array
                  items:
                    type: string
              required:
                - eligible
                - setupComplete
                - willReceiveRequest
                - reasonCodes
              additionalProperties: false
          required:
            - sellerAccount
            - source
            - agent
            - routing
          additionalProperties: false
        health:
          type: array
          items:
            type: object
            properties:
              operation:
                type: string
                enum:
                  - get_products
                  - sync_accounts
                  - sync_creatives
                  - create_media_buy
                  - update_media_buy
                  - get_media_buy_delivery
              status:
                nullable: true
                description: >-
                  Current verdict for this operation: `healthy`, `degraded` or
                  `erroring`; `null` when nothing has observed it.
                type: string
                enum:
                  - healthy
                  - degraded
                  - erroring
              condition:
                nullable: true
                type: string
                enum:
                  - timeout
                  - error_response
                  - transport_error
                  - invalid_response
                  - other
              lastOkAt:
                nullable: true
                type: string
              lastFailureAt:
                nullable: true
                type: string
              lastFailure:
                nullable: true
                type: string
              owner:
                nullable: true
                type: string
                enum:
                  - seller
                  - operator
                  - scope3
                description: >-
                  Who has to act: `seller`, `operator` (the party that runs the
                  agent behind the source) or `scope3` (the platform).
              window:
                nullable: true
                type: object
                properties:
                  calls:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  succeeded:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  failed:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  timedOut:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - calls
                  - succeeded
                  - failed
                  - timedOut
                additionalProperties: false
            required:
              - operation
              - status
              - condition
              - lastOkAt
              - lastFailureAt
              - lastFailure
              - owner
              - window
            additionalProperties: false
          description: >-
            One row per AdCP operation, always in this order: `get_products`,
            `sync_accounts`, `sync_creatives`, `create_media_buy`,
            `update_media_buy`, `get_media_buy_delivery`.
        writes:
          nullable: true
          description: >-
            One entry per write task with traffic in the window. Empty when no
            writes went to the source; `null` when the read failed.
          type: array
          items:
            type: object
            properties:
              taskKind:
                type: string
                enum:
                  - media_buy
                  - sync_creatives
                  - sync_accounts
              attempts:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              succeeded:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              failed:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              open:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              neverAnswered:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              oldestOpenAt:
                nullable: true
                type: string
              topFailure:
                nullable: true
                type: object
                properties:
                  errorCode:
                    type: string
                  recovery:
                    nullable: true
                    type: string
                    enum:
                      - transient
                      - correctable
                      - structural
                  count:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - errorCode
                  - recovery
                  - count
                additionalProperties: false
            required:
              - taskKind
              - attempts
              - succeeded
              - failed
              - open
              - neverAnswered
              - oldestOpenAt
              - topFailure
            additionalProperties: false
        diagnosis:
          type: object
          properties:
            severity:
              nullable: true
              type: string
              enum:
                - blocking
                - attention
                - advisory
              description: >-
                Impact on the seller: `blocking` stops selling or setup,
                `attention` degrades it, `advisory` will only matter later.
            owner:
              nullable: true
              type: string
              enum:
                - seller
                - operator
                - scope3
              description: >-
                Who has to act: `seller`, `operator` (the party that runs the
                agent behind the source) or `scope3` (the platform).
            findings:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  code:
                    type: string
                  operation:
                    nullable: true
                    type: string
                    enum:
                      - get_products
                      - sync_accounts
                      - sync_creatives
                      - create_media_buy
                      - update_media_buy
                      - get_media_buy_delivery
                  owner:
                    type: string
                    enum:
                      - seller
                      - operator
                      - scope3
                    description: >-
                      Who has to act: `seller`, `operator` (the party that runs
                      the agent behind the source) or `scope3` (the platform).
                  severity:
                    type: string
                    enum:
                      - blocking
                      - attention
                      - advisory
                    description: >-
                      Impact on the seller: `blocking` stops selling or setup,
                      `attention` degrades it, `advisory` will only matter
                      later.
                  summary:
                    type: string
                  detail:
                    nullable: true
                    type: string
                  action:
                    anyOf:
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - recheck
                          label:
                            type: string
                          operation:
                            type: string
                            enum:
                              - refresh_esa
                              - recheck_esa_capability
                              - test_esa_connection
                              - run_inventory_source_discovery_test
                          pathParams:
                            type: object
                            additionalProperties:
                              type: string
                        required:
                          - kind
                          - label
                          - operation
                          - pathParams
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - reconnect
                          label:
                            type: string
                        required:
                          - kind
                          - label
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - open
                          label:
                            type: string
                        required:
                          - kind
                          - label
                        additionalProperties: false
                      - type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - none
                        required:
                          - kind
                        additionalProperties: false
                  docsAnchor:
                    nullable: true
                    type: string
                  observedAt:
                    type: string
                required:
                  - id
                  - code
                  - operation
                  - owner
                  - severity
                  - summary
                  - detail
                  - action
                  - docsAnchor
                  - observedAt
                additionalProperties: false
          required:
            - severity
            - owner
            - findings
          additionalProperties: false
        operations:
          nullable: true
          description: >-
            The operations at this source that are still open, newest wait
            first, each with who it waits on. Attempts are not listed yet, so
            `attempts` is empty. `null` when the open work could not be read.
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              operation:
                type: string
                enum:
                  - get_products
                  - sync_accounts
                  - sync_creatives
                  - create_media_buy
                  - update_media_buy
                  - get_media_buy_delivery
              subject:
                type: object
                properties:
                  kind:
                    type: string
                  id:
                    type: string
                  revision:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                required:
                  - kind
                  - id
                  - revision
                additionalProperties: false
              state:
                type: string
                enum:
                  - open
                  - succeeded
                  - failed
                  - never_answered
              settlement:
                nullable: true
                type: string
                enum:
                  - response
                  - poll
                  - webhook
                  - terminalised
              startedAt:
                type: string
              settledAt:
                nullable: true
                type: string
              waitingOn:
                nullable: true
                description: >-
                  Set while the operation is open: who it waits on, since when,
                  and for what. `null` once it has settled.
                type: object
                properties:
                  party:
                    type: string
                    enum:
                      - seller
                      - operator
                      - buyer
                      - scope3
                    description: >-
                      Who the operation is waiting on: `seller` (the seller must
                      approve, review or do manual work), `operator` (the party
                      that runs the Agent behind the source holds a task it has
                      not settled), `buyer` (the buyer must attach creatives),
                      or `scope3` (Apostra must make the next move, such as
                      retrying a forward or delivering a creative).
                  since:
                    type: string
                    description: >-
                      When the wait on this party began (ISO-8601). Age never
                      decides whether an operation is open.
                  target:
                    nullable: true
                    description: >-
                      The exact thing being waited for: an `approval`,
                      `creative_review`, `work_item`, `account_request`, the
                      source `task` id, or the `creative` to deliver. `null`
                      when there is no single thing to name, or when the caller
                      may not see it.
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - approval
                          - creative_review
                          - work_item
                          - account_request
                          - task
                          - creative
                      id:
                        type: string
                    required:
                      - kind
                      - id
                    additionalProperties: false
                required:
                  - party
                  - since
                  - target
                additionalProperties: false
              attempts:
                type: array
                items:
                  type: object
                  properties:
                    attemptNumber:
                      type: integer
                      minimum: 0
                      exclusiveMinimum: true
                      maximum: 9007199254740991
                    startedAt:
                      type: string
                    completedAt:
                      nullable: true
                      type: string
                    outcome:
                      type: string
                      enum:
                        - started
                        - succeeded
                        - failed
                    condition:
                      nullable: true
                      type: string
                      enum:
                        - timeout
                        - error_response
                        - transport_error
                        - invalid_response
                        - other
                    httpStatus:
                      nullable: true
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    latencyMs:
                      nullable: true
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    errorCode:
                      nullable: true
                      type: string
                    recovery:
                      nullable: true
                      type: string
                      enum:
                        - transient
                        - correctable
                        - structural
                    handoff:
                      type: object
                      properties:
                        taskId:
                          nullable: true
                          type: string
                        debugId:
                          nullable: true
                          type: string
                        idempotencyKey:
                          nullable: true
                          type: string
                        traceId:
                          nullable: true
                          type: string
                      required:
                        - taskId
                        - debugId
                        - idempotencyKey
                        - traceId
                      additionalProperties: false
                    bodies:
                      oneOf:
                        - type: object
                          properties:
                            state:
                              type: string
                              enum:
                                - visible
                            request:
                              nullable: true
                              type: string
                            response:
                              nullable: true
                              type: string
                          required:
                            - state
                            - request
                            - response
                          additionalProperties: false
                        - type: object
                          properties:
                            state:
                              type: string
                              enum:
                                - withheld
                            reason:
                              type: string
                              enum:
                                - no_debug_grant
                                - not_retained
                          required:
                            - state
                            - reason
                          additionalProperties: false
                      type: object
                  required:
                    - attemptNumber
                    - startedAt
                    - completedAt
                    - outcome
                    - condition
                    - httpStatus
                    - latencyMs
                    - errorCode
                    - recovery
                    - handoff
                    - bodies
                  additionalProperties: false
            required:
              - id
              - operation
              - subject
              - state
              - settlement
              - startedAt
              - settledAt
              - waitingOn
              - attempts
            additionalProperties: false
        liveEvidence:
          nullable: true
          type: object
          properties:
            useCases:
              type: array
              items:
                oneOf:
                  - type: object
                    properties:
                      useCaseId:
                        type: string
                      status:
                        type: string
                        enum:
                          - failing
                      lastPassedAt:
                        nullable: true
                        type: string
                      failingCheck:
                        type: object
                        properties:
                          check:
                            type: string
                          owner:
                            type: string
                            enum:
                              - seller
                              - operator
                              - scope3
                            description: >-
                              Who has to act: `seller`, `operator` (the party
                              that runs the agent behind the source) or `scope3`
                              (the platform).
                          action:
                            anyOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - recheck
                                  label:
                                    type: string
                                  operation:
                                    type: string
                                    enum:
                                      - refresh_esa
                                      - recheck_esa_capability
                                      - test_esa_connection
                                      - run_inventory_source_discovery_test
                                  pathParams:
                                    type: object
                                    additionalProperties:
                                      type: string
                                required:
                                  - kind
                                  - label
                                  - operation
                                  - pathParams
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - reconnect
                                  label:
                                    type: string
                                required:
                                  - kind
                                  - label
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - open
                                  label:
                                    type: string
                                required:
                                  - kind
                                  - label
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - none
                                required:
                                  - kind
                                additionalProperties: false
                        required:
                          - check
                          - owner
                          - action
                        additionalProperties: false
                    required:
                      - useCaseId
                      - status
                      - lastPassedAt
                      - failingCheck
                    additionalProperties: false
                  - type: object
                    properties:
                      useCaseId:
                        type: string
                      status:
                        type: string
                        enum:
                          - certified
                          - pending
                      lastPassedAt:
                        nullable: true
                        type: string
                      failingCheck:
                        type: string
                        nullable: true
                        enum:
                          - null
                    required:
                      - useCaseId
                      - status
                      - lastPassedAt
                      - failingCheck
                    additionalProperties: false
                type: object
            baseline:
              nullable: true
              type: object
              properties:
                passing:
                  type: boolean
                evaluatedAt:
                  type: string
                failingChecks:
                  type: array
                  items:
                    type: string
              required:
                - passing
                - evaluatedAt
                - failingChecks
              additionalProperties: false
            declaredRequirements:
              type: array
              items:
                type: string
          required:
            - useCases
            - baseline
            - declaredRequirements
          additionalProperties: false
        window:
          type: object
          properties:
            hours:
              type: integer
              minimum: 0
              exclusiveMinimum: true
              maximum: 9007199254740991
            startedAt:
              type: string
            endedAt:
              type: string
          required:
            - hours
            - startedAt
            - endedAt
          additionalProperties: false
        generatedAt:
          type: string
      required:
        - identity
        - health
        - writes
        - diagnosis
        - operations
        - liveEvidence
        - window
        - generatedAt
      additionalProperties: false
      description: >-
        One typed answer per inventory source: identity, health by operation,
        writes, diagnosis, operations and attempts, and live evidence.
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code
        message:
          type: string
          description: Human-readable error message
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Structured error object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````

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