---
schema: rendered-html/v1
title: "Apply Commands to Issues | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/api-usecase-commands.html
generated_at: 2026-06-11T15:01:13.995876+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
- REST API Use Cases
- Create an Issue
- Create an Issue and Set Custom Fields
- Get Issues List with All Values
- Get Value for an Issue Custom Field
- [Add Value to a Set](jetbrains__com__help__youtrack__devportal__api-usecase-add-value-to-bundle.md)
- Update Issue Custom Fields
- [Update a Text Field Value](jetbrains__com__help__youtrack__devportal__api-usecase-update-text-field-value.md)
- Clear Values of Custom Fields
- [Apply Commands to Issues](api-usecase-commands.html)
- Tag or Untag Issues
- [Work with Issue Tags](jetbrains__com__help__youtrack__devportal__api-usecase-work-with-tags.md)
- [Attach Files to an Issue](jetbrains__com__help__youtrack__devportal__api-usecase-attach-files.md)
- [Delete an Issue Attachment](jetbrains__com__help__youtrack__devportal__api-usecase-delete-issue-attachment.md)
- [Download an Issue Attachment](jetbrains__com__help__youtrack__devportal__api-usecase-download-issue-attachment.md)
- Link Issues
- [Get Issue History](jetbrains__com__help__youtrack__devportal__api-usecase-issue-history.md)
- [Get a Database Backup](jetbrains__com__help__youtrack__devportal__api-usecase-backup.md)
- Add User to Project Team
- REST API Troubleshooting
- Color Indices List
- Hub REST API

1. YouTrack REST API
2. REST API Use Cases
3. [Apply Commands to Issues](#0)

# Apply Commands to Issues﻿

Last modified: 07 May 2026

This page shows examples of how to apply a command to one or more issues in YouTrack using its REST API. Just as the commands in UI, its REST API implementation lets you perform operations with one or several issues much faster and easier.

## Minimal request to apply command﻿

> ### tip
>
> Required permissions: Update Issue

A minimal request for a command requires you to send in the request body a `query` to apply and a collection of `issues` that should be represented by their IDs.

> ### tip
>
> You can identify target issues by either their database entity ID (for example, `"id":"2-1234"`) or their human-readable ID, as you see them in UI (`"idReadable":"SDP-345"`).

```
curl -X POST 'https://example.youtrack.cloud/api/commands' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
-H 'Content-Type: application/json' \
-d '{
"query": "Fixed",
"issues": [ { "id": "2-17" } ] }'
```

For the sample minimal request without the `fields` parameter, the server sends a response with the `200 OK` status and an empty body.

## Command with a restricted visibility of its comment﻿

> ### tip
>
> Required permissions: Update Issue

The following request assigns the specific issue to the current user and adds a new comment with restricted visibility.

```
curl -X POST 'https://example.youtrack.cloud/api/commands' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
-H 'Content-Type: application/json' \
-d '{
  "query":"for me ",
  "issues":[{"id":"2-15"}],
  "silent":false,
  "comment":"Still cannot reproduce.",
  "visibility":
    {
    "$type":"CommandLimitedVisibility",
    "permittedGroups":[{"id":"3-2"}]
    }
  }'
```

The following request adds a tag to three issues and assigns them to user "jane.doe".

```
curl -L -X POST 'https://example.youtrack.cloud/api/commands' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \
--data-raw '{
"query":"tag To deploy for jane.doe",
"issues":[{"idReadable":"SP-3967"},{"idReadable":"SP-4032"},{"idReadable":"SP-3990"} ]
}'
```

## Apply a command silently﻿

> ### tip
>
> Required permissions: Update Issue

Now let's apply a command silently. That is, the following request instructs YouTrack to not send notifications about the change. Such silent commands come handy when you need to update a significant number of issues simultaneously; For example, when you plan the next version release, or a milestone, and need to set or change version field.

To apply a command silently, all you need to do is to specify in the request payload the attribute `"silent"` set to `true`. In this sample we identified issues by their database entity `id`, not "idReadable" as in previous samples.

```
curl -L -X POST 'https://example.youtrack.cloud/api/commands' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYNk7' \
--data-raw '{
"query":"Fix version 2021.1 ",
"issues":[{"id":"2-8456"},{"id":"2-8475"},{"id":"2-8476"},{"id":"2-8477"},{"id":"2-8480"},{"id":"2-8481"},{"id":"2-8482"},{"id":"2-8485"},
{"id":"2-8486"},{"id":"2-8489"},{"id":"2-8490"},{"id":"2-9000"},{"id":"2-9010"},{"id":"2-9011"} ],
"silent":true
}'
```

- [Apply Commands to Issues](/help/youtrack/devportal/api-usecase-commands.html)
- [Minimal request to apply command](/help/youtrack/devportal/api-usecase-commands.html#minimal-command)
- [Command with a restricted visibility of its comment](/help/youtrack/devportal/api-usecase-commands.html#command-with-comment-limited-visibility)
- [Apply a command silently](/help/youtrack/devportal/api-usecase-commands.html#apply-command-silently)

Clear Values of Custom FieldsTag or Untag Issues

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

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