> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xtremepush.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Create
> 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 ID | Type name |
| 0 | String |
| 1 | Number (legacy) |
| 2 | Date (legacy) |
| 3 | JSON (legacy) |
| 4 | Boolean |
| 5 | Number |
| 6 | Integer |
| 7 | Date |
| 8 | DateTime |
| 9 | Array |
| 10 | Object |
## OpenAPI
````json POST /create/tag
{
"openapi": "3.1.0",
"info": {
"title": "external-api",
"version": "1"
},
"servers": [
{
"url": "https://api.eu.xtremepush.com/api/external"
}
],
"paths": {
"/create/tag": {
"post": {
"summary": "Create",
"description": "Used to create a new tag or an attribute. Once created this can be updated using tag/tags methods or the profile import method.\n\n
\n\nFor more information on attributes and tags review our dedicated guide.
\n\n
\n\n## Type identifiers\n\nAttribute value types are created and displayed by their identifier:
\n\n\n| Type ID | Type name |
\n\n| 0 | String |
\n| 1 | Number (legacy) |
\n| 2 | Date (legacy) |
\n| 3 | JSON (legacy) |
\n| 4 | Boolean |
\n| 5 | Number |
\n| 6 | Integer |
\n| 7 | Date |
\n| 8 | DateTime |
\n| 9 | Array |
\n| 10 | Object |
\n\n
",
"operationId": "tag-create",
"deprecated": "false",
"requestBody": {
"required": "true",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"apptoken",
"title"
],
"properties": {
"apptoken": {
"type": "string",
"description": "Your App token"
},
"title": {
"type": "string",
"description": "Name of the attribute or tag used when setting it programmatically via an SDK/API call"
},
"name": {
"type": "string",
"description": "Name displayed in the UI, used for a more human-friendly explainer"
},
"type": {
"type": "integer",
"format": "int32",
"description": "Required for an attribute. See Type identifiers."
},
"alias_id": {
"type": "string",
"description": "Name of the tag for which this is an alias"
},
"attribute_profile": {
"type": "integer",
"format": "int32",
"description": "Link attribute to User Profiles. Default `0`."
},
"attribute_client": {
"type": "integer",
"format": "int32",
"description": "Link attribute to Device Profiles. Default `0`."
}
}
},
"examples": {
"Create a string User Profile attribute": {
"value": {
"apptoken": "YOUR_APPTOKEN",
"title": "first_purchase",
"name": "first purchase",
"type": "0",
"attribute_profile": "1",
"attribute_client": "0"
}
}
}
}
}
},
"responses": {
"200": {
"description": "200",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": "true",
"default": "true"
},
"code": {
"type": "integer",
"example": "200",
"default": "0"
},
"message": {
"type": "string",
"example": "Tag is successfully created"
},
"model": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": "60011986",
"default": "0"
},
"project_id": {
"type": "string",
"example": "PROJECT_ID"
},
"title": {
"type": "string",
"example": "first_purchase"
},
"name": {
"type": "string",
"example": "first purchase"
},
"alias_id": {},
"attribute_client": {
"type": "integer",
"example": "0",
"default": "0"
},
"attribute_profile": {
"type": "integer",
"example": "1",
"default": "0"
},
"attribute_external": {},
"index_value": {},
"type": {
"type": "integer",
"example": "0",
"default": "0"
},
"is_deleted": {}
}
}
}
},
"examples": {
"Result": {
"value": {
"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"
}
}
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": "false",
"default": "true"
},
"code": {
"type": "integer",
"example": "400",
"default": "0"
},
"message": {
"type": "string",
"example": "Tag is not created"
},
"errors": {
"type": "object",
"properties": {
"title": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"examples": {
"Tag already exists in this project": {
"value": {
"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."
]
}
}
}
}
}
}
}
},
"tags": [
"Tag Methods"
]
}
}
}
}
````