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

# Trigger a Command for Entity

> Sends a new Command for immediate execution and returns the new Command.



## OpenAPI

````yaml post /v1/entities/{entityId}/commands
openapi: 3.0.4
info:
  title: Connect Command API
  description: Provides endpoints to manage entity commands.
  version: '1.0'
servers:
  - url: https://api.traxes.io/connect
security:
  - bearerAuth: []
tags:
  - name: Commands
    description: Provides operations for commands for collectives.
paths:
  /v1/entities/{entityId}/commands:
    post:
      tags:
        - Commands
      summary: Sends a new Command
      description: Sends a new Command for immediate execution and returns the new Command.
      operationId: post-sendasync
      parameters:
        - name: entityId
          in: path
          description: The id of the Entity
          required: true
          schema:
            type: string
            format: uuid
          example: 8667fb97-68f2-485a-87c7-f3bdfa9482e1
        - name: ignoreCooldown
          in: query
          description: >-
            Ignore internal cooldowns of the Entity. Using this may result in
            Commands not being executed!
          schema:
            type: boolean
            default: false
      requestBody:
        description: The Command to send
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Connect.Service.Command.App.Models.V1.CommandRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/Connect.Service.Command.App.Models.V1.CommandRequest
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/Connect.Service.Command.App.Models.V1.CommandRequest
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Connect.Service.Command.App.Models.V1.Command
components:
  schemas:
    Connect.Service.Command.App.Models.V1.CommandRequest:
      type: object
      properties:
        type:
          type: string
          description: The type of the command.
          nullable: true
        value:
          type: string
          description: The value for the command.
          nullable: true
      additionalProperties: false
      description: A command.
    Connect.Service.Command.App.Models.V1.Command:
      type: object
      properties:
        entityId:
          type: string
          description: The id of the entity.
          format: uuid
          nullable: true
        id:
          type: string
          description: The id of the command.
          format: uuid
        status:
          $ref: >-
            #/components/schemas/Connect.Service.Command.App.Models.V1.CommandStatus
        triggerTime:
          type: string
          description: The trigger time of command.
          format: date-time
        type:
          $ref: >-
            #/components/schemas/Connect.Service.Command.App.Models.V1.CommandType
        value:
          type: string
          description: The value for the issued command.
          nullable: true
        error:
          $ref: >-
            #/components/schemas/Connect.Service.Command.App.Models.V1.CommandError
        verification:
          $ref: >-
            #/components/schemas/Connect.Service.Command.App.Models.V1.CommandVerification
      additionalProperties: false
      description: A command.
    Connect.Service.Command.App.Models.V1.CommandStatus:
      enum:
        - Canceled
        - Failed
        - Pending
        - Sent
        - Succeeded
        - Triggered
      type: string
      description: Represents the different states of a command.
    Connect.Service.Command.App.Models.V1.CommandType:
      enum:
        - Disconnect
        - LimitFeedIn
        - Reset
        - StartCharging
        - StopCharging
        - StopFeedIn
      type: string
      description: Represents the available command types
    Connect.Service.Command.App.Models.V1.CommandError:
      type: object
      properties:
        title:
          type: string
          description: The title of the error.
          nullable: true
        description:
          type: string
          description: The description of the error.
          nullable: true
      additionalProperties: false
      description: Represents an error that occurred when command is validated or sent.
    Connect.Service.Command.App.Models.V1.CommandVerification:
      type: object
      properties:
        status:
          $ref: >-
            #/components/schemas/Connect.Service.Command.App.Models.V1.CommandVerificationStatus
        completedAt:
          type: string
          description: The date and time when the verification was completed at.
          format: date-time
          nullable: true
        error:
          $ref: >-
            #/components/schemas/Connect.Service.Command.App.Models.V1.CommandError
      additionalProperties: false
      description: Represents the verification state of a command.
    Connect.Service.Command.App.Models.V1.CommandVerificationStatus:
      enum:
        - Pending
        - Succeeded
        - Failed
        - Canceled
      type: string
      description: Represents the available command verification statuses.
  securitySchemes:
    bearerAuth:
      type: http
      description: Access Token Authentication
      scheme: bearer
      bearerFormat: JWT

````