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

# Update stored action

> Update an existing AI Action.

<Warning>
  Partial updates are not currently supported.

  Use the [Get AI Action](/ai-actions/how-tos/stored/manage/get-action) endpoint to get the action details first.
</Warning>


## OpenAPI

````yaml put /api/v2/ai-actions/{ai_action_id}/
openapi: 3.1.0
info:
  title: Zapier AI Actions API V2
  version: 1.0.0
  description: ''
servers:
  - url: https://actions.zapier.com
security: []
paths:
  /api/v2/ai-actions/{ai_action_id}/:
    put:
      tags:
        - ai-actions
      summary: Update AI Action
      description: Update an existing AI Action.
      operationId: api_ai_actions_update_ai_action
      parameters:
        - in: path
          name: ai_action_id
          schema:
            description: ID of the action to update.
            title: Ai Action Id
            type: string
          required: true
          description: ID of the action to update.
        - in: query
          name: account_id
          schema:
            description: >

              The Zapier account ID to use.


              Account IDs available to the user can be listed using the [Get
              Account List](/docs/api-reference/meta/get-account-list) endpoint 
            title: Account Id
            type: integer
          required: false
          description: >

            The Zapier account ID to use.


            Account IDs available to the user can be listed using the [Get
            Account List](/docs/api-reference/meta/get-account-list) endpoint 
        - in: query
          name: authentication_id
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            description: >

              ID of the authentication to use for the app.


              Authentications available to the user can be listed using the
              [List Authentications For
              App](/docs/api-reference/actions/list-authentications-for-app)
              endpoint.
            title: Authentication Id
          required: false
          description: >

            ID of the authentication to use for the app.


            Authentications available to the user can be listed using the [List
            Authentications For
            App](/docs/api-reference/actions/list-authentications-for-app)
            endpoint.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAiActionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiActionResponse'
      security:
        - AccessPointApiKeyHeader: []
        - AccessPointOAuth: []
