Skip to main content
POST
/
api
/
v1
/
experiments
Create experiment
curl --request POST \
  --url https://foundry-api-public.adaptyvbio.com/api/v1/experiments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "experiment_spec": {
    "experiment_type": "affinity",
    "antigen_concentrations": [
      1000,
      316.2,
      100,
      31.6,
      0
    ],
    "method": "bli",
    "n_replicates": 3,
    "parameters": "<unknown>",
    "sequences": {},
    "target_id": "c383cc1d-fe22-5dbf-953c-378bc073019d"
  },
  "name": "PD-L1 affinity panel",
  "auto_accept_quote": false,
  "skip_draft": true,
  "webhook_url": "https://example.com/webhook"
}
'
{
  "experiment_id": "<string>",
  "error": "<string>",
  "stripe_hosted_invoice_url": "<string>",
  "stripe_invoice_id": "<string>"
}

Authorizations

Authorization
string
header
required

Biscuit-based bearer token. Obtain tokens from the Adaptyv Portal or via the /tokens endpoint. Tokens encode organization membership and role-based capabilities; the API verifies the token's cryptographic signature and authorization claims before processing requests. Use /tokens/attenuate to create restricted tokens for delegation.

Body

application/json

Request payload for creating a new experiment.

Created experiments start in Draft status. Use PATCH /experiments/{id} to modify existing experiments.

experiment_spec
object
required

Structured experiment definition (type, target, sequences, parameters)

name
string
required

Human-readable name for the experiment

Example:

"PD-L1 affinity panel"

auto_accept_quote
boolean
default:false

Auto-accept the quote and create an invoice (without sending).

When true, the system will:

  1. Create a Stripe quote (requires target_id and full pricing available)
  2. Finalize and accept the quote
  3. Create a draft invoice (not sent to customer)
  4. Advance the experiment to "Waiting for materials" status

This enables fully automated experiment submission pipelines where payment is handled externally or the organization has pre-approved billing. Implies skip_draft: true.

skip_draft
boolean

Bypass Draft status and submit directly for processing.

When true, the experiment is created in "Waiting for confirmation" status instead of Draft, skipping the manual review step. Use this for automated pipelines with pre-validated payloads.

When an experiment is submitted with skip_draft: true and the target has existing inventory materials, those materials are automatically linked to expedite processing.

webhook_url
string | null

URL to which experiment status updates will be POSTed

Example:

"https://example.com/webhook"

Response

Experiment created

Response confirming experiment creation.

experiment_id
string
required

Unique identifier assigned to the new experiment

error
string | null

Error message when the request fails validation or processing

stripe_hosted_invoice_url
string | null

Stripe hosted invoice page. When the invoice is unpaid this is the checkout/payment page; after payment it becomes a receipt viewer.

stripe_invoice_id
string | null

Stripe invoice ID, present when auto_accept_quote created an invoice.