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

# Post documentv1beta1 vieweractionsvieweractions execute

> Executes a viewer action applicable to a document.



## OpenAPI

````yaml /openapis/documentId.json post /document/v1beta1/{documentId}/viewerActions/viewerActions/{actionId}/execute
openapi: 3.0.1
info:
  description: "The AODocs REST API exposes most of the features of AODocs. It can be used to implement custom applications, third-party integration, bulk tools, or\n\t\t\t\t\t\t\t\t\t\tjust to experiment with AODocs."
  version: '69.4'
  title: AODocs REST API
servers:
  - url: https://aodocs.altirnao.com/api
security: []
tags:
  - name: documentId
    description: >-
      Lets you read and update document properties, create new documents, delete
      documents, manage document versions, ...  (beta version, subject to
      change)
paths:
  /document/v1beta1/{documentId}/viewerActions/viewerActions/{actionId}/execute:
    post:
      tags:
        - documentId
      description: Executes a viewer action applicable to a document.
      operationId: documentId:v1beta1.ViewerActions.execute
      parameters:
        - $ref: '#/components/parameters/documentId_path_parameter'
        - name: actionId
          in: path
          description: The ID of the viewer action
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/versionId_query_parameter'
        - $ref: '#/components/parameters/securityCode_query_parameter'
        - $ref: '#/components/parameters/domain_query_parameter'
      responses:
        '200':
          description: A ApiCustomActionFeedback response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiCustomActionFeedback'
      security:
        - google_id_token-a99f12e0:
            - https://www.googleapis.com/auth/userinfo.email
        - google_id_token_legacy-a99f12e0:
            - https://www.googleapis.com/auth/userinfo.email
components:
  parameters:
    documentId_path_parameter:
      name: documentId
      in: path
      description: The ID of the document
      required: true
      schema:
        type: string
    versionId_query_parameter:
      name: versionId
      in: query
      description: >-
        The ID of the version. Leave empty to use the default version
        (equivalent to value 'HEAD'), i.e. the draft if it exists and if the
        user has access to it (equivalent to value 'DRAFT'), else the main
        version (equivalent to value 'COMMITTED'). Custom ID of past versions
        are not supported.
      required: false
      schema:
        type: string
        default: HEAD
    securityCode_query_parameter:
      name: securityCode
      in: query
      description: The security code
      required: false
      schema:
        type: string
    domain_query_parameter:
      name: domain
      in: query
      description: The G Suite domain
      required: false
      schema:
        type: string
  schemas:
    ApiCustomActionFeedback:
      type: object
      properties:
        actionId:
          type: string
          description: The executed action ID
        copyToClipboardMessage:
          type: string
          description: Message to be copied to end-user clipboard
        documentId:
          type: string
          description: The document ID against which the action was executed
        kind:
          type: string
        messages:
          type: array
          description: Messages to be displayed to end-user
          items:
            $ref: '#/components/schemas/ApiCustomActionFeedbackMessage'
        navigate:
          $ref: '#/components/schemas/ApiNavigationTarget'
        refresh:
          type: boolean
          description: Whether the document page should be refreshed
    ApiCustomActionFeedbackMessage:
      type: object
      properties:
        level:
          type: string
          description: 'Severity level, possible values : info|warn|error'
          enum:
            - INFO
            - WARN
            - ERROR
        text:
          type: string
          description: Text to be displayed
    ApiNavigationTarget:
      type: object
      properties:
        documentId:
          type: string
          description: >-
            The document ID to be redirected to or CURRENT (refreshes current
            editor)
        libraryId:
          type: string
          description: The library ID to be redirected to (if alone)
        openWindow:
          $ref: '#/components/schemas/ApiOpenWindow'
        url:
          type: string
          description: >-
            The URL to be redirected to. Mutually exclusive with the fields
            documentId, libraryId and viewId.
        viewId:
          type: string
          description: The view ID to be redirected to (a libraryId must also be set)
    ApiOpenWindow:
      type: object
      properties:
        features:
          type: string
        target:
          type: string
  securitySchemes:
    google_id_token-a99f12e0:
      type: oauth2
      x-google-issuer: https://accounts.google.com
      x-google-jwks_uri: https://www.googleapis.com/oauth2/v1/certs
      x-google-audiences: >-
        755040865326-h5gomu85549lkh2qf9d3lku39vnaf6ii.apps.googleusercontent.com,563231141203-231sn7f6ptedncun5h00h7ktbe3o2nd5.apps.googleusercontent.com,993707107224.apps.googleusercontent.com,ao-docs,aodocs-core-eu-1,ao-docs-staging,ao-docs-dev,aodocs-core-dev-us,aodocs-total-poc-euw3
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          scopes:
            https://www.googleapis.com/auth/userinfo.email: View your email address
    google_id_token_legacy-a99f12e0:
      type: oauth2
      x-google-issuer: accounts.google.com
      x-google-jwks_uri: https://www.googleapis.com/oauth2/v1/certs
      x-google-audiences: >-
        755040865326-h5gomu85549lkh2qf9d3lku39vnaf6ii.apps.googleusercontent.com,563231141203-231sn7f6ptedncun5h00h7ktbe3o2nd5.apps.googleusercontent.com,993707107224.apps.googleusercontent.com,ao-docs,aodocs-core-eu-1,ao-docs-staging,ao-docs-dev,aodocs-core-dev-us,aodocs-total-poc-euw3
      flows:
        implicit:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          scopes:
            https://www.googleapis.com/auth/userinfo.email: View your email address

````