---
title: "Update a command"
method: PUT
path: "/api/v4/commands/{command_id}"
tags: ["commands"]
---

# Update a command

`PUT /api/v4/commands/{command_id}`

Update a single command based on command id string and Command struct.
##### Permissions
Must have `manage_slash_commands` permission for the team the command is in.

## Path parameters

- `command_id` string, required

## Request body

- 38cb7293Command
  - `id` string — The ID of the slash command
  - `token` string — The token which is used to verify the source of the payload
  - `create_at` integer — The time in milliseconds the command was created
  - `update_at` integer — The time in milliseconds the command was last updated
  - `delete_at` integer — The time in milliseconds the command was deleted, 0 if never deleted
  - `creator_id` string — The user id for the commands creator
  - `team_id` string — The team id for which this command is configured
  - `trigger` string — The string that triggers this command
  - `method` string — Is the trigger done with HTTP Get ('G') or HTTP Post ('P')
  - `username` string — What is the username for the response post
  - `icon_url` string — The url to find the icon for this users avatar
  - `auto_complete` boolean — Use auto complete for this command
  - `auto_complete_desc` string — The description for this command shown when selecting the command
  - `auto_complete_hint` string — The hint for this command
  - `display_name` string — Display name for the command
  - `description` string — Description for this command
  - `url` string — The URL that is triggered

## Response `200`

Command updated successful

- 38cb7293Command
  - `id` string — The ID of the slash command
  - `token` string — The token which is used to verify the source of the payload
  - `create_at` integer — The time in milliseconds the command was created
  - `update_at` integer — The time in milliseconds the command was last updated
  - `delete_at` integer — The time in milliseconds the command was deleted, 0 if never deleted
  - `creator_id` string — The user id for the commands creator
  - `team_id` string — The team id for which this command is configured
  - `trigger` string — The string that triggers this command
  - `method` string — Is the trigger done with HTTP Get ('G') or HTTP Post ('P')
  - `username` string — What is the username for the response post
  - `icon_url` string — The url to find the icon for this users avatar
  - `auto_complete` boolean — Use auto complete for this command
  - `auto_complete_desc` string — The description for this command shown when selecting the command
  - `auto_complete_hint` string — The hint for this command
  - `display_name` string — Display name for the command
  - `description` string — Description for this command
  - `url` string — The URL that is triggered

## Other responses

- `400` — Invalid or missing parameters in URL or request body
- `401` — No access token provided
- `403` — Do not have appropriate permissions

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/158a854b0c7d/schema)
