> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.docs.siftsy.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.siftsy.com/_mcp/server.

# Create content tags

POST https://api.siftsy.app/analyst/v1/tags
Content-Type: application/json

Requires `posts:write`. Saves up to 25 tags on the key's team without
putting them on posts, the same as creating a tag in the app's tag
picker. They appear in `GET /tags` at `postCount: 0`. To tag posts,
use `POST /content/posts/tags`.

Tags are trimmed, a leading `#` is dropped, and each is at most 60
characters. A tag the team already has (on a post or saved, any
casing) keeps its existing spelling and comes back `created: false`.
Responds `201` when at least one tag is new, otherwise `200`.
Rate class `team_tags` (5 / minute, 100 / day per key).


Reference: https://api.docs.siftsy.com/api-reference/siftsy-analyst-api/create-tags

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `X-Api-Key` header (required) — API Key authentication via header

## Servers

- `https://api.siftsy.app/analyst/v1` (Production, default)
- `http://localhost:3000/analyst/v1` (Local development)

## Request

### Body (application/json)

This endpoint expects an object.

- `tags` (list of string, required)

## Response

### 200

Every tag already existed. Nothing changed.

- `data` (list of EnvelopeCreatedTagsDataItems, optional)
- `meta` (EnvelopeCreatedTagsMeta, optional)

### 201

At least one tag was created

- `data` (list of EnvelopeCreatedTagsDataItems, optional)
- `meta` (EnvelopeCreatedTagsMeta, optional)

## Errors

### 400 Bad Request Error

Invalid request

- `any`

### 403 Forbidden Error

Missing required scope

- `any`

## Types

### EnvelopeCreatedTagsDataItems

- `name` (string, optional) — The tag as the team spells it
- `created` (boolean, optional) — False when the team already had the tag

### EnvelopeCreatedTagsMeta

## Examples

### content_createTags_example

**Request**

```json
{
  "tags": [
    "paid",
    "holiday"
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "name": "string",
      "created": true
    }
  ],
  "meta": {}
}
```

**SDK Code**

```python content_createTags_example
import requests

url = "https://api.siftsy.app/analyst/v1/tags"

payload = { "tags": ["paid", "holiday"] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript content_createTags_example
const url = 'https://api.siftsy.app/analyst/v1/tags';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tags":["paid","holiday"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go content_createTags_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.siftsy.app/analyst/v1/tags"

	payload := strings.NewReader("{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby content_createTags_example
require 'uri'
require 'net/http'

url = URI("https://api.siftsy.app/analyst/v1/tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java content_createTags_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.siftsy.app/analyst/v1/tags")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}")
  .asString();
```

```php content_createTags_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.siftsy.app/analyst/v1/tags', [
  'body' => '{
  "tags": [
    "paid",
    "holiday"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp content_createTags_example
using RestSharp;

var client = new RestClient("https://api.siftsy.app/analyst/v1/tags");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift content_createTags_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["tags": ["paid", "holiday"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.siftsy.app/analyst/v1/tags")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "tags": [
    "paid",
    "holiday"
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "name": "string",
      "created": true
    }
  ],
  "meta": {}
}
```

**SDK Code**

```python
import requests

url = "https://api.siftsy.app/analyst/v1/tags"

payload = { "tags": ["paid", "holiday"] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.siftsy.app/analyst/v1/tags';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tags":["paid","holiday"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.siftsy.app/analyst/v1/tags"

	payload := strings.NewReader("{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.siftsy.app/analyst/v1/tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.siftsy.app/analyst/v1/tags")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.siftsy.app/analyst/v1/tags', [
  'body' => '{
  "tags": [
    "paid",
    "holiday"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.siftsy.app/analyst/v1/tags");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tags\": [\n    \"paid\",\n    \"holiday\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["tags": ["paid", "holiday"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.siftsy.app/analyst/v1/tags")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```