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

# Apply an opening as the winner

> Requires the `experiments:write` scope.



## OpenAPI

````yaml /api-reference/openapi.json post /experiments/{id}/promote
openapi: 3.1.0
info:
  title: Darwin API
  version: '2026-10-12'
  description: >-
    Read and act on your Darwin workspace: conversations, contacts, meetings,
    analytics, knowledge, the agent and its opening tests, with signed webhooks
    for what happens.


    Authenticate with a secret key from Integrations → API: `Authorization:
    Bearer dk_live_…`. Keys carry scopes; personal data needs `contacts:read`.

    Rate limits are per key per minute: origin 120, adapt 120, evolve 600, apex
    1200; heavy calls (exports, crawls, model work) have a smaller budget. Every
    response carries RateLimit-* headers.

    Lists are cursor-paginated (`limit`, `starting_after`, `next_cursor`).
    Writes accept `Idempotency-Key`. Errors are RFC 9457 problem documents with
    a stable `code` and a `request_id`.
  contact:
    name: Darwin
    url: https://docs.meetdarwin.ai/api-reference/introduction
servers:
  - url: https://api.meetdarwin.ai/v1
security:
  - bearer: []
tags:
  - name: Workspace
  - name: Conversations
  - name: Contacts
  - name: Meetings
  - name: Analytics
  - name: Events
  - name: Webhooks
  - name: Knowledge
  - name: Agent
  - name: Experiments
  - name: Privacy
  - name: Chat
paths:
  /experiments/{id}/promote:
    post:
      tags:
        - Experiments
      summary: Apply an opening as the winner
      description: Requires the `experiments:write` scope.
      operationId: promoteExperimentVariant
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Retry safely: the first response is replayed for 24 hours (not for
            streamed answers).
          schema:
            type: string
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExperimentPromote'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Experiment'
        '400':
          description: Invalid request (`invalid_request`, `unsupported_version`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: >-
            Missing or invalid key (`authentication_required`,
            `invalid_api_key`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '402':
          description: >-
            The workspace must add a card before the API can be used
            (`payment_required`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: The key lacks the scope (`insufficient_scope`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: No such object in this workspace (`not_found`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: >-
            Conflicts with the current state (`conflict`,
            `idempotency_key_in_use`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: Refused by a rule (`unprocessable`, `idempotency_key_reused`).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: >-
            Rate limited (`rate_limited`) or a monthly allowance used
            (`quota_exceeded`); see Retry-After.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    ExperimentPromote:
      type: object
      properties:
        variant:
          type: string
      required:
        - variant
      additionalProperties: false
    Experiment:
      type: object
      properties:
        id:
          type: string
          pattern: ^exp_
          example: exp_4c1f0a2b9d3e7a10
        object:
          type: string
          const: experiment
        name:
          type: string
        status:
          type: string
          description: >-
            draft, ready, running, winner_found, applied, stopped, paused,
            failed or invalidated.
        internal_status:
          type: string
        pages:
          type: array
          items:
            type: string
        metric:
          type: string
        hypothesis:
          type:
            - string
            - 'null'
        winner:
          type:
            - string
            - 'null'
        verdict:
          type:
            - string
            - 'null'
        created_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - type: 'null'
        started_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - type: 'null'
        ended_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - type: 'null'
        applied_at:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            - type: 'null'
        variants:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              object:
                type: string
                const: variant
              name:
                type: string
              control:
                type: boolean
              headline:
                type: string
              buttons:
                type: array
                items:
                  type: object
                  properties:
                    label:
                      type: string
                    message:
                      type: string
                    locked:
                      type: boolean
                  required:
                    - label
                    - message
                    - locked
              angle:
                type:
                  - string
                  - 'null'
              created_at:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: 'null'
              results:
                anyOf:
                  - type: object
                    properties:
                      views:
                        type: number
                      stages:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: number
                      rate:
                        type:
                          - number
                          - 'null'
                      rate_low:
                        type:
                          - number
                          - 'null'
                      rate_high:
                        type:
                          - number
                          - 'null'
                      chance_beats_current:
                        type:
                          - number
                          - 'null'
                      lift:
                        type:
                          - number
                          - 'null'
                      computed_at:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                          - type: 'null'
                    required:
                      - views
                      - stages
                      - rate
                      - rate_low
                      - rate_high
                      - chance_beats_current
                      - lift
                      - computed_at
                  - type: 'null'
            required:
              - id
              - object
              - name
              - control
              - headline
              - buttons
              - angle
              - created_at
              - results
        result: {}
      required:
        - id
        - object
        - name
        - status
        - internal_status
        - pages
        - metric
        - hypothesis
        - winner
        - verdict
        - created_at
        - started_at
        - ended_at
        - applied_at
        - variants
    Problem:
      type: object
      properties:
        type:
          type: string
          example: https://docs.meetdarwin.ai/api-reference/errors#insufficient_scope
        title:
          type: string
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        code:
          type: string
          example: insufficient_scope
        detail:
          type: string
        param:
          type: string
        request_id:
          type: string
          example: req_8m2k4p0q1x7z9c3v5b6n
      required:
        - type
        - title
        - status
        - code
        - detail
        - request_id
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A secret key (dk_live_…). Scopes: conversations:read, contacts:read,
        contacts:write, meetings:read, analytics:read, events:read,
        webhooks:write, knowledge:read, knowledge:write, agent:read,
        agent:write, experiments:read, experiments:write, privacy:write,
        chat:write.

````

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