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

# Read synced action data from the datasync index

> Returns previously synced data for the specified action from the OpenSearch index. The 200 response is one of two shapes: `ActionsSyncedResponse` when a sync served the read (its `data`, or `aggregations` instead of `data` when the request set `aggs`), or `ActionsSyncedRefusal` (`synced: false`) when nothing has been synced for this action yet, or the account has more than one sync of it and `sync_id` was not given to choose one — `syncs` then lists the available choices. A `sync_id` that names a sync which no longer exists is a caller error and is rejected with 400, not returned as a 200 shape.



## OpenAPI

````yaml post /actions/rpc/synced
openapi: 3.1.0
info:
  title: StackOne
  description: The documentation for the StackOne API
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.stackone.com
security: []
tags:
  - name: Accounts
    description: View and manage linked accounts.
  - name: Actions
    description: Retrieve Actions metadata and definitions.
  - name: AI
    description: AI-powered features.
  - name: Auth Configs
    description: View and manage connector auth configurations for the project.
  - name: Connect Sessions
    description: >-
      Generate connection session tokens or auth URLs to allow your customers to
      connect their accounts.
  - name: Connector Profiles
    description: View and manage connector profiles for the project.
  - name: Connectors
    description: Retrieve metadata for connectors.
  - name: Logs
    description: API request logs and analytics.
  - name: MCP
    description: Model Context Protocol endpoint.
  - name: Proxy
    description: Routing API requests through StackOne directly to the underlying provider.
  - name: Request Logs
    description: API requests and response logs.
  - name: Webhooks
    description: Configure and manage webhooks.
paths:
  /actions/rpc/synced:
    post:
      tags:
        - Actions
      summary: Read synced action data from the datasync index
      description: >-
        Returns previously synced data for the specified action from the
        OpenSearch index. The 200 response is one of two shapes:
        `ActionsSyncedResponse` when a sync served the read (its `data`, or
        `aggregations` instead of `data` when the request set `aggs`), or
        `ActionsSyncedRefusal` (`synced: false`) when nothing has been synced
        for this action yet, or the account has more than one sync of it and
        `sync_id` was not given to choose one — `syncs` then lists the available
        choices. A `sync_id` that names a sync which no longer exists is a
        caller error and is rejected with 400, not returned as a 200 shape.
      operationId: stackone_rpc_action_synced
      parameters:
        - name: page_size
          required: false
          in: query
          description: The number of results to return per page
          schema:
            nullable: true
            example: 25
            type: number
        - name: skip
          required: false
          in: query
          description: The number of results to skip before returning results
          schema:
            nullable: true
            example: 0
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionsRpcSyncedRequestDto'
      responses:
        '200':
          description: >-
            Synced action data, or a refusal payload explaining why none was
            returned.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ActionsSyncedResponse'
                  - $ref: '#/components/schemas/ActionsSyncedRefusal'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized access.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '408':
          description: The request has timed out.
          headers:
            Retry-After:
              description: A time in seconds after which the request can be retried.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestTimedOutResponse'
        '409':
          description: Conflict with current state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictResponse'
        '422':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntityResponse'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Server error while executing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
        '501':
          description: This functionality is not implemented.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotImplementedResponse'
        '502':
          description: Bad gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadGatewayResponse'
      security:
        - basic: []
