> ## Documentation Index
> Fetch the complete documentation index at: https://statsig-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fully Update Autotune

> Update all properties of the experiment



## OpenAPI

````yaml api-reference/statsig_openapi.json post /console/v1/autotunes/{id}
openapi: 3.0.0
info:
  title: Console API
  description: >-
    The "Console API" is the CRUD API for performing the actions offered on
    console.statsig.com without needing to go through the web UI.

    If you have any feature requests, drop on in to our [slack
    channel](https://www.statsig.com/slack) and let us know.

    <br /><br />

    <b>Authorization</b>

    <br />

    All requests must include the **STATSIG-API-KEY** field in the header. The
    value should be a **Console API Key** which can be created in the Project
    Settings on
    [console.statsig.com/api_keys](https://console.statsig.com/api_keys)

    <br /><br />

    <b>Rate Limiting</b>

    <br />

    Requests to the Console API are limited to <code>~ 100reqs / 10secs and ~
    900reqs / 15 mins</code>.

    <br /><br />

    <b>Keyboard Search</b>

    <br />

    Use <code>Ctrl/Cmd + K</code> to search for specific endpoints.
  version: 20240601.0.0
  contact: {}
servers:
  - url: https://statsigapi.net
security: []
tags: []
paths:
  /console/v1/autotunes/{id}:
    post:
      tags:
        - Autotunes
      summary: Fully Update Autotune
      description: Update all properties of the experiment
      parameters:
        - name: id
          required: true
          in: path
          description: id
          schema:
            type: string
        - name: x-respect-review-settings
          in: header
          description: Optional header to respect review settings for mutation endpoints.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutotuneFullUpdateDto'
      responses:
        '200':
          description: Fully Update Autotune Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SingleDataResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/AutotuneExperimentDto'
                example:
                  message: Autotune Experiment read successfully.
                  data:
                    id: my_autotunes_are_best
                    isStarted: false
                    description: helpful summary of what this Autotune is
                    lastModifierID: jd93DGSnvkauH9FijdGiajh
                    lastModifierName: CONSOLE API
                    variants:
                      - name: red
                        json:
                          color: red
                      - name: blue
                        json:
                          color: blue
                    successEvent: purchase_item
                    successEventValue: ''
                    explorationWindow: 1hr
                    attributionWindow: 2hrs
                    winnerThreshold: 99%
              example:
                message: Autotune Experiment read successfully.
                data:
                  id: my_autotunes_are_best
                  isStarted: false
                  description: helpful summary of what this Autotune is
                  lastModifierID: jd93DGSnvkauH9FijdGiajh
                  lastModifierName: CONSOLE API
                  variants:
                    - name: red
                      json:
                        color: red
                    - name: blue
                      json:
                        color: blue
                  successEvent: purchase_item
                  successEventValue: ''
                  explorationWindow: 1hr
                  attributionWindow: 2hrs
                  winnerThreshold: 99%
        '401':
          description: >-
            This endpoint only accepts an active CONSOLE key, but an invalid key
            was sent. Key: console-xxxXXXxxxXXXxxx
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 401
                  message:
                    type: string
                required:
                  - status
                  - message
              examples:
                Invalid Endpoint:
                  value:
                    status: 401
                    message: >-
                      This endpoint only accepts an active CONSOLE key, but an
                      invalid key was sent. Key: console-xxxXXXxxxXXXxxx
        '404':
          description: Not Found. The requested resource could not be found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 404
                  message:
                    type: string
                required:
                  - status
                  - message
              examples:
                Not Found:
                  value:
                    status: 404
                    message: Not Found. The requested resource could not be found.
      security:
        - STATSIG-API-KEY: []
components:
  schemas:
    AutotuneFullUpdateDto:
      type: object
      properties:
        description:
          type: string
          description: A brief summary of what the autotune is being used for.
        variants:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Variant name
              json:
                description: Variant JSON data
            required:
              - name
              - json
            description: An array of Variant objects
          minItems: 2
          description: An array of Variant objects.
        successEvent:
          type: string
          description: The event you are trying to optimize for.
        successEventValue:
          type: string
          description: >-
            The value that should come with the event for it to be considered
            successful.
        explorationWindow:
          type: string
          enum:
            - 1hr
            - 24hr
            - 48hr
            - '1'
            - '24'
            - '48'
            - 1hrs
            - 24hrs
            - 48hrs
          description: >-
            The initial time period where Autotune will equally split the
            traffic.
        attributionWindow:
          type: string
          enum:
            - 1hr
            - 2hr
            - 4hr
            - 24hr
            - 1hrs
            - 2hrs
            - 4hrs
            - 24hrs
            - '1'
            - '2'
            - '4'
            - '24'
          description: >-
            The maximum duration between the exposure and success event that
            counts as a success.
        winnerThreshold:
          type: string
          enum:
            - 80%
            - 90%
            - 95%
            - 98%
            - 99%
          description: >-
            The "probability of best" threshold a variant needs to achieve for
            Autotune to declare it the winner, stop collecting data, and direct
            all traffic.
        metadataField:
          type: string
          description: >-
            Metadata field containing the numeric value to optimize for. If this
            field is null, autotune optimizes for the existence of a follow-up
            event. This is only used for contextual autotunes.
        higherIsBetter:
          type: boolean
          description: >-
            Whether to optimize for an increase or decrease in the metadata
            field value. Default is true. This is only used for contextual
            autotunes.
      required:
        - variants
        - successEvent
        - explorationWindow
        - attributionWindow
        - winnerThreshold
      description: Autotune object
      example:
        id: my_autotunes_are_best
        isStarted: false
        description: helpful summary of what this Autotune is
        lastModifierID: ahKwUoaNauHu9AmJPc2
        lastModifierName: CONSOLE API
        variants:
          - name: red
            json:
              foo: boo
          - name: blue
            json: {}
        successEvent: purchase_item
        successEventValue: ''
        explorationWindow: 1hr
        attributionWindow: 2hrs
        winnerThreshold: 99%
        idType: userID
    SingleDataResponse:
      type: object
      properties:
        message:
          type: string
          description: A simple string explaining the result of the operation.
        data:
          type: object
          description: A single result.
      required:
        - message
        - data
    AutotuneExperimentDto:
      type: object
      properties:
        description:
          type: string
          description: Detailed description of the configuration’s purpose.
        variants:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: Variant name
              json:
                description: Variant JSON data
              id:
                type: string
                description: >-
                  The name that was originally given to the autotune on creation
                  but formatted as an ID ("A Autotune" -> "a_autotune").
            required:
              - name
              - json
              - id
        successEvent:
          type: string
          description: The event you are trying to optimize for.
        successEventValue:
          type: string
          description: >-
            The value that should come with the event for it to be considered
            successful.
        explorationWindow:
          type: string
          enum:
            - 1hr
            - 24hr
            - 48hr
            - '1'
            - '24'
            - '48'
            - 1hrs
            - 24hrs
            - 48hrs
          description: >-
            The initial time period where Autotune will equally split the
            traffic.
        attributionWindow:
          type: string
          enum:
            - 1hr
            - 2hr
            - 4hr
            - 24hr
            - 1hrs
            - 2hrs
            - 4hrs
            - 24hrs
            - '1'
            - '2'
            - '4'
            - '24'
          description: >-
            The maximum duration between the exposure and success event that
            counts as a success.
        winnerThreshold:
          type: string
          enum:
            - 80%
            - 90%
            - 95%
            - 98%
            - 99%
          description: >-
            The "probability of best" threshold a variant needs to achieve for
            Autotune to declare it the winner, stop collecting data, and direct
            all traffic.
        metadataField:
          type: string
          description: >-
            Metadata field containing the numeric value to optimize for. If this
            field is null, autotune optimizes for the existence of a follow-up
            event. This is only used for contextual autotunes.
        higherIsBetter:
          type: boolean
          description: >-
            Whether to optimize for an increase or decrease in the metadata
            field value. Default is true. This is only used for contextual
            autotunes.
        isContextual:
          type: boolean
          description: Whether this is a contextual autotune
        id:
          type: string
          description: ID
        name:
          type: string
          description: Optional name for the configuration.
        idType:
          type: string
          description: Type of ID
        lastModifierID:
          type: string
          nullable: true
          description: ID of the last modifier.
        lastModifiedTime:
          type: number
          nullable: true
          description: Time of the last modification.
        lastModifierEmail:
          type: string
          nullable: true
          description: Email of the last modifier.
        lastModifierName:
          type: string
          nullable: true
          description: Name of the last modifier.
        creatorID:
          type: string
          nullable: true
          description: ID of the user who created the entity.
        createdTime:
          type: number
          description: Timestamp when the entity was created.
        creatorName:
          type: string
          nullable: true
          description: Name of the creator.
        creatorEmail:
          type: string
          nullable: true
          description: Email of the creator.
        tags:
          type: array
          items:
            type: string
          description: Optional tags for categorization.
        targetApps:
          type: array
          items:
            type: string
          description: List of target applications associated with this configuration.
        holdoutIDs:
          type: array
          items:
            type: string
          description: Holdouts applied to this configuration.
        team:
          type: string
          nullable: true
          description: Optional name for the responsible team.
        teamID:
          type: string
          nullable: true
          description: Optional ID of the responsible team.
        version:
          type: number
          description: Version number
        isStarted:
          type: boolean
          description: Is the autotune experiment currently running.
        winner:
          type: object
          properties:
            id:
              type: string
              description: The Statsig UserID of the last modifier of this autotune.
            name:
              type: string
              description: The Statsig Username of the last modifier of this autotune.
          required:
            - id
            - name
          nullable: true
      required:
        - description
        - variants
        - successEvent
        - successEventValue
        - explorationWindow
        - attributionWindow
        - winnerThreshold
        - id
        - idType
        - lastModifierID
        - lastModifiedTime
        - lastModifierEmail
        - lastModifierName
        - creatorID
        - createdTime
        - creatorName
        - creatorEmail
        - isStarted
        - winner
  securitySchemes:
    STATSIG-API-KEY:
      type: apiKey
      name: STATSIG-API-KEY
      in: header

````