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

# Update Action



## OpenAPI

````yaml post /v1/actions/update
openapi: 3.0.2
info:
  title: Vocode Hosted API
  description: |2-

            Vocode's Hosted API helps you automate phone calls in minutes. 🚀

            ## Numbers

            You can buy phone lines and place agents on them.

            ## Calls

            You can start, end, and get information about calls.
            
  termsOfService: http://example.com/terms/
  contact:
    name: Support
    email: support@vocode.dev
  version: 1.0.0
servers:
  - url: https://api.vocode.dev
    description: Production environment
  - url: https://staging.vocode.dev
    description: Staging environment
security: []
tags:
  - name: numbers
    description: Operations with phone numbers.
  - name: calls
    description: Manage calls.
paths:
  /v1/actions/update:
    post:
      tags:
        - actions
      summary: Update Action
      operationId: update_action
      parameters:
        - required: true
          schema:
            title: Id
            type: string
            format: uuid
          name: id
          in: query
      requestBody:
        content:
          application/json:
            schema:
              title: Update Params
              anyOf:
                - $ref: '#/components/schemas/TransferCallActionUpdateParams'
                - $ref: '#/components/schemas/EndConversationActionUpdateParams'
                - $ref: '#/components/schemas/DTMFActionUpdateParams'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                title: Response Update Action V1 Actions Update Post
                anyOf:
                  - $ref: '#/components/schemas/TransferCallAction'
                  - $ref: '#/components/schemas/EndConversationAction'
                  - $ref: '#/components/schemas/DTMFAction'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TransferCallActionUpdateParams:
      title: TransferCallActionUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ActionType'
        config:
          title: Config
          anyOf:
            - $ref: '#/components/schemas/TransferCallConfig'
            - $ref: '#/components/schemas/Undefined'
    EndConversationActionUpdateParams:
      title: EndConversationActionUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ActionType'
        config:
          title: Config
          anyOf:
            - $ref: '#/components/schemas/EmptyActionConfig'
            - $ref: '#/components/schemas/Undefined'
    DTMFActionUpdateParams:
      title: DTMFActionUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ActionType'
        config:
          title: Config
          anyOf:
            - $ref: '#/components/schemas/EmptyActionConfig'
            - $ref: '#/components/schemas/Undefined'
    TransferCallAction:
      title: TransferCallAction
      required:
        - id
        - user_id
        - config
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/ActionType'
          default: action_transfer_call
        config:
          $ref: '#/components/schemas/TransferCallConfig'
    EndConversationAction:
      title: EndConversationAction
      required:
        - id
        - user_id
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/ActionType'
          default: action_end_conversation
        config:
          $ref: '#/components/schemas/EmptyActionConfig'
    DTMFAction:
      title: DTMFAction
      required:
        - id
        - user_id
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/ActionType'
          default: action_dtmf
        config:
          $ref: '#/components/schemas/EmptyActionConfig'
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ActionType:
      title: ActionType
      enum:
        - action_end_conversation
        - action_dtmf
        - action_transfer_call
      type: string
      description: An enumeration.
    TransferCallConfig:
      title: TransferCallConfig
      required:
        - phone_number
      type: object
      properties:
        phone_number:
          title: Phone Number
          type: string
    Undefined:
      title: Undefined
      type: object
      properties: {}
    EmptyActionConfig:
      title: EmptyActionConfig
      type: object
      properties: {}
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````