Create a tag for a resource.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/tags"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"Owner\": { \"ModuleKey\": \"example\", \"ResourceKind\": \"example\", \"ContextResourceId\": \"example\", \"ResourceObjectId\": \"example\" }, \"TagName\": \"example\", \"Color\": \"example\", \"Category\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/tags';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"Owner":{"ModuleKey":"example","ResourceKind":"example","ContextResourceId":"example","ResourceObjectId":"example"},"TagName":"example","Color":"example","Category":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/tags \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "Owner": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "TagName": "example", "Color": "example", "Category": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Request payload to create a tag.
object
Stable identity of one Moltaro resource instance.
object
Tag name.
Optional color value.
Optional category.
Examplegenerated
{ "Owner": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "TagName": "example", "Color": "example", "Category": "example"}Request payload to create a tag.
object
Stable identity of one Moltaro resource instance.
object
Tag name.
Optional color value.
Optional category.
Examplegenerated
{ "Owner": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "TagName": "example", "Color": "example", "Category": "example"}Request payload to create a tag.
object
Stable identity of one Moltaro resource instance.
object
Tag name.
Optional color value.
Optional category.
Examplegenerated
{ "Owner": { "ModuleKey": "example", "ResourceKind": "example", "ContextResourceId": "example", "ResourceObjectId": "example" }, "TagName": "example", "Color": "example", "Category": "example"}Responses
Section titled “Responses”OK
object
Tag details.
object
Tag identifier.
Stable identity of one Moltaro resource instance.
object
Tag name.
Optional color value.
Optional category.
Creation timestamp.
Creator identifier, or null for legacy rows without attribution.
Creator display name.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Tag details.
object
Tag identifier.
Stable identity of one Moltaro resource instance.
object
Tag name.
Optional color value.
Optional category.
Creation timestamp.
Creator identifier, or null for legacy rows without attribution.
Creator display name.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example", "field": "example", "metadata": { "additionalProperty": "example" }, "correlationId": "example"}Not Found
object
Tag details.
object
Tag identifier.
Stable identity of one Moltaro resource instance.
object
Tag name.
Optional color value.
Optional category.
Creation timestamp.
Creator identifier, or null for legacy rows without attribution.
Creator display name.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}