Traccar Commands API

Sending commands to devices and stored command management

GitHub OpenAPI

Operations 8

GET /commands Fetch a list of Saved Commands #
POST /commands Create a Saved Command #
GET /commands/{id} Fetch a Saved Command #
PUT /commands/{id} Update a Saved Command #
DELETE /commands/{id} Delete a Saved Command #
GET /commands/send Fetch a list of Saved Commands supported by Device at the moment #
POST /commands/send Dispatch commands to device #
GET /commands/types Fetch a list of available Commands for the Device or all possible Commands if… #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/traccar:traccar-commands-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

traccar-commands-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Traccar Commands API
  description: Traccar GPS tracking server API documentation. To use the API you need to have a server instance. For testing purposes you can use one of free demo servers. For production use you can install your own server or get a subscription service.
  contact:
    name: Traccar Support
    url: https://www.traccar.org/
    email: support@traccar.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 6.17.0
servers:
- url: https://demo.traccar.org/api
  description: Demo Server 1
- url: https://demo2.traccar.org/api
  description: Demo Server 2
- url: https://demo3.traccar.org/api
  description: Demo Server 3
- url: https://demo4.traccar.org/api
  description: Demo Server 4
- url: https://server.traccar.org/api
  description: Subscription Server
- url: http://{host}:{port}/api
  description: Other Server
  variables:
    host:
      default: localhost
    port:
      enum:
      - '8082'
      - '80'
      default: '8082'
security:
- BasicAuth: []
- ApiKey: []
tags:
- name: Commands
  description: Sending commands to devices and stored command management
paths:
  /commands:
    get:
      operationId: getCommands
      summary: Fetch a list of Saved Commands
      x-mcp: true
      tags:
      - Commands
      description: Without params, it returns a list of Saved Commands the user has access to
      parameters:
      - name: all
        in: query
        description: Can only be used by admins or managers to fetch all entities
        schema:
          type: boolean
      - name: userId
        in: query
        description: Standard users can use this only with their own _userId_
        schema:
          type: integer
      - name: deviceId
        in: query
        description: Standard users can use this only with _deviceId_s, they have access to
        schema:
          type: integer
      - name: groupId
        in: query
        description: Standard users can use this only with _groupId_s, they have access to
        schema:
          type: integer
      - name: refresh
        in: query
        schema:
          type: boolean
      - name: limit
        in: query
        description: Limit the number of returned results
        schema:
          type: integer
      - name: offset
        in: query
        description: Offset for pagination
        schema:
          type: integer
      - name: keyword
        in: query
        description: Search keyword filter
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Command'
        '401':
          description: Unauthorized
          content: {}
    post:
      operationId: postCommands
      summary: Create a Saved Command
      tags:
      - Commands
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Command'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
        '401':
          description: Unauthorized
          content: {}
        '400':
          description: Bad request
          content: {}
  /commands/{id}:
    get:
      operationId: getCommandsId
      summary: Fetch a Saved Command
      tags:
      - Commands
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not found
          content: {}
    put:
      operationId: putCommandsId
      summary: Update a Saved Command
      tags:
      - Commands
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Command'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
        '401':
          description: Unauthorized
          content: {}
        '400':
          description: Bad request
          content: {}
    delete:
      operationId: deleteCommandsId
      summary: Delete a Saved Command
      tags:
      - Commands
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: No Content
          content: {}
        '401':
          description: Unauthorized
          content: {}
  /commands/send:
    get:
      operationId: getCommandsSend
      summary: Fetch a list of Saved Commands supported by Device at the moment
      description: Return a list of saved commands linked to Device and its groups, filtered by current Device protocol support
      tags:
      - Commands
      parameters:
      - name: deviceId
        in: query
        description: Standard users can use this only with _deviceId_s, they have access to
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Command'
        '400':
          description: Could happen when the user doesn't have permission for the device
          content: {}
    post:
      operationId: postCommandsSend
      summary: Dispatch commands to device
      description: Dispatch a new command or Saved Command if _body.id_ set
      tags:
      - Commands
      parameters:
      - name: groupId
        in: query
        description: Send the command to all devices in the group
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Command'
        required: true
      responses:
        '200':
          description: Command sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
        '202':
          description: Command queued
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/QueuedCommand'
                - type: array
                  items:
                    $ref: '#/components/schemas/QueuedCommand'
        '400':
          description: Could happen when the user doesn't have permission or an incorrect command _type_ for the device
          content: {}
  /commands/types:
    get:
      operationId: getCommandsTypes
      summary: Fetch a list of available Commands for the Device or all possible Commands if…
      tags:
      - Commands
      parameters:
      - name: deviceId
        in: query
        description: Internal device identifier. Only works if device has already reported some locations
        schema:
          type: integer
      - name: textChannel
        in: query
        description: When `true` return SMS commands. If not specified or `false` return data commands
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CommandType'
        '400':
          description: Could happen when trying to fetch from a device the user does not have permission
          content: {}
components:
  schemas:
    Command:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique saved command identifier
        deviceId:
          type: integer
          format: int64
          description: Target device identifier when the command is bound to one device
        description:
          type: string
          description: User friendly label displayed in the UI
        type:
          type: string
          description: Command type as defined by the device protocol
        textChannel:
          type: boolean
          description: Whether to send the command using the SMS channel
        attributes:
          type: object
          description: Additional parameters required by the command type
          properties: {}
    CommandType:
      type: object
      properties:
        type:
          type: string
          description: Command type identifier
    QueuedCommand:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Identifier of the queued command job
        deviceId:
          type: integer
          format: int64
          description: Device identifier the queued command will be delivered to
        type:
          type: string
          description: Command type that will be executed
        textChannel:
          type: boolean
          description: Indicates whether the queued command uses SMS delivery
        attributes:
          type: object
          description: Stored parameters for the queued command
          properties: {}
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    ApiKey:
      type: http
      scheme: bearer