Skip to main content
POST
/
tags
/
assign
Assign Tags to Template
curl --request POST \
  --url https://api.promptmetrics.dev/tags/assign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "template_id": "64template123"
}
'
{
  "responseData": {
    "data": {
      "assigned": [
        {
          "_id": "<string>",
          "name": "<string>",
          "workspace_id": "<string>",
          "status": "ACTIVE",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      ],
      "not_found": [
        "<string>"
      ],
      "total_assigned": 123
    }
  },
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
template_id
string
required
tags_ids
string[]

Array of tag IDs. Empty array removes all tags.

Response

Tags assigned

responseData
object
message
string