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

# Update experiment

> Modify an existing experiment's configuration or status.

Updates experiment metadata or inputs. Most fields can only be changed while
the experiment is in Draft or InReview status; naming one on a later status
returns 409 Conflict. `webhook_url` is the exception and stays editable for
the life of the experiment, so a customer can repoint delivery after
submitting.



## OpenAPI

````yaml https://devs.adaptyvbio.com/api/v1/openapi.json patch /api/v1/experiments/{experiment_id}
openapi: 3.1.0
info:
  title: Adaptyv Foundry API
  description: >

    The Foundry API enables programmatic access to Adaptyv Bio's protein
    characterization services.


    ## Getting Started


    1. **Obtain an API token** from the [Adaptyv
    Portal](https://foundry.adaptyvbio.com) or by
       contacting Adaptyv directly
    2. **Authenticate requests** using Bearer token in the Authorization header

    3. **Create experiments** to submit protein sequences for characterization

    4. **Monitor status** via webhooks or polling the experiment detail endpoint


    ## Authentication


    All requests require a Bearer token:


    ```

    Authorization: Bearer <your-token>

    ```


    Tokens can be attenuated (restricted) to specific organizations or
    capabilities via the `/tokens` endpoint.


    ## Pagination


    List endpoints support offset-based pagination:


    | Parameter | Description | Default |

    |-----------|-------------|---------|

    | `limit` | Maximum items per page | 50 |

    | `offset` | Number of items to skip | 0 |


    ## Filtering


    Most list endpoints support filtering via query parameters using comparison
    operators:


    - `equ(field)=value` — equals

    - `geq(field)=value` — greater than or equal

    - `gtr(field)=value` — greater than

    - `leq(field)=value` — less than or equal

    - `lss(field)=value` — less than


    Example: `GET /experiments?geq(created_at)=2025-01-01&status=draft`


    ## Environments


    | Environment | Base URL |

    |-------------|----------|

    | Production | `https://devs.adaptyvbio.com` |


    ## Support


    - **Email**: support@adaptyvbio.com

    - **Documentation**: [docs.adaptyvbio.com](https://docs.adaptyvbio.com)
  version: 0.0.2
servers:
  - url: https://devs.adaptyvbio.com/
    description: Production API (Public)
security:
  - adaptyv_biscuits_v0: []
tags:
  - name: experiments
    description: >

      Experiments are the core resource for submitting protein sequences to
      Adaptyv's characterization services.


      ## Lifecycle


      Experiments progress through these stages:


      1. **Draft** — Initial state for designing your experiment

      2. **In Review** — Submitted for validation and quote generation

      3. **Quote Sent** — Adaptyv has sent a pricing quote

      4. **Waiting for Confirmation** — Quote ready, awaiting acceptance

      5. **In Queue** — Confirmed and queued for lab scheduling

      6. **Waiting for Materials** — Confirmed, waiting for samples

      7. **In Production** — Lab work in progress

      8. **Data Analysis** — Characterization complete, processing results

      9. **Done** — Results available for download


      **Canceled** is a terminal state reachable from Draft, In Review, Waiting
      for Confirmation, or In Queue.


      ## Experiment Types


      | Type | Description | Target Required |

      |------|-------------|-----------------|

      | `screening` | High-throughput binding assessment | Yes |

      | `affinity` | Kinetic characterization (KD, kon, koff) | Yes |

      | `thermostability` | Thermal stability measurement (Tm) | No |

      | `expression` | Expression yield assessment | No |

      | `fluorescence` | Fluorescence-based characterization | No |


      ## Typical Workflow


      ```

      POST /experiments                    # Create experiment

      POST /experiments/cost-estimate      # Preview pricing

      POST /experiments/{id}/submit        # Submit for review

      GET /experiments/{id}/quote          # Retrieve quote when ready

      POST /experiments/{id}/quote/confirm # Accept quote

      GET /experiments/{id}                # Monitor progress

      GET /results?experiment_id={id}      # Retrieve results when done

      ```


      ## Related Resources


      - [Results](#tag/results) — Characterization data from completed
      experiments

      - [Sequences](#tag/sequences) — Individual sequences within experiments

      - [Targets](#tag/targets) — Target proteins for binding experiments
  - name: feedback
    description: >-
      Use this endpoint to give us feedback, report bugs that are not already
      caught by our observability or request features (or have your agents do
      it).
  - name: info
    description: >-
      Programmatic discovery and health probes. Anonymous-eligible liveness and
      database connectivity probes; admin-only assay-type catalog (internal
      builds).
  - name: invoices
    description: >-
      Invoice listing for organization billing history. Read-only access to
      invoices generated from accepted Stripe quotes, mirrored locally with org
      context, currency, and status.
  - name: quotes
    description: >-
      Stripe quote lifecycle: list, retrieve, confirm, and reject quotes for
      experiment pricing.
  - name: results
    description: >

      Results contain the characterization data from completed experiments.


      ## Result Availability


      Results appear when an experiment reaches the **Done** status. Some
      experiment types provide partial results during **Data Analysis**.


      ## Result Types by Experiment


      | Experiment Type | Result Data |

      |-----------------|-------------|

      | Affinity | KD, kon, koff, sensorgrams |

      | Screening | Binding yes/no, response units |

      | Thermostability | Tm values, melting curves |

      | Expression | Yield measurements |


      ## Downloading Results


      Use the result `id` to fetch detailed data. Result downloads may include:


      - Raw sensorgram data

      - Fitted kinetic parameters

      - Quality metrics

      - Summary reports


      ## Related Resources


      - [Experiments](#tag/experiments) — Parent resource that produces results
  - name: sequences
    description: >

      Sequences provide read-only access to protein sequences submitted across
      experiments.


      ## Sequence Format


      Sequences are amino acid strings in standard single-letter IUPAC format
      (e.g., `MKTLLLTLLV...`).


      ## Sequence Properties


      | Field | Description |

      |-------|-------------|

      | `aa_string` | The amino acid sequence |

      | `name` | Optional human-readable identifier |

      | `control` | Whether this is a control sequence |

      | `metadata` | Structural annotations (tag location, antibody type) |


      ## Querying Sequences


      Filter sequences by experiment or other criteria:


      ```

      GET /sequences?experiment_id={id}

      GET /sequences?name=mAb-001

      ```


      ## Related Resources


      - [Experiments](#tag/experiments) — Parent resource containing sequences
  - name: targets
    description: >

      Targets represent the molecules your samples will be tested against in
      binding experiments (affinity and screening).


      ## Target Catalog


      Adaptyv maintains a catalog of pre-validated target proteins with
      established pricing. Use `selfservice_only=true` to filter for targets
      with immediate pricing availability.


      ## Self-Service vs Custom Targets


      | Category | Description | Pricing |

      |----------|-------------|---------|

      | Self-service | Pre-validated catalog targets | Instant quote via cost
      estimate |

      | Custom | User-supplied or special request | Requires manual quote |


      ## Usage


      1. Browse targets with `GET /targets?selfservice_only=true`

      2. Use the target's `id` when creating an experiment

      3. For custom targets, provide a `requested_target` object in the
      experiment request


      ## Related Resources


      - [Experiments](#tag/experiments) — Create experiments using targets

      - [Cost Estimate](#operation/cost_estimate) — Preview pricing for
      self-service targets
  - name: tokens
    description: >

      Create restricted versions of your API token for delegation to team
      members or automated systems.


      ## Token Attenuation


      Attenuation **reduces** the permissions of your token—it cannot grant
      additional access. Attenuated tokens inherit a subset of the parent
      token's capabilities.


      ## Restriction Types


      | Restriction | Effect |

      |-------------|--------|

      | Organization | Limit access to specific organizations |

      | Resource | Limit to specific resource types (experiments, results) |

      | Action | Limit to specific actions (read, create, update) |

      | Expiry | Set a shorter expiration time |


      ## Security Best Practices


      - Create narrowly-scoped tokens for automated systems

      - Use short expiration times for temporary access

      - Revoke tokens promptly when no longer needed
  - name: updates
    description: >-
      Real-time feed of experiment status changes, progress notifications, and
      operational alerts. Supports cursor-based pagination for efficient
      polling.
  - name: webhooks
    description: >-
      Register an HTTPS endpoint that receives signed push notifications for the
      experiments in your organization that have not registered a webhook of
      their own. Each delivery carries an X-Adaptyv-Signature header
      (HMAC-SHA256, hex) computed over the raw request body. Set a secret here
      to verify deliveries with a key only your organization holds; a
      per-experiment webhook_secret overrides it.
  - name: whoami
    description: >-
      Identify yourself: the organizations your token can access (with the
      active one marked), your user id, the permissions your token grants, and
      its expiry.
paths:
  /api/v1/experiments/{experiment_id}:
    patch:
      tags:
        - experiments
      summary: Update experiment
      description: >-
        Modify an existing experiment's configuration or status.


        Updates experiment metadata or inputs. Most fields can only be changed
        while

        the experiment is in Draft or InReview status; naming one on a later
        status

        returns 409 Conflict. `webhook_url` is the exception and stays editable
        for

        the life of the experiment, so a customer can repoint delivery after

        submitting.
      operationId: modify_exp
      parameters:
        - name: experiment_id
          in: path
          description: Unique experiment request identifier to modify
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifyExpRequest'
        required: true
      responses:
        '200':
          description: >-
            Experiment modified successfully or no action taken (e.g., already
            fulfilled)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModifyExpResponse'
        '400':
          description: >-
            Invalid modification request, including a malformed
            `parameters.enzyme_order` or a replacement sequence list containing
            duplicates — two sequences sharing normalized residues and tag
            location (Fabs exempt); also a malformed body, or `Content-Type:
            application/json` declared with no body sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Experiment request not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Modification not allowed (e.g., request already fulfilled)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '415':
          description: >-
            No body was sent, or a body was sent under a content type other than
            `application/json`. A JSON body is required; every field is
            optional, so send `{}` if you have nothing to change
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Well-formed JSON that does not fit `ModifyExpRequest`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ModifyExpRequest:
      type: object
      description: >-
        Request payload for modifying an existing experiment.


        All fields are optional - only provided fields will be updated.

        Note: Some modifications may be restricted based on experiment status.

        Modifications are only allowed if the experiment request is not yet
        fulfilled.


        Status transitions are handled separately via the
        `/experiments/{id}/confirm`

        endpoint, which performs the appropriate transition based on current
        state.
      properties:
        antigen_concentrations:
          type:
            - array
            - 'null'
          items:
            type: number
            format: double
          description: Update antigen concentrations (only if not fulfilled)
        description:
          type:
            - string
            - 'null'
          description: Update experiment description
        n_replicates:
          type:
            - integer
            - 'null'
          format: int32
          description: Update replicate count (only if not fulfilled)
          minimum: 0
        name:
          type:
            - string
            - 'null'
          description: Update experiment name
        parameters:
          type:
            - object
            - 'null'
          description: >-
            Update experiment parameters (restrictions may apply, only if not
            fulfilled).

            The keys merge into the stored parameters. For `enzyme_activity`,

            `enzyme_order` replaces the enzyme order: an object with
            `enzyme_id`,

            `purified`, `conditions` (at least 1), `biological_replicates` (at

            least 0) and `thermostability`, all required. Add-ons are not

            available yet, so the order must have `conditions` 1,

            `biological_replicates` 0, `thermostability` false and `purified`
            only

            when the protocol requires it. The replicates reset to the enzyme's

            protocol count. A malformed order or an order with add-ons returns

            `400`, and so does `enzyme_order` on another experiment type.
        sequences:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/SequenceEntry'
          description: Replace sequence list (only if not fulfilled)
        target_id:
          type:
            - string
            - 'null'
          description: >-
            Change the experiment's catalog target (only while the experiment is
            editable).


            - omitted: keep the current target

            - `null`: clear the target

            - a catalog product UUID (as returned by `GET /targets`): set the
            target to that product
        webhook_url:
          type:
            - string
            - 'null'
          description: >-
            Update the webhook URL for push notifications. The URL receives an

            `experiment_update` event for every customer-facing update on the

            experiment — the same updates that trigger an email notification.


            Unlike every other field here, this one can be changed at any
            status, so

            delivery can be repointed after the experiment has been submitted.
    ModifyExpResponse:
      type: object
      description: Response confirming experiment modification.
      required:
        - id
        - updated
      properties:
        id:
          type: string
          description: Experiment identifier that was modified
        message:
          type:
            - string
            - 'null'
          description: Optional message, e.g., if modification is not allowed
        updated:
          type: boolean
          description: Indicates if any changes were applied
    ErrorResponse:
      type: object
      description: >-
        Error response body returned by all endpoints on 4xx/5xx failures.


        Every error response contains a human-readable message and the request
        ID

        for support correlation. The `request_id` is also returned in the

        `x-request-id` response header.
      required:
        - error
        - request_id
      properties:
        error:
          type: string
          description: Human-readable error description.
          example: experiment not found
        request_id:
          type: string
          description: >-
            Request identifier for support correlation (also in `x-request-id`
            header).
          example: req_019462a4-b1c2-7def-8901-23456789abcd
    SequenceEntry:
      type: object
      description: >-
        Represents a biological sequence to be tested in an experiment.


        Each sequence represents an antibody or protein to be tested in the
        experiment.


        # Example


        ```json

        {
          "name": "mAb1",
          "aa_string": "EVQLVESGGGLVQPGGSLRLSCAASGFTFS...",
          "control": false
        }

        ```
      required:
        - aa_string
      properties:
        aa_string:
          $ref: '#/components/schemas/AAString'
          description: >-
            Protein/peptide sequence in standard single-letter amino acid
            format.


            Valid characters: A,C,D,E,F,G,H,I,K,L,M,N,P,Q,R,S,T,V,W,Y and colon
            for multichain.
        control:
          type: boolean
          description: Whether the sequence should be treated as a control well
        metadata:
          description: Arbitrary metadata supplied by the customer (tag locations, notes)
        name:
          type:
            - string
            - 'null'
          description: Optional name for the sequence (e.g., "mAb1", "scFv-001")
          example: mAb1
    AAString:
      type: string
      description: >-
        A validated amino acid sequence string.


        Contains only the 20 natural amino acids (single-letter codes: A, C, D,
        E,

        F, G, H, I, K, L, M, N, P, Q, R, S, T, V, W, Y) and colons for
        multichain

        notation. Input is case-insensitive; stored uppercase.


        Multichain sequences use colon separators (e.g., `MVLS:EVQL` for a

        two-chain construct). Invalid characters or empty strings are rejected.
      example: EVQLVESGGGLVQPGGSLRLSCAAS
  securitySchemes:
    adaptyv_biscuits_v0:
      type: http
      scheme: bearer
      bearerFormat: Adaptyv Biscuits v0
      description: >-
        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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.