---
schema: rendered-html/v1
title: "Commands | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/resource-api-commands.html
generated_at: 2026-06-11T15:11:53.774525+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Get Started with REST API
- REST API Reference
- Entities
- Resources
- Activity Items
- Issue Activities Page
- Build Bundles
- Enum Bundles
- Owned Bundles
- State Bundles
- User Bundles
- Version Bundles
- Custom Fields
- Field Types
- Backup Files
- Database Backup Settings
- Global Settings
- Organizations
- Projects
- Telemetry data
- Global Time Tracking Settings
- Agiles
- [Articles](jetbrains__com__help__youtrack__devportal__resource-api-articles.md)
- [Assigned Roles](jetbrains__com__help__youtrack__devportal__resource-api-assignedroles.md)
- [Commands](resource-api-commands.html)
- [Command Suggestions](jetbrains__com__help__youtrack__devportal__resource-api-commands-assist.md)
- [User Groups](jetbrains__com__help__youtrack__devportal__resource-api-groups.md)
- [Issue Link Types](jetbrains__com__help__youtrack__devportal__resource-api-issuelinktypes.md)
- Issue Tag
- Issues
- Issue Count
- Permissions
- Roles
- Saved Queries
- Search Suggestions
- Tags
- Users
- My User Profile
- Issue Work Items
- REST API Use Cases
- REST API Troubleshooting
- Color Indices List
- Hub REST API

1. YouTrack REST API
2. REST API Reference
3. Resources
4. [Commands](#0)

# Commands﻿

Last modified: 24 March 2026

This resource lets you apply commands to issues.

| Resource | ``` /api/commands ``` |
| --- | --- |
| Returned entity | CommandList. For the description of the entity attributes, see [Supported Fields](/help/youtrack/devportal/resource-api-commands.html#CommandList-supported-fields) section. |
| Supported methods | - `POST`: [Commands](/help/youtrack/devportal/resource-api-commands.html#create-CommandList-method). |

## CommandList attributes﻿

Represents list of command and related comment in YouTrack. Can be used to either apply a command or get command suggestions.

### Related Resources﻿

Below you can find the list of resources that let you work with this entity.

- Commands
- [Command Suggestions](jetbrains__com__help__youtrack__devportal__resource-api-commands-assist.md)

### Attributes﻿

This table describes attributes of the `CommandList` entity.

- To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.
- To update an attribute, provide it in the body of a POST request.

| Field | Type | Description |
| --- | --- | --- |
| id | String | The ID of the command list. `Read-only`. |
| comment | String | A comment to add to an issue. `Can be null`. |
| visibility | CommandVisibility | Stores visibility settings for a comment added with the command. |
| query | String | Stores a command to apply. `Can be null`. |
| caret | Int | Current caret position. End of current command by default. |
| silent | Boolean | If true, the command is applied without notification. The default value is false. |
| runAs | String | Login for a user on whose behalf the command is executed. To use the runAs parameter, you must have the Low-level Administration permission. `Can be null`. |
| commands | Array of ParsedCommands | Stores a collection of commands parsed from the provided query. `Read-only`. |
| issues | Array of Issues | Stores a collection of issues to which the current command applies. |
| suggestions | Array of Suggestions | Stores a collection of possible command suggestions. `Read-only`. |

## Execute a Command﻿

Applies a command to the specified issues.

Required fields: `query` - the command to apply, `issues` (`id` or `idReadable` of at least one issue that the command will be applied to).

### Request syntax﻿

```
POST /api/commands?{fields}&{muteUpdateNotifications}
```

| null | The database ID of CommandList |
| --- | --- |

### Request parameters﻿

| Parameter | Type | Description |
| --- | --- | --- |
| fields | String | A list of CommandList attributes that should be returned in the response. If no field is specified, only the `entityID` is returned. |
| muteUpdateNotifications | Boolean | Set this parameter to `true` if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules. Using this parameter requires Apply Commands Silently permission in all projects affected by the request. Available since 2021.3. |

### Sample 1﻿

A minimal request for a command requires you to send in the request body a query - the command to apply, and a collection of issues that should be represented at least by their IDs. For this sample minimal request without the `fields` parameter, the server sends a response with the `200 OK` status and an empty body.

#### Sample request﻿

```
https://example.youtrack.cloud/api/commands
```

#### Sample request body﻿

```
{
  "query": "Fixed",
  "issues": [
    {
      "idReadable": "SP-17"
  ]
```

### Sample 2﻿

The following request assigns the specific issue to the current user and adds a new comment with restricted visibility. The command is applied silently, without sending notifications.

#### Sample request﻿

```
https://example.youtrack.cloud/api/commands?fields=issues(id,idReadable),query,visibility(permittedGroups(id,name),permittedUsers(id,login))
```

#### Sample request body﻿

```
{
  "query": "for me ",
  "issues": [
    {
      "idReadable": "SP-16"
  ],
  "silent": true,
  "comment": "Still cannot reproduce.",
  "visibility": {
    "$type": "CommandLimitedVisibility",
    "permittedGroups": [
      {
        "id": "3-2"
    ]
```

#### Sample response body﻿

```
{
  "query": "for me ",
  "issues": [
    {
      "idReadable": "SP-16",
      "id": "2-15",
      "$type": "Issue"
  ],
  "visibility": {
    "permittedGroups": [
      {
        "id": "3-2"
    ],
    "$type": "CommandLimitedVisibility"
```

- [Commands](/help/youtrack/devportal/resource-api-commands.html)
- [CommandList attributes](/help/youtrack/devportal/resource-api-commands.html#CommandList-supported-fields)
- [Execute a Command](/help/youtrack/devportal/resource-api-commands.html#create-CommandList-method)

Operations with Specific AssignedRole[Command Suggestions](jetbrains__com__help__youtrack__devportal__resource-api-commands-assist.md)

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.
