> ## 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.

# Study API overview

> Build and manage shareable and in-product surveys with the Sprig Study API.

The Study API lets you create, configure, validate, launch, and maintain Sprig Studies through
resource-oriented endpoints under `https://api.sprig.com/v2`.

> [!NOTE]
>
> Study API V2 is available on paid plans when access is enabled for your account. Free plans are not
> eligible. If an authenticated request returns `403`, confirm that the credential can access the
> selected environment and that the Study API is enabled.

## Choose a Study kind

Every Study has one of two public kinds. The `type` value is stable after creation.

| Study kind | API value | Delivery | API-specific capabilities |
| - | - | - | - |
| Shareable survey | `SURVEY` | Respondents open a link | Blocks and pages, assets, invitations |
| In-product survey | `IN_PRODUCT_SURVEY` | Sprig Web or Mobile SDK | Blocks, Event triggers, audience targeting, delivery delay, sampling, recontact settings |

For an in-product survey, `platform` is also required and cannot change after creation:

* `WEB` presents the Study through the Sprig Web SDK.
* `MOBILE` presents the Study through a supported mobile SDK.

## Capability matrix

| Resource | Shareable survey | In-product survey |
| - | - | - |
| Questions and question logic | Supported | Supported within the in-product question set |
| Full authored layout | Supported | Supported with Questions and Blocks |
| Blocks and pages | Supported | Blocks supported; Pages not supported |
| Consent documents and question images | Supported | Not supported by the Study API |
| Invitations | Supported | Not supported |
| Targeting | Not applicable | Required before launch |
| Translations | Supported | Supported |
| Validation and lifecycle updates | Supported | Supported |

Unsupported Study/resource combinations use endpoint-specific responses. See each endpoint and
[Errors and launch validation](https://docs.sprig.com/reference/study-api-v2/errors-and-validation.md) before handling them.

## Resource identifiers

* Study, Question, Block, and Event IDs are UUIDs.
* Asset IDs are opaque strings.
* Translation resources use locale identifiers such as `fr` or `pt-BR`.
* Pagination cursors are opaque. Send the returned cursor unchanged; do not decode or construct one.
* Caller-defined Question and Block `name` values are stable authoring references. They are distinct
  from resource IDs.

## Recommended workflow

1. Create a draft Study.
2. Save the returned `id` and `version`.
3. Add Questions and any resources supported by the Study kind.
4. Configure targeting for an in-product survey.
5. Call the validation endpoint and resolve every returned issue.
6. Launch by updating only `status` to `IN_PROGRESS`.
7. Use the ETag returned by each write for the next versioned write.

> **[Build a shareable survey](https://docs.sprig.com/reference/study-api-v2/create-shareable-survey.md)**
>
> Create a link survey, organize its content, validate it, and generate invitations.

> **[Build an in-product survey](https://docs.sprig.com/reference/study-api-v2/create-in-product-survey.md)**
>
> Create a Web or Mobile survey, configure targeting, validate it, and launch it.

> **[Targeting](https://docs.sprig.com/reference/study-api-v2/targeting.md)**
>
> Select trigger Events, compose audience rules, and control delivery delay.

> **[Concurrency](https://docs.sprig.com/reference/study-api-v2/concurrency.md)**
>
> Prevent lost updates with ETag and If-Match.

## Defaults and limits

The reference schema documents field-level defaults and limits. Important defaults include:

* A new Study is created in `DRAFT`.
* Omitting completion settings creates a fixed limit of 10,000 responses.
* An ongoing in-product survey without explicit sampling uses 7 percent of eligible users.
* Omitting recontact settings prevents retakes and uses the product-level recontact window.
* Fixed in-product surveys use Sprig's non-configurable daily delivery cap.

Do not rely on a default that is not documented in the schema. Send an explicit value when it is
important to your integration.
