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

# Create fleet action

> Validate, repair, rotate, or otherwise operate endpoint fleet actions with dry-run and action-run records.



## OpenAPI

````yaml /openapi/forge-api.yaml post /api/headless/v1/organizations/{organizationId}/fleet/actions
openapi: 3.0.3
info:
  title: Forge API
  version: 0.1.0
  description: >-
    Automate Forge inventory, investigations, findings, governance, fleet,
    policy, configuration, compliance, MCP, service-account, and audit
    workflows.
servers:
  - url: https://api.forge.ai
    description: Forge production API
security:
  - serviceAccountBearer: []
tags:
  - name: approvals
    description: MCP approvals
  - name: audit
    description: Audit
  - name: capabilities
    description: Capabilities
  - name: compliance
    description: Compliance
  - name: findings
    description: Findings
  - name: fleet
    description: Fleet
  - name: governance
    description: Governance
  - name: inventory
    description: Inventory
  - name: investigation
    description: Investigations
  - name: managed-config
    description: Managed configuration
  - name: mcp
    description: MCP sessions
  - name: mcp-registry
    description: MCP and skill registry
  - name: operations
    description: operations
  - name: policies
    description: Policies and violations
  - name: service-accounts
    description: Service accounts
  - name: settings
    description: Automation settings
paths:
  /api/headless/v1/organizations/{organizationId}/fleet/actions:
    post:
      tags:
        - fleet
      summary: Create fleet action
      description: >-
        Validate, repair, rotate, or otherwise operate endpoint fleet actions
        with dry-run and action-run records.
      operationId: createHeadlessFleetAction
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeadlessFleetActionRequest'
      responses:
        '200':
          description: Fleet action dry-run preview.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '201':
          description: Fleet action created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessProxyResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
components:
  parameters:
    OrganizationId:
      name: organizationId
      in: path
      required: true
      schema:
        type: string
  schemas:
    HeadlessFleetActionRequest:
      allOf:
        - $ref: '#/components/schemas/HeadlessSafetyFields'
        - type: object
          required:
            - actionType
            - deviceIds
          properties:
            actionType:
              type: string
              enum:
                - check_health
                - repair_hooks
                - rotate_credential
                - install_agents
                - update_agents
                - remove_agent
                - offboard_device
            deviceIds:
              type: array
              items:
                type: string
            sourceAdapterKeys:
              type: array
              items:
                type: string
            rotateCredential:
              type: boolean
    HeadlessProxyResponse:
      type: object
      additionalProperties: true
    HeadlessSafetyFields:
      type: object
      required:
        - reason
        - idempotencyKey
        - confirm
      properties:
        reason:
          type: string
        idempotencyKey:
          type: string
        dryRun:
          type: boolean
        confirm:
          type: boolean
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
  responses:
    Error:
      description: Stable Forge error envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
  securitySchemes:
    serviceAccountBearer:
      type: http
      scheme: bearer
      bearerFormat: Forge service-account or delegated OAuth access token
      description: >-
        Enter a Forge service-account token or delegated OAuth access token.
        Mintlify adds the Bearer prefix.

````