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

# Get a Study asset

> Returns one asset recorded for a SURVEY Study. Assets are currently supported for SURVEY Studies only. This is a read: a launched Study is allowed and If-Match is not required. An asset id that is not recorded on this Study is not found, including a consent file that was uploaded before assets were recorded.



## OpenAPI

````yaml /reference/study-api-v2.json get /v2/studies/{studyId}/assets/{assetId}
openapi: 3.1.0
info:
  title: Sprig Public API V2 — Studies
  version: 1.0.0
  description: >-
    Programmatically create and manage Sprig Studies (surveys), their Questions,
    Blocks, invitations, and translations.
  contact:
    name: Support
    email: support@sprig.com
servers:
  - url: https://api.sprig.com
security: []
tags:
  - name: Studies
    description: The root resource for a programmatically managed survey.
  - name: Questions
    description: Questions, with their nested options, owned by a Study.
  - name: Blocks
    description: >-
      Blocks and Pages; Pages are not supported for IN_PRODUCT_SURVEY Studies.
      Group skip and display logic live on the Block. Question logic is member
      display, plus skip logic only outside a Page.
  - name: Invitations
    description: >-
      Invitation codes for SURVEY Studies; invitations are not supported for
      IN_PRODUCT_SURVEY Studies.
  - name: Translations
    description: >-
      Per-locale translated content for a Study, and the asynchronous jobs that
      generate it. Job cancellation is best-effort and does not roll back
      committed output.
  - name: Attributes
    description: Custom Attribute definitions available in the environment.
  - name: Targeting
    description: Event triggers and audience conditions for IN_PRODUCT_SURVEY Studies.
  - name: Events
    description: Existing tracked and page-URL Events available for Study targeting.
paths:
  /v2/studies/{studyId}/assets/{assetId}:
    get:
      tags:
        - Studies
      summary: Get a Study asset
      description: >-
        Returns one asset recorded for a SURVEY Study. Assets are currently
        supported for SURVEY Studies only. This is a read: a launched Study is
        allowed and If-Match is not required. An asset id that is not recorded
        on this Study is not found, including a consent file that was uploaded
        before assets were recorded.
      operationId: getStudyAsset
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: studyId
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 128
          required: true
          name: assetId
          in: path
      responses:
        '200':
          description: The Study asset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StudyAsset'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            The environment API key is missing or invalid, cannot access this
            resource, or the Study API is not available for the account.
        '404':
          description: The Study was not found, or the asset is not recorded on that Study.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - EnvironmentApiKey: []
components:
  schemas:
    StudyAsset:
      oneOf:
        - $ref: '#/components/schemas/ConsentStudyAsset'
          title: Consent document
        - $ref: '#/components/schemas/QuestionImageStudyAsset'
          title: Question image
      discriminator:
        propertyName: purpose
        mapping:
          CONSENT_DOCUMENT: '#/components/schemas/ConsentStudyAsset'
          QUESTION_IMAGE: '#/components/schemas/QuestionImageStudyAsset'
      description: >-
        An uploaded Study asset. Uploading does not attach it to a Question or
        change the Study version. width and height are present for
        QUESTION_IMAGE only.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: A machine-readable error code (e.g. STUDY_NOT_FOUND).
        message:
          type: string
          description: A human-readable description of the error.
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              path:
                type: string
              message:
                type: string
              resource:
                type: object
                properties:
                  type:
                    type: string
                  id:
                    type: string
                required:
                  - type
                  - id
                description: >-
                  The other resource this issue points at, when the issue is not
                  about the request itself.
            required:
              - code
              - message
          description: >-
            Per-field validation issues, present when the request itself was
            malformed.
      required:
        - code
        - message
      description: Error response returned by the Public API V2.
    ConsentStudyAsset:
      type: object
      properties:
        id:
          type: string
          description: >-
            Opaque id. A Consent / Legal question stores a CONSENT_DOCUMENT id
            as assetId.
        originalFilename:
          type: string
        url:
          type: string
        purpose:
          type: string
          enum:
            - CONSENT_DOCUMENT
        mediaType:
          type: string
          enum:
            - application/pdf
      required:
        - id
        - originalFilename
        - url
        - purpose
        - mediaType
      title: Consent document
      description: A PDF consent document recorded for a shareable survey.
    QuestionImageStudyAsset:
      type: object
      properties:
        id:
          type: string
          description: >-
            Opaque id. A Consent / Legal question stores a CONSENT_DOCUMENT id
            as assetId.
        originalFilename:
          type: string
        url:
          type: string
        purpose:
          type: string
          enum:
            - QUESTION_IMAGE
        mediaType:
          type: string
          enum:
            - image/gif
            - image/jpeg
            - image/png
            - image/webp
        width:
          type: integer
          exclusiveMinimum: 0
        height:
          type: integer
          exclusiveMinimum: 0
      required:
        - id
        - originalFilename
        - url
        - purpose
        - mediaType
        - width
        - height
      title: Question image
      description: A Question image recorded for a shareable survey.
  securitySchemes:
    EnvironmentApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Use `API-Key YOUR_API_KEY`. The key selects the Production or
        Development environment.

````