Create Tag
POST/tags/
Creates a new tag with the specified name.
The tag ID is automatically generated and the creation timestamp is set to the current time. Tag names must be unique and follow the kebab-case format.
Request
- application/json
Bodyrequired
name Name (string)required
Human-readable name for the tag, used for display and organization
Possible values: non-empty
and <= 50 characters
Responses
- 201
- 422
Tag successfully created. Returns the complete tag object with generated ID.
- application/json
- Schema
- Example (auto)
- Example
Schema
id Id (string)required
Unique identifier for the tag in format 'tag_[alphanumeric]'
creation_utc date-timerequired
UTC timestamp of when the tag was created, in ISO 8601 format
name Name (string)required
Human-readable name for the tag, used for display and organization
Possible values: non-empty
and <= 50 characters
{
"creation_utc": "2024-03-24T12:00:00Z",
"id": "tag_123xyz",
"name": "premium"
}
{
"id": "tag_123xyz",
"name": "premium",
"creation_utc": "2024-03-24T12:00:00Z"
}
Invalid tag parameters. Ensure name follows required format.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.parlant.io/tags/");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"name\": \"premium-customer\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());