---
title: "Create a command"
method: POST
path: "/api/v4/commands"
tags: ["commands"]
---

# Create a command

`POST /api/v4/commands`

Create a command for a team.
##### Permissions
`manage_slash_commands` for the team the command is in.

## Request body

- object
  - `team_id` string, required — Team ID to where the command should be created
  - `method` string, required — `'P'` for post request, `'G'` for get request
  - `trigger` string, required — Activation word to trigger the command
  - `url` string, required — The URL that the command will make the request

## Response `201`

Command creation 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
- `501` — Feature is disabled

---

[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)
