---
title: "Create a tag"
method: POST
path: "/tags"
tags: ["Tags"]
---

# Create a tag

`POST /tags`

## Request

- Base URL: `https://socialbu.com/api/v1`
- URL: `https://socialbu.com/api/v1/tags`
- Auth: HTTP bearer

Creates a new tag, either personal or scoped to a team. A team `type=post` tag requires `posts.create` or `posts.edit`; a team `type=inbox` tag requires `inbox.manage`.

## Request body

- object
  - `name` string, required
  - `team_id` integer: Team ID to create the tag under. Omit to create a personal tag.
  - `color` string, nullable: Hex color. Any valid 6-digit hex color is accepted. Omit for the default (uncolored) look.
  - `type` 'post' | 'inbox', required: Whether this is a post tag or an inbox tag. Tags are no longer shared between the two.

## Response `200`

Tag created successfully.

- object
  - `message` string
  - `tag` string: The created tag's name.
  - `id` integer: The created tag's id.
  - `color` string, nullable
  - `can_manage` boolean: Whether the requesting user can also rename/delete this tag — see the Tag schema. A create-only team member gets `false` even for a tag they just created.

## Other responses

- `400`: Tag already exists.
- `403`: You do not have permission to create a tag for this team.
- `422`: Validation failed (e.g. missing/invalid `type`, or `color` not a valid `#RRGGBB` hex string).

---

[API](https://skmtc.dev/socialbu/apis/socialbu-api.md) · [All operations](https://skmtc.dev/socialbu/apis/socialbu-api/llms.txt) · [OpenAPI document](https://skmtc.dev/socialbu/apis/socialbu-api/revisions/841b3ab0f671?raw)