components:
  schemas:
    ActionsRpcSyncedRequestDto:
      type: object
      properties:
        action:
          type: string
          description: The action to execute
          example: create_employee
        path:
          type: object
          description: >-
            Accepted for backwards compatibility but ignored on this endpoint:
            synced reads no longer select the run by path parameters. Use
            `sync_id` to choose which sync to read.
          example:
            id: '123'
          nullable: true
          additionalProperties: true
          deprecated: true
        query:
          type: object
          description: >-
            Accepted for backwards compatibility but ignored on this endpoint:
            synced reads no longer select the run by query parameters. Use
            `sync_id` to choose which sync to read.
          example:
            account_id: abc
          nullable: true
          additionalProperties: true
          deprecated: true
        body:
          type: object
          description: >-
            Accepted for backwards compatibility but ignored on this endpoint:
            synced reads no longer select the run by request body. Use `sync_id`
            to choose which sync to read.
          example:
            search: John
          nullable: true
          additionalProperties: true
          deprecated: true
        headers:
          type: object
          description: >-
            Accepted for backwards compatibility but ignored on this endpoint:
            synced reads no longer select the run by headers. Use `sync_id` to
            choose which sync to read.
          example:
            x-custom-header: value
          nullable: true
          additionalProperties: true
          deprecated: true
        filter:
          type: object
          description: >-
            OpenSearch-style filter (Query DSL) (term / terms / range / wildcard
            / match / match_phrase / exists / bool) over synced fields. match /
            match_phrase do word-level search (string fields only,
            case-insensitive); wildcard matches patterns (case-sensitive). Use
            field names exactly as returned in the action's "queryable_fields".
          example:
            match:
              description: onboarding
          nullable: true
          additionalProperties: true
        search:
          type: string
          description: >-
            Free-text search over the record's text fields, ranked by relevance.
            Supports "quoted phrases", +required / -excluded terms, and prefix*
            — lenient (never errors). Combine with `filter` to narrow; results
            are relevance-ranked unless an explicit sort is given.
          example: onboarding safety
          nullable: true
        sync_id:
          type: string
          description: >-
            Which sync to read, when the account has more than one sync of this
            action. Omit when there is only one; a named sync is never
            substituted if it is gone.
          example: sch_01J8Z3Q4
          nullable: true
        source:
          type: array
          description: >-
            Field names to return (projection) — omit to return all fields.
            Shrinks the response.
          items:
            type: string
          example:
            - first_name
            - email
          nullable: true
        sort:
          type: array
          description: >-
            OpenSearch-style sort. Each entry is either a field name (ascending)
            or an object keyed by field name: `{"last_name": "desc"}`, or the
            nested form `{"last_name": {"order": "desc"}}`. Earlier entries take
            priority.
          example:
            - last_name: desc
          nullable: true
        aggs:
          type: object
          description: >-
            OpenSearch aggregations object. When set, aggregation results are
            returned instead of records, and `source`, `sort`, `page_size` and
            `skip` are ignored (`filter` still applies).
          example:
            by_status:
              terms:
                field: employment_status
          nullable: true
          additionalProperties: true
      required:
        - action
    ActionsSyncedResponse:
      type: object
      properties:
        data:
          type: array
          description: The synced records for the requested action
          items:
            type: object
            additionalProperties: true
          nullable: true
        datasync:
          description: Metadata about the datasync operation
          allOf:
            - $ref: '#/components/schemas/ActionsSyncedDatasync'
        aggregations:
          type: object
          description: >-
            Present instead of `data` when the request set `aggs`: the
            OpenSearch aggregation results, keyed the same as the requested
            `aggs`.
          additionalProperties: true
          nullable: true
      required:
        - datasync
    ActionsSyncedRefusal:
      type: object
      properties:
        synced:
          type: boolean
          description: 'Always false: no synced data was returned.'
        action_id:
          type: string
          description: The action this refusal is about.
        message:
          type: string
          description: Human-readable explanation of why no data was returned.
        syncs:
          description: >-
            Present when the account has more than one sync of this action: the
            sync_id choices — pass one as `sync_id` to disambiguate.
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/ActionsSyncedSyncChoice'
      required:
        - synced
        - action_id
        - message
    BadRequestResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
        message:
          type: string
          description: Error message
          example: Bad Request
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
        data:
          description: Error details
          nullable: true
          allOf:
            - $ref: '#/components/schemas/UnifiedError'
        provider_errors:
          description: List of provider-specific errors
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/ProviderError'
      required:
        - statusCode
        - message
        - timestamp
    UnauthorizedResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 401
        message:
          type: string
          description: Error message
          example: Unauthorized
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    ForbiddenResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 403
        message:
          type: string
          description: Error message
          example: Forbidden resource
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    NotFoundResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 404
        message:
          type: string
          description: Error message
          example: Not Found
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    RequestTimedOutResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 408
        message:
          type: string
          description: Error message
          example: Request timed out
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    ConflictResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 409
        message:
          type: string
          description: Error message
          example: Conflict
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    UnprocessableEntityResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 422
        message:
          type: string
          description: Error message
          example: Unprocessable Entity
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    TooManyRequestsResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 429
        message:
          type: string
          description: Error message
          example: Too many requests
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    InternalServerErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 500
        message:
          type: string
          description: Error message
          example: Internal server error
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    NotImplementedResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 501
        message:
          type: string
          description: Error message
          example: Not Implemented
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    BadGatewayResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 502
        message:
          type: string
          description: Error message
          example: Bad Gateway
        timestamp:
          type: string
          description: Timestamp when the error occurred
          example: '2023-05-30T00:00:00.000Z'
          format: date-time
      required:
        - statusCode
        - message
        - timestamp
    ActionsSyncedDatasync:
      type: object
      properties:
        last_full_run_id:
          type: string
          description: >-
            Run ID of the last successful full sync — the generation that
            produced the currently-readable data. Informational.
        last_run_id:
          type: string
          description: >-
            Run ID of the most recent run that produced or refreshed data for
            this scope. Informational.
        request_id:
          type: string
          description: The unique request ID for this sync read
        synced_at:
          type: string
          description: ISO 8601 timestamp of when the data was synced
        sync_expires_at:
          type: string
          description: ISO 8601 timestamp of when the synced data expires
        params_hash:
          type: string
          description: >-
            Hash of the canonicalized sync parameters (pagination and undeclared
            keys stripped)
        sync_id:
          type: string
          description: Which sync served this read.
        sync_name:
          type: string
          description: >-
            The served sync's raw name. Not unique, and may be the bare action
            id.
      required:
        - last_full_run_id
        - last_run_id
        - request_id
        - synced_at
        - sync_expires_at
        - params_hash
        - sync_id
        - sync_name
    ActionsSyncedSyncChoice:
      type: object
      properties:
        sync_id:
          type: string
          description: Pass this as `sync_id` to select this sync.
        sync_name:
          type: string
          description: The sync's raw name. Not unique, and may be the bare action id.
        sync_label:
          type: string
          description: >-
            Disambiguated label: the name, with parameters appended when the
            name alone does not distinguish this choice from another.
      required:
        - sync_id
        - sync_name
        - sync_label
    UnifiedError:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP status code
          example: 400
          nullable: true
        message:
          type: string
          description: Error message
          example: Bad Request
          nullable: true
        headers:
          type: object
          description: Response headers
          example:
            content-type: application/json
            x-request-id: 5678c28b211dace4e0a0f9171e6b88c5
          nullable: true
    ProviderError:
      type: object
      properties:
        status:
          type: number
          description: HTTP status code of the provider error
          example: 400
          nullable: true
        url:
          type: string
          description: URL that caused the error
          example: https://api.provider.com/v1/resource
          nullable: true
        raw:
          type: object
          description: Raw error response from the provider
          example:
            message: Invalid input parameters
          nullable: true
        headers:
          type: object
          description: Response headers
          example:
            content-type: application/json
            x-request-id: 5678c28b211dace4e0a0f9171e6b88c5
          nullable: true
  securitySchemes:
    basic:
      type: http
      scheme: basic

````