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

# Execute

> Execute an automation with optional parameters (authenticated users, no API key required)



## OpenAPI

````yaml post /api/organizations/{org_id}/automations/{run_id}/execute
openapi: 3.1.0
info:
  title: Axion Backend API
  description: Backend API for Axion platform with desktop automation capabilities
  version: 1.0.0
servers:
  - url: https://api.getgranite.ai
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Organizations
    description: Organization management and membership
  - name: Health
    description: API health and status monitoring
  - name: Automations
    description: Automation planning and execution
  - name: MIG
    description: Managed Instance Group operations
  - name: Agent
    description: Agent execution and streaming
  - name: Onboarding
    description: Organization onboarding flow
  - name: Organization Automations
    description: Organization automation endpoint management
  - name: Organization Endpoints
    description: Public endpoints for organization automations
  - name: Analytics
    description: Analytics and reporting endpoints
paths:
  /api/organizations/{org_id}/automations/{run_id}/execute:
    post:
      tags:
        - Automation Execution
      summary: Execute an automation manually
      description: >-
        Execute an automation with optional parameters (authenticated users, no
        API key required)
      operationId: executeAutomation
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            title: Org Id
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            title: Run Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteAutomationRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionResultResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ExecuteAutomationRequest:
      properties:
        parameters:
          anyOf:
            - items:
                $ref: '#/components/schemas/ParameterValue'
              type: array
            - type: 'null'
          title: Parameters
          description: Parameter overrides for execution
        timeout:
          anyOf:
            - type: integer
              maximum: 3600
              minimum: 1
            - type: 'null'
          title: Timeout
          description: Execution timeout in seconds
          default: 300
      type: object
      title: ExecuteAutomationRequest
      description: Request to execute an automation.
    ExecutionResultResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether execution succeeded
        run_id:
          type: string
          title: Run Id
          description: RPA run ID
        execution_id:
          type: string
          title: Execution Id
          description: Execution record ID
        return_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Return Code
          description: Process return code
        stdout:
          anyOf:
            - type: string
            - type: 'null'
          title: Stdout
          description: Standard output
        stderr:
          anyOf:
            - type: string
            - type: 'null'
          title: Stderr
          description: Standard error
        execution_time:
          anyOf:
            - type: number
            - type: 'null'
          title: Execution Time
          description: Execution time in seconds
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if failed
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
          description: Structured output data from script
      type: object
      required:
        - success
        - run_id
        - execution_id
      title: ExecutionResultResponse
      description: Execution result response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ParameterValue:
      properties:
        name:
          type: string
          title: Name
          description: Parameter name
        value:
          title: Value
          description: Parameter value
      type: object
      required:
        - name
        - value
      title: ParameterValue
      description: Parameter name/value pair for execution.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````