# Create a tag `POST /api/v1/tags` Creates a tag. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Tags → Write**. ## Body parameters - `name` (string, required) — Name, up to 100 characters. - `tag_type` (string) — Use tag or accounting_category. Defaults to tag. - `direction` (string or null) — Use incoming or outgoing for accounting categories. - `selected` (boolean) — Select this as the default accounting category. ## Request Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/tags" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"name":"Season fees","tag_type":"accounting_category","direction":"incoming"}' ``` ## Response **201 Created** The created tag is returned in data. Example with fictional data and selected fields. ```json { "message_key": "entities.tag.messages.created", "data": { "id": 8, "name": "Season fees", "tag_type": "accounting_category", "direction": "incoming", "selected": false } } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `400` — The accounting category needs a valid direction. - `422` — One or more fields failed validation. - `500` — The change could not be saved.