> This page is for Schema Service, version v3 (latest) (default).
> For other versions, use one of these documentation indexes:
> - v3 (latest) (default): https://autodesk.ferndocs.com/schema/schema-service/v3/llms.txt
> - v2: https://autodesk.ferndocs.com/schema/schema-service/v2/llms.txt

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

# Place Tags on Schema

POST https://developer-stg.api.autodesk.com/schema/v3/tag-collections/{tagCollectionId}/resources
Content-Type: application/json

Associates Tags with Schema. You can associate multiple Tags with multiple schema using a single call to this endpoint.

If the Tag Collection that the Tag belongs to was created for a library, you can associate the Tag to any schema that belongs to that library. If the Tag Collection was created for a group, you can associate the Tag with any schema that belongs to that group, no matter what library the schema belongs to.

You must have `write` access to a schema to associate Tags with schema in that library. For more information see `Control Access </en/docs/schema/v3/developers_guide/basics/access/>`\_ under API Basics.

**Important:**  Each time you submit a request to this endpoint, the backend reindexes the Tags. Each time you submit a request to this endpoint, the backend reindexes the Tags. So, pack as many Tag Associations as you can into one request. As a result, the number of calls to this endpoint reduces, which then reduces the overhead on the backend.

Reference: https://autodesk.ferndocs.com/schema/schema-service/api-reference/tags-api/tag-associations/attach-tags-to-resources

## Authentication

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

## Servers

- `https://developer-stg.api.autodesk.com/schema/v3` (The URL for Staging environment, default)
- `https://developer-dev.api.autodesk.com/schema/v3` (The URL for Development environment)
- `https://developer.api.autodesk.com/schema/v3` (The URL for Production environment)

## Request

### Path parameters

- `tagCollectionId` (string, required)

### Query parameters

- `scope` (string, optional) — The value used to define the boundary in which the schema associated with the Tag. This parameter can be used and particularly useful when getting the list of Tagged Schema. Valid value must be filled in by the group name and library name respectively in this pattern: ``group.library`` Sample value- ``test.fcstutorials.anothertagssandbox``

### Headers

- `Region` (enum, optional, default: US) — The Autodesk Schema Registry currently supports in the US and EMEA regions. This header specifies where your data is stored. Possible Values: - ``US`` - (Default) All requests without a specified region header will be directed to the US region. - ``EMEA`` - Data center for the European Union, Middle East, and Africa. To access the EMEA region specifically, include the header "region: EMEA" in your API requests.
  - Allowed values: `US`, `EMEA`

### Body (application/json)

This endpoint expects a TagResourceRequest.

- `tagIds` (list of any, optional) — An array of Tag IDs. All the Tags in this array will be associated with the schemas represented by the ``resourceIds`` array.
- `resourceIds` (list of any, optional) — An array containing the IDs of schema. Each schema will be associated with the Tags in the array ``tagIds``.

## Response

### 207

Multiple operations have been attempted and a single response code is not able to convey the results of all operations. Check the response body for failures, if any. Every successful association contains a system-generated id attribute for the association that was created. Failed associations contain an ``errors`` object.

- `list of TagCollectionsTagCollectionIdResourcesPostResponsesContentApplicationJsonSchemaItems`

## Errors

### 400 Bad Request Error

The Autodesk Schema Registry was not able to decipher your request. Check the request body for malformed request syntax or invalid request message framing before you try again.

- `type` (string, optional) — UTF-8 encoded string
- `title` (string, optional) — UTF-8 encoded string
- `detail` (string, optional) — User-friendly error message.
- `errors` (list of ErrorDetail, optional) — This property will contains relevant error details.

### 401 Unauthorized Error

The request did not have a valid access token. Obtain a fresh access token and try again.

- `type` (string, optional) — UTF-8 encoded string
- `title` (string, optional) — UTF-8 encoded string
- `detail` (string, optional) — User-friendly error message.
- `errors` (list of ErrorDetail, optional) — This property will contains relevant error details.

### 403 Forbidden Error

You do not have permission to perform the operation specified by the request. Contact your LIBRARY_ADMIN and resolve any permission issues before trying this request again.

- `type` (string, optional) — UTF-8 encoded string
- `title` (string, optional) — UTF-8 encoded string
- `detail` (string, optional) — User-friendly error message.
- `errors` (list of ErrorDetail, optional) — This property will contains relevant error details.

### 429 Too Many Requests Error

You have exceeded the Rate Limit for the requested resource. Check the ``retry-after`` response header and send the request again, after the specified time period has elapsed.

- `type` (string, optional) — UTF-8 encoded string
- `title` (string, optional) — UTF-8 encoded string
- `detail` (string, optional) — User-friendly error message.
- `errors` (list of ErrorDetail, optional) — This property will contains relevant error details.

