> This page is for version Generative (default).
> For other versions, use one of these documentation indexes:
> - Generative (default): https://developers.ada.cx/generative/llms.txt
> - Scripted: https://developers.ada.cx/scripted/llms.txt

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

# Upsert multiple tags

POST https://example.ada.support/api/v2/knowledge/bulk/tags/
Content-Type: application/json

Upsert an array of tags for articles

This endpoint will create or update tags based on the unique `id` field of each tag. If a tag with the same `id` already exists, it will be updated. Otherwise, a new tag will be created.


Reference: https://developers.ada.cx/reference/knowledge/tags/upsert-multiple

## Authentication

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

## Request

### Body (application/json)

This endpoint expects a list of ArticleTag.

- `list of ArticleTag`

## Response

### 200

Tags upserted

- `list of ArticleTagUpsertResponse`

## Types

### ArticleTag

- `id` (string, required) — A unique identifier for the tag
- `name` (string, required) — The name of the tag

### ArticleTagUpsertResponse

- `success` (boolean, required) — Whether the article tag was successfully created/updated
- `created` (boolean, required) — `True` if a new article tag was created, `false` if an existing article tag was updated
- `id` (string, required) — The id of the article tag

## Examples

**Response**

```json
[
  {
    "success": true,
    "created": true,
    "id": "5df263b7db5a7e6ea03fae9b"
  }
]
```

**SDK Code**

```python 
import requests

url = "https://example.ada.support/api/v2/knowledge/bulk/tags/"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript 
const url = 'https://example.ada.support/api/v2/knowledge/bulk/tags/';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://example.ada.support/api/v2/knowledge/bulk/tags/"

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

	req.Header.Add("Authorization", "Bearer <token>")

	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://example.ada.support/api/v2/knowledge/bulk/tags/")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

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://example.ada.support/api/v2/knowledge/bulk/tags/")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://example.ada.support/api/v2/knowledge/bulk/tags/', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp 
using RestSharp;

var client = new RestClient("https://example.ada.support/api/v2/knowledge/bulk/tags/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://example.ada.support/api/v2/knowledge/bulk/tags/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

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()
```