Create

Prev Next
Post
/create/tag

Used to create a new tag or an attribute. Once created this can be updated using tag/tags methods or the profile import method.


For more information on attributes and tags review our dedicated guide.


Type identifiers

Attribute value types are created and displayed by their identifier:

Type IDType name
0String
1Number (legacy)
2Date (legacy)
3JSON (legacy)
4Boolean
5Number
6Integer
7Date
8DateTime
9Array
10Object
Body parameters
Create a string User Profile attribute
{
  "apptoken": "YOUR_APPTOKEN",
  "title": "first_purchase",
  "name": "first purchase",
  "type": 0,
  "attribute_profile": 1,
  "attribute_client": 0
}
object
apptoken
string Required

Your App token

title
string Required

Name of the attribute or tag used when setting it programmatically via an SDK/API call

name
string

Name displayed in the UI, used for a more human-friendly explainer

type
integer (int32)

Required for an attribute. See Type identifiers.

alias_id
string

Name of the tag for which this is an alias

attribute_profile
integer (int32)

Link attribute to User Profiles. Default 0.

attribute_client
integer (int32)

Link attribute to Device Profiles. Default 0.

Responses
200

200

Result
{
  "success": true,
  "code": 200,
  "message": "Tag is successfully created",
  "model": {
    "id": 60011986,
    "project_id": "PROJECT_ID",
    "title": "first_purchase",
    "name": "first purchase",
    "attribute_client": 0,
    "attribute_profile": 1,
    "type": 0
  }
}
Expand All
object
success
boolean
Defaulttrue
Exampletrue
code
integer
Default0
Example200
message
string
ExampleTag is successfully created
model
object
id
integer
Default0
Example60011986
project_id
string
ExamplePROJECT_ID
title
string
Examplefirst_purchase
name
string
Examplefirst purchase
alias_id
attribute_client
integer
Default0
Example0
attribute_profile
integer
Default0
Example1
attribute_external
index_value
type
integer
Default0
Example0
is_deleted
400

400

Tag already exists in this project
{
  "success": false,
  "code": 400,
  "message": "Tag is not created",
  "errors": {
    "title": [
      "The combination \"2780\"-\"Test Attribute 1\" of Project and Tag has already been taken."
    ]
  }
}
Expand All
object
success
boolean
Defaulttrue
Examplefalse
code
integer
Default0
Example400
message
string
ExampleTag is not created
errors
object
title
Array of string
string