## Types

### TagCollectionsTagCollectionIdResourcesPostResponsesContentApplicationJsonSchemaItems

- `createTime` (string, optional) — A TimeISO 8601 Timestamp in UTC Timezone indicating when the association was created.
- `createdBy` (string, optional) — If a three-legged access token was used to create the association, contains the Autodesk ID (Oxygen ID) of the person who associated the Tag to the schema. If a two-legged access token was used to create the category, contains the Client ID of the app that associated it.
- `errors` (list of ErrorDetail, optional) — An object containing the details of any errors that occured while creating the association.
- `lastModifiedBy` (string, optional) — If a three-legged access token was used to modify the association, contains the Autodesk ID (Oxygen ID) of the person who associated the Tag to the schema. If a two-legged access token was used to create the category, contains the Client ID of the app that associated it.
- `lastModifiedTime` (string, optional) — A TimeISO 8601 Timestamp in UTC Timezone indicating when the category was last modified.
- `resourceId` (string, optional) — he ID of the schema associated with Tags.
- `tags` (list of TagResourcecReplaceTagsItems, optional) — An array containing the Tags the schema is associated with.

### ErrorDetail

Error response model according to the APS standard

- `type` (string, optional) — Specifies the type of the error that occured.
- `title` (string, optional) — Contains a summary of the error.
- `detail` (string, optional) — Contains a detailed description of the error that occured, and sometimes, tips on how to fix the error.

### TagResourcecReplaceTagsItems

- `scope` (string, required) — Scope is for filtering purpose. Currently, it should be 'groupName' or 'groupName.libraryName'.
- `tagCollectionId` (string, optional) — The Tag Collection the Tags belong to.
- `tagIds` (list of string, optional) — The IDs of the Tags associated with the schema.

## Examples

### Standard

**Request**

```json
{
  "tagIds": [
    "ABVA-50841-HZUG-93173",
    "ABVA-50841-JAZR-07730"
  ],
  "resourceIds": [
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"
  ]
}
```

**Response**

```json
[
  {
    "createTime": "2018-07-18T09:46:33Z",
    "createdBy": "BQ6UMP8XQHSX",
    "lastModifiedBy": "BQ6UMP8XQHSX",
    "lastModifiedTime": "2018-07-19T08:56:16Z",
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "id": "ABXL-12780-CCFA-03498",
    "tagId": "ABVA-50841-HZUG-93173"
  },
  {
    "createTime": "2018-07-18T09:46:33Z",
    "createdBy": "BQ6UMP8XQHSX",
    "lastModifiedBy": "BQ6UMP8XQHSX",
    "lastModifiedTime": "2018-07-19T08:56:16Z",
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "id": "ABXL-13484-DCLR-86534",
    "tagId": "ABVA-50841-JAZR-07730"
  },
  {
    "createTime": "2018-07-18T09:46:33Z",
    "createdBy": "BQ6UMP8XQHSX",
    "lastModifiedBy": "BQ6UMP8XQHSX",
    "lastModifiedTime": "2018-07-19T08:56:16Z",
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0",
    "id": "ABXL-13484-DCBP-15017",
    "tagId": "ABVA-50841-HZUG-93173"
  },
  {
    "errors": [
      {
        "detail": "The resource has been attached by the same Tag"
      }
    ],
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0",
    "tagId": "ABVA-50841-JAZR-07730"
  }
]
```

**SDK Code**

```python Standard
import requests

url = "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources"

payload = {
    "tagIds": ["ABVA-50841-HZUG-93173", "ABVA-50841-JAZR-07730"],
    "resourceIds": ["propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0", "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Standard
const url = 'https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tagIds":["ABVA-50841-HZUG-93173","ABVA-50841-JAZR-07730"],"resourceIds":["propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0","propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"]}'
};

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

```go Standard
package main

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

