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

# List records that could not be written to the CRM

> The app's Sync issues tab: the records of one entity type that Statisfy could not write back to the CRM, newest failure first, one per record, with the CRM's errors for each CRM it failed in. `total` counts every page. A successful write clears only that CRM's issue: a record leaves the list (and `total`) once no CRM it failed in still fails. Paging continues after the last record returned, so a record that recovers between pages does not make the next page skip one. An entity type that does not sync to a CRM lists none. Read only: a retry is done in the app.



## OpenAPI

````yaml /api/statisfy-api.openapi.json get /v1/integrations/sync-issues
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/integrations/sync-issues:
    get:
      tags:
        - integrations
      summary: List records that could not be written to the CRM
      description: >-
        The app's Sync issues tab: the records of one entity type that Statisfy
        could not write back to the CRM, newest failure first, one per record,
        with the CRM's errors for each CRM it failed in. `total` counts every
        page. A successful write clears only that CRM's issue: a record leaves
        the list (and `total`) once no CRM it failed in still fails. Paging
        continues after the last record returned, so a record that recovers
        between pages does not make the next page skip one. An entity type that
        does not sync to a CRM lists none. Read only: a retry is done in the
        app.
      operationId: integrations_list_sync_issues
      parameters:
        - description: >-
            The records to list: account, opportunity, contact (people),
            project_task or activity
          in: query
          name: entity_type
          required: true
          schema:
            enum:
              - account
              - opportunity
              - contact
              - project_task
              - activity
            type: string
        - in: query
          name: limit
          required: false
          schema:
            default: 25
            maximum: 200
            minimum: 1
            type: integer
        - description: '`next_cursor` from the previous page'
          in: query
          name: cursor
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncIssuePage'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    SyncIssuePage:
      properties:
        data:
          items:
            $ref: '#/components/schemas/SyncIssue'
          title: Data
          type: array
        has_more:
          default: false
          title: Has More
          type: boolean
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        total:
          description: >-
            How many records of this type cannot be written to the CRM, on every
            page
          title: Total
          type: integer
      required:
        - data
        - total
      title: SyncIssuePage
      type: object
    SyncIssue:
      properties:
        crm:
          description: >-
            The CRM of its worst problem (FAILED before ERRORED, then the
            newest)
          title: Crm
          type: string
        destinations:
          description: >-
            One entry per CRM it could not be written to, worst first (an
            account writes to every push CRM)
          items:
            $ref: '#/components/schemas/SyncIssueDestination'
          title: Destinations
          type: array
        entity_type:
          enum:
            - account
            - opportunity
            - contact
            - project_task
            - activity
          title: Entity Type
          type: string
        error:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Its worst problem's first error message (or code), else the CRM's
            masked answer; null when neither
          title: Error
        last_attempt_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the worst problem's last write failed
          title: Last Attempt At
        record_id:
          description: >-
            The record's id: an account's, opportunity's or task's id; for
            contact, the person's id
          title: Record Id
          type: string
        state:
          anyOf:
            - enum:
                - ERRORED
                - FAILED
              type: string
            - type: string
          description: The state of its worst problem
          title: State
      required:
        - entity_type
        - record_id
        - crm
        - state
        - error
        - last_attempt_at
        - destinations
      title: SyncIssue
      type: object
    SyncIssueDestination:
      properties:
        attempts:
          description: Failed writes in a row (shown at most max_attempts)
          title: Attempts
          type: integer
        crm:
          description: 'The CRM the write went to: SALESFORCE, HUBSPOT, GAINSIGHT, ...'
          title: Crm
          type: string
        crm_response:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            When no error could be parsed from the CRM's answer, the answer
            itself: masked as a run's `message` is, and cut at 200 characters.
            Null when `errors` names them
          title: Crm Response
        errors:
          description: The errors the CRM named, as parsed from its answer
          items:
            $ref: '#/components/schemas/SyncIssueError'
          title: Errors
          type: array
        last_attempt_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: When the last write failed
          title: Last Attempt At
        max_attempts:
          title: Max Attempts
          type: integer
        rejected_fields:
          description: The fields the CRM refused
          items:
            type: string
          title: Rejected Fields
          type: array
        state:
          anyOf:
            - enum:
                - ERRORED
                - FAILED
              type: string
            - type: string
          description: >-
            ERRORED: the next sync tries again; FAILED: it failed max_attempts
            times in a row and is not tried again until the record changes or
            someone retries it in the app
          title: State
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          description: The CRM's HTTP status
          title: Status Code
      required:
        - crm
        - state
        - attempts
        - max_attempts
        - last_attempt_at
        - status_code
        - errors
        - rejected_fields
        - crm_response
      title: SyncIssueDestination
      type: object
    SyncIssueError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The CRM's error code, e.g. INVALID_FIELD or REQUIRED_FIELD_MISSING;
            masked as `message` is when it is not a code's shape
          title: Code
        fields:
          description: The CRM fields it names
          items:
            type: string
          title: Fields
          type: array
        message:
          anyOf:
            - type: string
            - type: 'null'
          description: The CRM's message, masked as a run's `message` is
          title: Message
      required:
        - code
        - fields
        - message
      title: SyncIssueError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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