Skip to main content

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

Bodyrequired

    name Name (string)required

    Human-readable name for the tag, used for display and organization

    Possible values: non-empty and <= 50 characters

Responses

Tag successfully created. Returns the complete tag object with generated ID.
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

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());
Request Collapse all
Body required
{
  "name": "premium-customer"
}