> ## 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 Dynamic Config



## OpenAPI

````yaml api-reference/statsig_openapi.json post /console/v1/dynamic_configs/{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/dynamic_configs/{id}:
    post:
      tags:
        - Dynamic Configs
      summary: Fully Update Dynamic Config
      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/DynamicConfigFullUpdateDto'
      responses:
        '200':
          description: Fully Update Dynamic Config Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SingleDataResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/DynamicConfigDto'
                example:
                  message: Dynamic config updated successfully.
                  data:
                    id: a_dynamic_config
                    description: helpful summary of what this dynamic config does
                    idType: userID
                    lastModifierID: 1vaQaBoLlkauH9iiuOSBP2
                    lastModifierName: CONSOLE API
                    creatorEmail: johnsmith@mydomain.com
                    creatorName: John Smith
                    createdTime: 1674769467002
                    holdoutIDs: []
                    isEnabled: true
                    rules:
                      - name: All Conditions
                        id: 38ttpCpzrQFTMKcqFKk02l:10.00:1
                        baseID: 38ttpCpzrQFTMKcqFKk02l
                        passPercentage: 10
                        conditions:
                          - type: public
                            operator: string
                            targetValue: 0
                            field: string
                            customID: string
                        returnValue:
                          key: true
                    defaultValue:
                      key: the default value
                    tags:
                      - a tag
              example:
                message: Dynamic config updated successfully.
                data:
                  id: a_dynamic_config
                  description: helpful summary of what this dynamic config does
                  idType: userID
                  lastModifierID: 1vaQaBoLlkauH9iiuOSBP2
                  lastModifierName: CONSOLE API
                  creatorEmail: johnsmith@mydomain.com
                  creatorName: John Smith
                  createdTime: 1674769467002
                  holdoutIDs: []
                  isEnabled: true
                  rules:
                    - name: All Conditions
                      id: 38ttpCpzrQFTMKcqFKk02l:10.00:1
                      baseID: 38ttpCpzrQFTMKcqFKk02l
                      passPercentage: 10
                      conditions:
                        - type: public
                          operator: string
                          targetValue: 0
                          field: string
                          customID: string
                      returnValue:
                        key: true
                  defaultValue:
                    key: the default value
                  tags:
                    - a tag
        '400':
          description: Invalid request. Please check the request input and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                  message:
                    type: string
                required:
                  - status
                  - message
              examples:
                Invalid Request:
                  value:
                    status: 400
                    message: >-
                      Invalid request. Please check the request input and try
                      again.
        '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
        '403':
          description: >-
            Forbidden. The request was valid, but the server is refusing action.
            You might not have the necessary permissions to access the resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 403
                  message:
                    type: string
                required:
                  - status
                  - message
              examples:
                Forbidden resource:
                  value:
                    status: 403
                    message: >-
                      Forbidden. The request was valid, but the server is
                      refusing action. You might not have the necessary
                      permissions to access the resource.
      security:
        - STATSIG-API-KEY: []
components:
  schemas:
    DynamicConfigFullUpdateDto:
      type: object
      properties:
        isEnabled:
          type: boolean
          description: Is the dynamic config enabled
          default: true
        description:
          type: string
          maxLength: 1000
          description: A brief summary of what the dynamic config is being used for
          example: helpful summary of what this dynamic config does
        rules:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: The name of this rule.
              passPercentage:
                type: number
                minimum: 0
                maximum: 100
                multipleOf: 0.01
                description: >-
                  Of the users that meet the conditions of this rule, what
                  percent should return true.
              conditions:
                type: array
                items:
                  type: object
                  properties:
                    targetValue:
                      oneOf:
                        - type: array
                          items:
                            type: string
                        - type: array
                          items:
                            type: number
                        - type: string
                        - type: number
                      nullable: true
                    operator:
                      type: string
                    field:
                      type: string
                      nullable: true
                    customID:
                      type: string
                      nullable: true
                    type:
                      type: string
                      enum:
                        - app_version
                        - browser_name
                        - browser_version
                        - country
                        - custom_field
                        - email
                        - environment_tier
                        - fails_gate
                        - fails_segment
                        - ip_address
                        - locale
                        - os_name
                        - os_version
                        - passes_gate
                        - passes_segment
                        - public
                        - time
                        - unit_id
                        - user_id
                        - url
                        - javascript
                        - device_model
                        - target_app
                  required:
                    - type
                description: An array of Condition objects.
              environments:
                type: array
                items:
                  type: string
                nullable: true
              id:
                type: string
                description: The Statsig ID of this rule.
              baseID:
                type: string
                description: >-
                  The base ID of this rule, i.e. without any added metadata.
                  Will remain the exact same throughout
              returnValue:
                type: object
                additionalProperties: {}
              returnValueJson5:
                type: string
            required:
              - name
              - passPercentage
              - conditions
          description: An array of Rule objects
        defaultValue:
          type: object
          additionalProperties: {}
          description: The fallback JSON object when no rules are triggered
        defaultValueJson5:
          type: string
          description: >-
            Can include comments. If provided with defaultValue, must parse to
            the same JSON
        idType:
          type: string
          description: The type of ID which the dynamic config is based on.
          example: userID
        tags:
          type: array
          items:
            type: string
          description: The list of tag names attached to the dynamic config
          example:
            - a tag
        creatorID:
          type: string
          nullable: true
        owner:
          type: object
          properties:
            ownerID:
              type: string
              description: ID of the owner
              example: abc123
            ownerType:
              type: string
              description: Type of the owner (e.g., SDK_KEY or USER)
              example: USER
            ownerName:
              type: string
              description: The name of the owner. This field is optional.
              example: John Doe
            ownerEmail:
              type: string
              description: The email of the owner. This field is optional.
          description: >-
            Schema for owner data including ID, type, name. Note that if Entity
            is created by CONSOLE API, owner will be undefined.
          example:
            ownerID: user123
            ownerType: USER
            ownerName: John Doe
            ownerEmail: owner123@test.com
          nullable: true
        creatorEmail:
          type: string
          nullable: true
        schema:
          type: string
          nullable: true
          description: >-
            A schema using JSON Schema Draft 2020-12 to enforce return values of
            this dynamic config's rules.
        schemaJson5:
          type: string
          nullable: true
          description: >-
            `schema` except with Json5 comments. Optional and should parse to
            same json as `schema`.
        targetApps:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        team:
          type: string
          nullable: true
          description: The team name associated with the dynamic config, Enterprise only.
        teamID:
          type: string
          nullable: true
          description: The team ID associated with the dynamic config, Enterprise only.
        precommitWebhook:
          type: object
          properties:
            url:
              type: string
            internalStatusUrl:
              type: string
          required:
            - url
            - internalStatusUrl
          nullable: true
      required:
        - isEnabled
        - description
        - rules
    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
    DynamicConfigDto:
      type: object
      properties:
        id:
          type: string
          description: ID
        name:
          type: string
          description: Optional name for the configuration.
        idType:
          type: string
          description: The type of ID which the dynamic config is based on.
          example: userID
        description:
          type: string
          maxLength: 1000
          description: A brief summary of what the dynamic config is being used for
          example: helpful summary of what this dynamic config does
        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
        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
        tags:
          type: array
          items:
            type: string
          description: The list of tag names attached to the dynamic config
          example:
            - a tag
        targetApps:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        holdoutIDs:
          type: array
          items:
            type: string
          description: Holdouts applied to this configuration.
        team:
          type: string
          nullable: true
          description: The team name associated with the dynamic config, Enterprise only.
        teamID:
          type: string
          nullable: true
          description: The team ID associated with the dynamic config, Enterprise only.
        version:
          type: number
          description: Version number
        isEnabled:
          type: boolean
          description: Is the dynamic config enabled
          default: true
        rules:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: The name of this rule.
              passPercentage:
                type: number
                minimum: 0
                maximum: 100
                multipleOf: 0.01
                description: >-
                  Of the users that meet the conditions of this rule, what
                  percent should return true.
              conditions:
                type: array
                items:
                  type: object
                  properties:
                    targetValue:
                      oneOf:
                        - type: array
                          items:
                            type: string
                        - type: array
                          items:
                            type: number
                        - type: string
                        - type: number
                      nullable: true
                    operator:
                      type: string
                    field:
                      type: string
                      nullable: true
                    customID:
                      type: string
                      nullable: true
                    type:
                      type: string
                      enum:
                        - app_version
                        - browser_name
                        - browser_version
                        - country
                        - custom_field
                        - email
                        - environment_tier
                        - fails_gate
                        - fails_segment
                        - ip_address
                        - locale
                        - os_name
                        - os_version
                        - passes_gate
                        - passes_segment
                        - public
                        - time
                        - unit_id
                        - user_id
                        - url
                        - javascript
                        - device_model
                        - target_app
                  required:
                    - type
                description: An array of Condition objects.
              environments:
                type: array
                items:
                  type: string
                nullable: true
              id:
                type: string
                description: The Statsig ID of this rule.
              baseID:
                type: string
                description: >-
                  The base ID of this rule, i.e. without any added metadata.
                  Will remain the exact same throughout
              returnValue:
                type: object
                additionalProperties: {}
              returnValueJson5:
                type: string
            required:
              - name
              - passPercentage
              - conditions
          description: An array of Rule objects
        defaultValue:
          type: object
          additionalProperties: {}
          description: The fallback JSON object when no rules are triggered
        defaultValueJson5:
          type: string
          description: >-
            Can include comments. If provided with defaultValue, must parse to
            the same JSON
        owner:
          type: object
          properties:
            ownerID:
              type: string
              description: ID of the owner
              example: abc123
            ownerType:
              type: string
              description: Type of the owner (e.g., SDK_KEY or USER)
              example: USER
            ownerName:
              type: string
              description: The name of the owner. This field is optional.
              example: John Doe
            ownerEmail:
              type: string
              description: The email of the owner. This field is optional.
          description: >-
            Schema for owner data including ID, type, name. Note that if Entity
            is created by CONSOLE API, owner will be undefined.
          example:
            ownerID: user123
            ownerType: USER
            ownerName: John Doe
            ownerEmail: owner123@test.com
          nullable: true
        schema:
          type: string
          nullable: true
          description: >-
            A schema using JSON Schema Draft 2020-12 to enforce return values of
            this dynamic config's rules.
        schemaJson5:
          type: string
          nullable: true
          description: >-
            `schema` except with Json5 comments. Optional and should parse to
            same json as `schema`.
        precommitWebhook:
          type: object
          properties:
            url:
              type: string
            internalStatusUrl:
              type: string
          required:
            - url
            - internalStatusUrl
          nullable: true
      required:
        - id
        - description
        - lastModifierID
        - lastModifiedTime
        - lastModifierEmail
        - lastModifierName
        - createdTime
        - creatorName
        - isEnabled
        - rules
  securitySchemes:
    STATSIG-API-KEY:
      type: apiKey
      name: STATSIG-API-KEY
      in: header

````