# Add a tag to an external page

Apply an existing tag to an external page. Returns the tag that was applied.
The tag must already exist in the workspace (create tags with the Tags API),
and the authenticating teammate must have the `manage_knowledge_base_content`
permission. Pages uploaded as files can't be tagged and return a 404.
OAuth tokens must have the `read_write_ai_content` scope.

Endpoint: POST /ai/external_pages/{external_page_id}/tags
Version: Preview
Security: bearerAuth

## Path parameters:

  - `external_page_id` (string, required)
    The unique identifier for the external page which is given by Intercom.

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `id` (string, required)
    The unique identifier of the tag to apply, as given by Intercom.
    Example: 7522907

  - `admin_id` (string)
    Optional id of the teammate to attribute the tagging to. Defaults to the authenticating teammate.
    Example: 1234

## Response 200 fields (application/json):

  - `type` (string)
    value is "tag"
    Example: tag

  - `id` (string)
    The id of the tag
    Example: 123456

  - `name` (string)
    The name of the tag
    Example: Test tag

  - `applied_at` (integer)
    The time when the tag was applied to the object. Only present when the tag is returned as part of a tagging operation on a contact, conversation, ticket, article, internal article, content snippet, or external page, when listing the tags on a contact, or when it is returned as part of an external page. `null` when the tag has just been removed from an article, internal article, content snippet or external page. Removing a tag from a contact, conversation or ticket returns the original value.
    Example: 1663597223

  - `applied_by` (object)
    The admin who applied the tag. Only present when the tag is returned as part of a tagging operation on a contact, conversation, ticket, article, internal article, content snippet, or external page, when listing the tags on a contact, or when it is returned as part of an external page. `null` when the tag has just been removed from an article, internal article, content snippet or external page. Removing a tag from a contact, conversation or ticket returns the original value. When no admin is recorded, `type` is `nobody_admin` and `id` is `null`.

  - `applied_by.type` (string)
    Example: contact

  - `applied_by.id` (string)
    Example: 1a2b3c

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (any, required)
    A string indicating the kind of error, used to further qualify the HTTP response code. A few request validation errors send an HTTP status code as an integer here instead, for example `422`.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 403 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (any, required)
    A string indicating the kind of error, used to further qualify the HTTP response code. A few request validation errors send an HTTP status code as an integer here instead, for example `422`.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 404 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (any, required)
    A string indicating the kind of error, used to further qualify the HTTP response code. A few request validation errors send an HTTP status code as an integer here instead, for example `422`.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

