> ## Documentation Index
> Fetch the complete documentation index at: https://api.docs.flare.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Identifier

> Create an identifier in the tenant the caller is acting in and return it under `asset`. `data` must match the identifier `type`. An optional `assets_group_id` body attribute places the identifier in an existing identifier group. The new identifier counts against the organization and tenant identifier limits and against the monthly identifier rotation limit. Requires write access to the tenant's identifiers. Deprecated: use `POST /firework/v4/identifiers/` instead.

&#x20;Required API key permission: **Write Tenant**

> [!WARNING]
>
> **DEPRECATED:** This endpoint should be replaced by
> [/firework/v4/identifiers/ ](https://api.docs.flare.io/api-reference/v4/endpoints/identifiers/create-an-identifier.md)


## OpenAPI

````yaml firework-v2-openapi post /firework/v2/assets/
openapi: 3.0.1
info:
  description: >

    Manage and access Firework resources.


    Requests are authenticated with API tokens, which are obtained using an API
    key:


    1. Generate an API key from the [Profile
    page](https://app.flare.io/#/profile).

    2. Send a `POST` request to `https://api.flare.io/tokens/generate` with the
    `Authorization: <api-key>` header to get an API token. API tokens expire
    after 1 hour.

    3. Call the API endpoints with the `Authorization: Bearer <api-token>`
    header.


    See [Authentication](https://api.docs.flare.io/concepts/authentication) for
    details.
  title: Firework API
  version: v2
servers:
  - url: https://api.flare.io/
security:
  - BearerAuth: []
tags:
  - description: >-
      The authenticated user, its API keys, organizations, tenants, onboarding
      and usage.
    name: Account
  - description: >-
      Events collected by Flare: global search, tenant and identifier feeds,
      event details, actions and saved feed views.
    name: Events
  - description: >-
      Identifiers are the assets a tenant monitors, such as domains, keywords
      and email addresses. Includes recommendations and authorization of
      sensitive identifiers.
    name: Identifiers
  - description: Report groups, reports, their sections, schedules and delivery channels.
    name: Reports
paths:
  /firework/v2/assets/:
    post:
      tags:
        - Identifiers
      summary: Create an identifier
      description: >-
        Create an identifier in the tenant the caller is acting in and return it
        under `asset`. `data` must match the identifier `type`. An optional
        `assets_group_id` body attribute places the identifier in an existing
        identifier group. The new identifier counts against the organization and
        tenant identifier limits and against the monthly identifier rotation
        limit. Requires write access to the tenant's identifiers. Deprecated:
        use `POST /firework/v4/identifiers/` instead.
      operationId: post_assets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentifierCreate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/post_assets_200_response'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            Invalid body: `INVALID_IDENTIFIER_DATA` (data does not match the
            type), `RESTRICTED_IDENTIFIER` (sensitive term that is blocked),
            `INVALID_IDENTIFIER_GROUP` (unknown group) or
            `IDENTIFIER_ALREADY_EXISTS`.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            Identifier quota reached (`IDENTIFIERS_LIMIT_REACHED`,
            `TENANT_IDENTIFIERS_LIMIT_REACHED`), monthly rotation quota reached
            (`IDENTIFIER_ROTATION_LIMIT_REACHED`), search types or identifier
            type not allowed for the organization (for example
            `SEARCH_TYPES_NOT_ALLOWED`), or missing permission (`FORBIDDEN`).
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: The identifier could not be created (`FAILED_TO_CREATE_IDENTIFIER`).
      deprecated: true
components:
  schemas:
    IdentifierCreate:
      properties:
        name:
          description: Display name of the identifier.
          minLength: 1
          type: string
        type:
          description: Type of the identifier, which defines the shape of `data`.
          enum:
            - domain
            - name
            - keyword
            - github_repository
            - username
            - email
            - search_query
            - bin
            - ip
            - secret
            - azure_tenant
            - identity
            - ransomleak
            - external_id
            - address_data
            - birth_year
            - role
            - phone_number
          example: domain
          type: string
        search_types:
          description: Event types to monitor for the identifier.
          items:
            enum:
              - bot
              - chat_message
              - financial_data
              - leak
              - listing
              - ad
              - stealer_log
              - google
              - domain
              - valid_credential
              - seller
              - forum_topic
              - bucket
              - bucket_object
              - source_code_files
              - stack_exchange
              - source_code_secrets
              - docker
              - mitigated_credential
              - ransomleak
              - forum_profile
              - blog_post
              - paste
              - social_media_account
              - forum_post
              - service
              - invalid_credential
              - illicit_networks
              - open_web
              - buckets
              - source_code
              - leaks
              - domains
              - forum_content
              - blog_content
              - profile
              - ads
              - infected_devices
              - social_media
            example: bot
            type: string
          type: array
        experimental_search_types:
          description: Experimental event types to monitor for the identifier.
          items:
            type: string
          type: array
        risks:
          description: >-
            Risk scores to monitor for the identifier, from 1 (info) to 5
            (critical).
          items:
            type: integer
          type: array
        data:
          description: Value to monitor and its options; the attributes depend on `type`.
          properties: {}
          type: object
      required:
        - data
        - name
        - search_types
        - type
      type: object
    post_assets_200_response:
      properties:
        asset:
          $ref: '#/components/schemas/Identifier'
      type: object
    HttpError:
      properties:
        message:
          description: Human-readable description of the error.
          type: string
        code:
          description: Machine-readable error code.
          type: string
      type: object
    Identifier:
      properties:
        id:
          description: ID of the identifier.
          type: integer
        tenant_id:
          description: ID of the tenant that owns the identifier.
          type: integer
        feed_id:
          description: ID of the feed holding the identifier's events.
          type: integer
        type:
          description: Type of the identifier, which defines the shape of `data`.
          enum:
            - domain
            - name
            - keyword
            - github_repository
            - username
            - email
            - search_query
            - bin
            - ip
            - secret
            - azure_tenant
            - identity
            - ransomleak
            - external_id
            - address_data
            - birth_year
            - role
            - phone_number
          example: domain
          type: string
        search_types:
          description: Event types monitored for the identifier.
          items:
            enum:
              - bot
              - chat_message
              - financial_data
              - leak
              - listing
              - stealer_log
              - google
              - domain
              - valid_credential
              - seller
              - forum_topic
              - bucket
              - bucket_object
              - source_code_files
              - stack_exchange
              - source_code_secrets
              - docker
              - mitigated_credential
              - ransomleak
              - forum_profile
              - blog_post
              - paste
              - social_media_account
              - forum_post
              - service
              - invalid_credential
              - illicit_networks
              - open_web
              - buckets
              - source_code
              - leaks
              - domains
              - forum_content
              - blog_content
              - profile
              - infected_devices
              - social_media
            example: bot
            type: string
          type: array
        experimental_search_types:
          description: Experimental event types monitored for the identifier.
          items:
            type: string
          type: array
        v3_refs:
          allOf:
            - $ref: '#/components/schemas/V3_Refs'
          description: References to use with the v3 API.
          type: object
        risks:
          description: >-
            Risk scores monitored for the identifier, from 1 (info) to 5
            (critical).
          items:
            type: integer
          type: array
        name:
          description: Display name of the identifier.
          minLength: 1
          type: string
        data:
          description: Monitored value and its options; the attributes depend on `type`.
          properties: {}
          type: object
        fetching_progress:
          description: >-
            Estimated progress of the initial event collection, from 0 to 100,
            based on the time elapsed since `data_updated_at`.
          type: integer
        count:
          description: >-
            Number of identifiers this identifier counts for in the identifier
            usage.
          type: integer
        urn:
          description: The uniform resource name of the identifier.
          type: string
        is_disabled:
          description: Whether the identifier is disabled.
          type: boolean
        source:
          description: How the identifier was created.
          enum:
            - USER
            - SYSTEM_RELATION
            - SELF_ONBOARDING
            - ATTRIBUTE
            - AUTO_MONITOR
            - IDP_SYNC
          example: USER
          type: string
        data_updated_at:
          description: Date and time the identifier data was last updated.
          format: date-time
          type: string
      required:
        - data
        - name
        - search_types
        - type
      type: object
    V3_Refs:
      properties:
        asset_uuid:
          description: UUID of the asset monitored by the identifier.
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.