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

# Update an action

> Partially update an action's name, description, or params; all fields are optional. Returns 404 if the action does not exist.



## OpenAPI

````yaml /api-reference/workflows.yaml patch /actions/{actionId}
openapi: 3.1.0
info:
  title: Workflows
  version: v1
servers:
  - url: https://api.mobilerun.ai
    description: Droidrun Cloud API
security:
  - bearerAuth: []
paths:
  /actions/{actionId}:
    patch:
      tags:
        - Actions
      summary: Update an action
      description: >-
        Partially update an action's name, description, or params; all fields
        are optional. Returns 404 if the action does not exist.
      operationId: updateAction
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: actionId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateActionBody'
      responses:
        '200':
          description: Action updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Action'
                required:
                  - data
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const action = await
            client.workflows.actions.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(action.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            action = client.workflows.actions.update(
                action_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(action.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/stainless-sdks/droidrun-cloud-go\"\n\t\"github.com/stainless-sdks/droidrun-cloud-go/option\"\n)\n\nfunc main() {\n\tclient := mobileruncloud.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\taction, err := client.Workflows.Actions.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\tmobileruncloud.WorkflowActionUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", action.Data)\n}\n"
        - lang: CLI
          source: |-
            mobilerun-cloud workflows:actions update \
              --api-key 'My API Key' \
              --action-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  schemas:
    UpdateActionBody:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 256
        description:
          type: string
          maxLength: 2048
        params:
          type: object
          additionalProperties: {}
    Action:
      type: object
      properties:
        id:
          type: string
          format: uuid
        userId:
          type: string
          format: uuid
          description: 'Deprecated: use ownerId (tenancy) / createdBy (actor).'
          deprecated: true
        ownerId:
          type: string
          format: uuid
        createdBy:
          type:
            - string
            - 'null'
          format: uuid
        catalogEntryId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        service:
          type: string
          enum:
            - tasks_api
            - devices_api
            - agents_api
            - webhooks
        method:
          type: string
        params: {}
        paramsSchema: {}
        createdAt:
          type:
            - string
            - 'null'
        updatedAt:
          type:
            - string
            - 'null'
      required:
        - id
        - userId
        - ownerId
        - createdBy
        - catalogEntryId
        - name
        - description
        - service
        - method
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: Bearer token via Authorization header

````