> ## 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. # Hit > Used to add a tag or update an attribute when an event occurs or an attribute changes outside your app, for example "balance.updated", "user.balance", etc. For more information on attributes and tags review our [dedicated guide](https://docs.xtremepush.com/docs/attributes-tags). ## OpenAPI ````json POST /hit/tag { "openapi": "3.1.0", "info": { "title": "external-api", "version": "1" }, "servers": [ { "url": "https://api.eu.xtremepush.com/api/external" } ], "paths": { "/hit/tag": { "post": { "summary": "Hit", "description": "Used to add a tag or update an attribute when an event occurs or an attribute changes outside your app, for example \"balance.updated\", \"user.balance\", etc.\n\nFor more information on attributes and tags review our [dedicated guide](https://docs.xtremepush.com/docs/attributes-tags).", "operationId": "tag-hit", "deprecated": "false", "requestBody": { "required": "true", "content": { "application/json": { "schema": { "type": "object", "required": [ "apptoken", "tag" ], "properties": { "apptoken": { "type": "string", "description": "Your App token" }, "device_id": { "type": "string", "description": "An ID used to identify the user. Use one of *device_id*, *device_external_id*, *device_token*, *device_idfa*, *device_adid*" }, "device_external_id": { "type": "string", "description": "An ID used to identify the user. Use one of *device_id*, *device_external_id*, *device_token*, *device_idfa*, *device_adid*" }, "device_token": { "type": "string", "description": "An ID used to identify the user. Use one of *device_id*, *device_external_id*, *device_token*, *device_idfa*, *device_adid*" }, "device_idfa": { "type": "string", "description": "An ID used to identify the user. Use one of *device_id*, *device_external_id*, *device_token*, *device_idfa*, *device_adid*" }, "device_adid": { "type": "string", "description": "An ID used to identify the user. Use one of *device_id*, *device_external_id*, *device_token*, *device_idfa*, *device_adid*" }, "tag": { "type": "string", "description": "The tag being hit, eg. `\"user.first_name\"`" }, "value": { "type": "string", "description": "The value associated with this tag" }, "timestamp": { "type": "string", "format": "date-time", "description": "Timestamp in ms to associate with the occurrence of the event or attribute change" }, "metric": { "type": "string", "description": "Used to set any associated metric" } } }, "examples": { "Set a user's first name attribute": { "value": { "apptoken": "YOUR_APPTOKEN", "device_id": "20", "tag": "user_first_name", "value": "Sam" } } } } } }, "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" } } }, "examples": { "Result": { "value": { "success": "true", "code": "200" } } } } } }, "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": "General error information" }, "errors": { "type": "array", "items": { "type": "object", "properties": { "text": { "type": "array", "items": { "type": "string" } } } } } } }, "examples": { "Result": { "value": { "success": "false", "code": "400", "message": "General error information", "errors": [ { "text": [ "Detailed information about the specific error" ] } ] } } } } } } }, "tags": [ "Tag Methods" ] } } } } ````