components:
  schemas:
    CreateAiActionRequest:
      properties:
        app:
          title: App
          type: string
        action:
          title: Action
          type: string
        action_type:
          $ref: '#/components/schemas/ActionType'
        params:
          additionalProperties:
            anyOf:
              - type: string
              - items:
                  type: string
                type: array
          description: >

            Dictionary of need to value or list of possible values.
                                                       
            If this is a single string, then it will be used to guess the actual
            value of the need when running the action.


            If this is a list of strings, it's expected that it will be IDs of
            possible values for the AI to choose from.


            Needs that are omitted from this dictionary will be guessed by the
            AI at runtime based on instructions.
          title: Params
          type: object
        meta:
          $ref: '#/components/schemas/AiActionMeta'
      required:
        - app
        - action
        - action_type
        - params
        - meta
      title: CreateAiActionRequest
      type: object
    AiActionResponse:
      properties:
        id:
          description: The unique ID of the AI action.
          title: Id
          type: string
        description:
          description: Description of the AI action.
          title: Description
          type: string
        account_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: Zapier account ID that will be used when running the action.
          title: Account Id
        authentication_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: ID of the authentication to use for the app when running the action.
          title: Authentication Id
        app:
          anyOf:
            - type: string
            - type: 'null'
          description: The app that the action is for.
          title: App
        action:
          anyOf:
            - type: string
            - type: 'null'
          description: The action that will be run.
          title: Action
        action_type:
          anyOf:
            - $ref: '#/components/schemas/ActionType'
            - type: 'null'
          description: The type of action that will be run.
        params:
          description: The parameters that will be used when running the action.
          title: Params
          type: object
        meta:
          allOf:
            - $ref: '#/components/schemas/AiActionMeta'
          description: Metadata about the AI action.
        needs:
          anyOf:
            - items:
                $ref: '#/components/schemas/AiActionNeed'
              type: array
            - type: 'null'
          title: Needs
      required:
        - id
        - description
        - account_id
        - authentication_id
        - app
        - action
        - action_type
        - params
        - meta
      title: AiActionResponse
      type: object
    ActionType:
      enum:
        - read
        - write
        - search
        - read_bulk
      title: ActionType
      type: string
    AiActionMeta:
      properties:
        params:
          additionalProperties:
            $ref: '#/components/schemas/ParamsValue'
          description: >

            Dictionary of need to parameter metadata.


            Key should be the key for a `need` that is also in the `params`
            dictionary.
          title: Params
          type: object
        app_label:
          anyOf:
            - type: string
            - type: 'null'
          description: Label for the app that the action using.
          title: App Label
        action_label:
          anyOf:
            - type: string
            - type: 'null'
          description: Label for the action that will be run.
          title: Action Label
        authentication_label:
          anyOf:
            - type: string
            - type: 'null'
          description: Label for the authentication that will be used.
          title: Authentication Label
        app_needs_auth:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Whether or not the app needs authentication to run.
          title: App Needs Auth
      required:
        - params
      title: AiActionMeta
      type: object
    AiActionNeed:
      properties:
        key:
          description: >

            The key of the need.
                                 
            This is used as the key in objects such as `params` and
            `params_constraints`.
          title: Key
          type: string
        type:
          anyOf:
            - enum:
                - int
                - integer
                - float
                - decimal
                - unicode
                - text
                - str
                - string
                - datetime
                - boolean
                - bool
                - file
                - copy
                - password
                - dict
                - code
                - filter
                - confirmation
              type: string
            - type: 'null'
          description: The type of the need.
          title: Type
        label:
          anyOf:
            - type: string
            - type: 'null'
          description: Label for the need.
          title: Label
        required:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Whether or not a value for this need is required in order to run the
            action.
          title: Required
        prefill:
          anyOf:
            - type: string
            - type: 'null'
          description: >

            If a need has a `prefill`, then that means its value should come
            from a list of available values.
                                     
            See [Get prefill
            Choices](https://docs.zapier.com/ai-actions/how-tos/action-info/prefill-choices)
            for information on how to get the available values for a need.
          title: Prefill
        searchfill:
          anyOf:
            - type: string
            - type: 'null'
          title: Searchfill
        capabilities:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Capabilities
        custom_field:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >

            If this is true, then it means that this need comes from a custom
            field.
                                           
            See the [Custom fields section in Get action details and
            needs](https://docs.zapier.com/ai-actions//how-tos/action-info/action-details#custom-fields)
            for more information on these needs.
          title: Custom Field
        depends_on:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >

            A list of the `key` of other needs that this need depends on.


            If this exists, it means that the value of this need may change if
            one of the listed needs changes.

            See the [Custom fields section in Get action details and
            needs](https://docs.zapier.com/ai-actions/how-tos/action-info/action-details#custom-fields)
            for more information on these needs.
          title: Depends On
        input_format:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Input Format
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
        parent_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Key
        regex:
          anyOf:
            - type: string
            - type: 'null'
          title: Regex
        alters_custom_fields:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Alters Custom Fields
        choices:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChoiceT'
              type: array
            - type: 'null'
          description: >

            If this array exists, then it will be a static list of choices that
            the value of this need can be when it runs.
          title: Choices
        default:
          anyOf:
            - type: string
            - type: 'null'
          title: Default
        help_text:
          anyOf:
            - type: string
            - type: 'null'
          description: >

            Additional information that is specific to this need. May include
            links to outside documentation.
          title: Help Text
        placeholder:
          anyOf:
            - type: string
            - type: 'null'
          title: Placeholder
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
        list:
          anyOf:
            - type: boolean
            - type: 'null'
          title: List
      required:
        - key
        - type
        - label
        - required
        - prefill
        - custom_field
        - depends_on
        - choices
        - help_text
      title: AiActionNeed
      type: object
    ParamsValue:
      properties:
        label:
          description: >

            Human-readable label for the need.
                                   
            For example, if a specific spreadsheet was chosen, the `label`
            should be the name of the spreadsheet.
          title: Label
          type: string
      required:
        - label
      title: ParamsValue
      type: object
    ChoiceT:
      properties:
        key:
          title: Key
          type: string
        label:
          title: Label
          type: string
        sample:
          title: Sample
          type: string
      title: ChoiceT
      type: object
  securitySchemes:
    AccessPointApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
    AccessPointOAuth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /oauth/authorize/
          tokenUrl: /oauth/token/
          scopes:
            nla:exposed_actions:execute: Run AI Actions
            openid: OpenID Connect scope

````