Create Tag
Create a new tag
curl -X POST "https://app.nashra.ai/api/v1/tags" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "VIP",
"color": "#ff5733"
}'
import requests
import json
url = "https://app.nashra.ai/api/v1/tags"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "VIP",
"color": "#ff5733"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.nashra.ai/api/v1/tags", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"name": "VIP",
"color": "#ff5733"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "VIP",
"color": "#ff5733"
}`)
req, err := http.NewRequest("POST", "https://app.nashra.ai/api/v1/tags", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.nashra.ai/api/v1/tags')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"name": "VIP",
"color": "#ff5733"
}'
response = http.request(request)
puts response.body
{
"data": {
"uuid": "7b2d4c1e-3f5a-4e8d-9c6b-2a1f3e5d7c9b",
"name": "VIP",
"color": "#ff5733",
"created_at": "2025-01-15T10:30:00+00:00"
},
"meta": {}
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
POST
/tags
POST
Bearer Token
Bearer Tokenstring
RequiredAPI token generated in Settings > API Tokens
API token generated in Settings > API Tokens
Content-Typestring
RequiredThe media type of the request body
Options: application/json
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. API token generated in Settings > API Tokens
Responses
Was this page helpful?
Last updated Mar 2, 2026
Built with Documentation.AI