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

# Commands / Create

> Creates a control command. Required permission: control:commands:create



## OpenAPI

````yaml /api/core-api/crmiapi.json post /api/v1/control/commands
openapi: 3.1.1
info:
  title: chargecloud - Core API
  summary: chargecloud Core API. All around CRM, Asset Management and more.
  version: 1.125.0
  description: chargecloud Core API. All around CRM, Asset Management and more.
servers:
  - url: https://api.chargecloud.dev
    description: Production - chargecloud Core API
  - url: https://demo.chargecloud.de
    description: Sandbox/Dev - chargecloud Core API
security: []
paths:
  /api/v1/control/commands:
    post:
      tags:
        - Commands
      summary: Commands / Create
      description: 'Creates a control command. Required permission: control:commands:create'
      operationId: /api/v1/control/commands_POST
      requestBody:
        description: >-
          Creates a control command. Required permission:
          control:commands:create
        content:
          application/json:
            schema:
              type: object
              required:
                - target_type
                - target_uuid
                - type
              properties:
                target_type:
                  type: string
                  enum:
                    - controller
                    - connector
                    - charging_session
                  description: Target entity type
                target_uuid:
                  type: string
                  description: Target entity UUID
                type:
                  type: string
                  enum:
                    - soft_reset
                    - hard_reset
                    - unlock
                    - refresh_configuration
                    - remote_stop
                  description: Command type
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                type: object
                required:
                  - command
                properties:
                  command:
                    type: object
                    properties:
                      command_uuid:
                        type: string
                        description: Command UUID
                      target_type:
                        type: string
                        enum:
                          - controller
                          - connector
                          - charging_session
                        description: Target entity type
                      target_uuid:
                        type: string
                        description: Target entity UUID
                      type:
                        type: string
                        enum:
                          - soft_reset
                          - hard_reset
                          - clear_cache
                          - change_availability
                          - unlock
                          - identify
                          - update_firmware
                          - request_diagnostics
                          - refresh_configuration
                          - remote_start
                          - remote_stop
                          - reserve
                          - cancel_reservation
                          - set_charging_profile
                          - clear_charging_profile
                        description: Command type
                      status:
                        type: string
                        enum:
                          - pending
                          - sent
                          - accepted
                          - rejected
                          - timeout
                          - failed
                        description: Command status
                      result:
                        type: object
                        properties:
                          status:
                            type: string
                            description: >-
                              OCPP broker status, present when the command
                              reached the broker
                          error:
                            type: string
                            description: Failure key, present when the command failed
                        description: Execution result envelope, null while pending/sent
                      created_at:
                        type: string
                        format: date-time
                        pattern: >-
                          ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$
                        description: Creation timestamp
                      completed_at:
                        type: string
                        format: date-time
                        pattern: >-
                          ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|[+-]\d{2}:\d{2})$
                        description: Completion timestamp, null while pending/sent
                    required:
                      - command_uuid
                      - target_type
                      - target_uuid
                      - type
                      - status
                      - result
                      - created_at
                      - completed_at
                    description: Command
          description: Command accepted
        '401':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Not found
        '405':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Method not allowed
        '422':
          content:
            application/json:
              schema:
                type: object
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        errorKey:
                          type: string
                          description: A key identifying the error
                        message:
                          type: string
                          description: The error message
                        parameter:
                          type: string
                          description: The parameter that caused the error, if any
                      required:
                        - errorKey
                        - message
                        - parameter
                      description: Error
                    description: List of errors
          description: Request validation failed
        '429':
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                    description: Error message
          description: Too many requests
      security:
        - bearer:
            - control:commands
components:
  securitySchemes:
    bearer:
      type: http
      description: OAuth2 Bearer Authorization
      scheme: bearer
      bearerFormat: JWT

````

## Related topics

- [Commands / Read](/api-reference/commands/commands-read.md)
- [Commands / List](/api-reference/commands/commands-list.md)
- [Creates a contract](/api-reference/contracts/creates-a-contract.md)
