> ## Documentation Index
> Fetch the complete documentation index at: https://sure-917046f5-docs-cloudflare-tunnel-self-hosting.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the latest sync

> Returns the most recently created sanitized sync status for the authenticated user's family. The `data` field is `null` when the family has no sync history.



## OpenAPI

````yaml /openapi.yaml get /api/v1/syncs/latest
openapi: 3.0.3
info:
  title: Sure API
  version: v1
  description: OpenAPI documentation for the Sure API.
servers:
  - url: https://app.sure.am
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /api/v1/syncs/latest:
    get:
      tags:
        - Sync
      summary: Get the latest sync
      description: >-
        Returns the most recently created sanitized sync status for the
        authenticated user's family. The `data` field is `null` when the family
        has no sync history.
      responses:
        '200':
          description: latest sync shown
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncResponse'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    SyncResponse:
      type: object
      required:
        - data
      properties:
        data:
          nullable: true
          description: >-
            The sync resource, or `null` when no sync exists (for example, the
            latest sync endpoint when the family has never synced).
          allOf:
            - $ref: '#/components/schemas/SyncResource'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
          nullable: true
        details:
          oneOf:
            - type: array
              items:
                type: string
            - type: object
          nullable: true
    SyncResource:
      type: object
      description: Sanitized status metadata for a single sync run.
      required:
        - id
        - status
        - in_progress
        - terminal
        - syncable
        - children_count
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          description: Current lifecycle status of the sync.
          enum:
            - pending
            - syncing
            - completed
            - failed
            - stale
        in_progress:
          type: boolean
          description: True when the sync is queued or actively running.
        terminal:
          type: boolean
          description: >-
            True when the sync has reached a terminal state (`completed`,
            `failed`, or `stale`).
        syncable:
          $ref: '#/components/schemas/SyncableSummary'
        parent_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            Identifier of the parent sync, when this sync was triggered as part
            of a larger run.
        children_count:
          type: integer
          minimum: 0
          description: Number of child syncs spawned by this sync.
        window_start_date:
          type: string
          format: date
          nullable: true
          description: Start of the date window the sync covers, when applicable.
        window_end_date:
          type: string
          format: date
          nullable: true
          description: End of the date window the sync covers, when applicable.
        pending_at:
          type: string
          format: date-time
          nullable: true
          description: When the sync entered the `pending` state.
        syncing_at:
          type: string
          format: date-time
          nullable: true
          description: When the sync started running.
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: When the sync finished successfully.
        failed_at:
          type: string
          format: date-time
          nullable: true
          description: When the sync transitioned to the `failed` state.
        error:
          nullable: true
          description: Sanitized error details, present only when the sync has failed.
          allOf:
            - $ref: '#/components/schemas/SyncErrorSummary'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    SyncableSummary:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: >-
            The type of resource the sync targets (for example `Family`,
            `Account`, or `PlaidItem`).
        id:
          type: string
          format: uuid
        name:
          type: string
          nullable: true
          description: Display name of the syncable resource, when available.
    SyncErrorSummary:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: Sanitized human-readable error message for a failed sync.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: API key for authentication. Generate one from your account settings.

````