func main() {

	url := "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources"

	payload := strings.NewReader("{\n  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\"\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\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 Standard
require 'uri'
require 'net/http'

url = URI("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")

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  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\"\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\"\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources', [
  'body' => '{
  "tagIds": [
    "ABVA-50841-HZUG-93173",
    "ABVA-50841-JAZR-07730"
  ],
  "resourceIds": [
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Standard
using RestSharp;

var client = new RestClient("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\"\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Standard
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "tagIds": ["ABVA-50841-HZUG-93173", "ABVA-50841-JAZR-07730"],
  "resourceIds": ["propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0", "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")! 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()
```

### Attach Invalid Tag To Resources (resulted in HTTP 400)

**Response**

```json
[
  {
    "errors": [
      {
        "title": "Bad Request",
        "detail": "The tag id must not be empty.",
        "id": "2",
        "code": "400"
      }
    ]
  }
]
```

**SDK Code**

```python Attach Invalid Tag To Resources (resulted in HTTP 400)
import requests

url = "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources"

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

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

print(response.json())
```

```javascript Attach Invalid Tag To Resources (resulted in HTTP 400)
const url = 'https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources';
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 Attach Invalid Tag To Resources (resulted in HTTP 400)
package main

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

func main() {

	url := "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources"

	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 Attach Invalid Tag To Resources (resulted in HTTP 400)
require 'uri'
require 'net/http'

url = URI("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")

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 Attach Invalid Tag To Resources (resulted in HTTP 400)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Attach Invalid Tag To Resources (resulted in HTTP 400)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Attach Invalid Tag To Resources (resulted in HTTP 400)
using RestSharp;

var client = new RestClient("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Attach Invalid Tag To Resources (resulted in HTTP 400)
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")! 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()
```

### Attach Invalid Tag to Resources

**Request**

```json
{
  "tagIds": [
    "ABVA-50841-HZUG-93173",
    "ABVA-50841-JAZR-07730",
    "",
    null
  ],
  "resourceIds": [
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"
  ]
}
```

**Response**

```json
[
  {
    "createTime": "2018-07-18T09:46:33Z",
    "createdBy": "BQ6UMP8XQHSX",
    "lastModifiedBy": "BQ6UMP8XQHSX",
    "lastModifiedTime": "2018-07-19T08:56:16Z",
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "id": "ABXL-12780-CCFA-03498",
    "tagId": "ABVA-50841-HZUG-93173"
  },
  {
    "createTime": "2018-07-18T09:46:33Z",
    "createdBy": "BQ6UMP8XQHSX",
    "lastModifiedBy": "BQ6UMP8XQHSX",
    "lastModifiedTime": "2018-07-19T08:56:16Z",
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "id": "ABXL-13484-DCLR-86534",
    "tagId": "ABVA-50841-JAZR-07730"
  },
  {
    "createTime": "2018-07-18T09:46:33Z",
    "createdBy": "BQ6UMP8XQHSX",
    "lastModifiedBy": "BQ6UMP8XQHSX",
    "lastModifiedTime": "2018-07-19T08:56:16Z",
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0",
    "id": "ABXL-13484-DCBP-15017",
    "tagId": "ABVA-50841-HZUG-93173"
  },
  {
    "errors": [
      {
        "detail": "The resource has been attached by the same Tag"
      }
    ],
    "resourceId": "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0",
    "tagId": "ABVA-50841-JAZR-07730"
  }
]
```

**SDK Code**

```python Attach Invalid Tag to Resources
import requests

url = "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources"

payload = {
    "tagIds": ["ABVA-50841-HZUG-93173", "ABVA-50841-JAZR-07730", "", None],
    "resourceIds": ["propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0", "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Attach Invalid Tag to Resources
const url = 'https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tagIds":["ABVA-50841-HZUG-93173","ABVA-50841-JAZR-07730","",null],"resourceIds":["propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0","propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"]}'
};

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

```go Attach Invalid Tag to Resources
package main

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

func main() {

	url := "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources"

	payload := strings.NewReader("{\n  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\",\n    \"\",\n    null\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\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 Attach Invalid Tag to Resources
require 'uri'
require 'net/http'

url = URI("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")

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  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\",\n    \"\",\n    null\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\n  ]\n}"

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

```java Attach Invalid Tag to Resources
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\",\n    \"\",\n    null\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\n  ]\n}")
  .asString();
```

```php Attach Invalid Tag to Resources
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources', [
  'body' => '{
  "tagIds": [
    "ABVA-50841-HZUG-93173",
    "ABVA-50841-JAZR-07730",
    "",
    null
  ],
  "resourceIds": [
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0",
    "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Attach Invalid Tag to Resources
using RestSharp;

var client = new RestClient("https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tagIds\": [\n    \"ABVA-50841-HZUG-93173\",\n    \"ABVA-50841-JAZR-07730\",\n    \"\",\n    null\n  ],\n  \"resourceIds\": [\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0\",\n    \"propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Attach Invalid Tag to Resources
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "tagIds": ["ABVA-50841-HZUG-93173", "ABVA-50841-JAZR-07730", "", ],
  "resourceIds": ["propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:56ac5f4204e64a538e28c0caae489cda-1.0.0", "propertySets:unifiedparameters.c544da50cdd5463f81dbdaf15f95baf3:b4af06d0896246e7b8814e530735a87c-1.1.0"]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://developer-stg.api.autodesk.com/schema/v3/tag-collections/tagCollectionId/resources")! 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()
```