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

# Analyze a username

> Analyzes a username string to detect inappropriate, offensive, or otherwise undesirable content and returns a list of classifications.

Before diving in, we recommend reading the [username taxonomy](/en/documentation/taxonomy/username-classifications) to understand the classifications returned by this endpoint.




## OpenAPI

````yaml /openapi/analyze.openapi.yaml post /analyze/v1/username
openapi: 3.1.0
info:
  title: Bodyguard Analyze API
  version: 1.0.0
servers:
  - url: https://api.bodyguard.ai
security:
  - ApiKeyAuth: []
tags:
  - name: Analyze
    description: Content analysis endpoints.
paths:
  /analyze/v1/username:
    post:
      tags:
        - Analyze
      summary: Analyze a username
      description: >
        Analyzes a username string to detect inappropriate, offensive, or
        otherwise undesirable content and returns a list of classifications.


        Before diving in, we recommend reading the [username
        taxonomy](/en/documentation/taxonomy/username-classifications) to
        understand the classifications returned by this endpoint.
      operationId: analyzeUsername
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bodyguard.analyze.v1.AnalyzeUsernameRequest'
            examples:
              basic:
                summary: Basic username check
                value:
                  sourceId: __YOUR_SOURCE_ID__
                  username: cool_gamer_99
      responses:
        '200':
          description: Analysis completed.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/bodyguard.analyze.v1.AnalyzeUsernameResponse
components:
  schemas:
    bodyguard.analyze.v1.AnalyzeUsernameRequest:
      type: object
      required:
        - sourceId
        - username
      properties:
        sourceId:
          type: string
          description: >-
            Identifier of the [source](/en/api-reference/concepts#source) the
            username belongs to. Provided by Bodyguard.
        username:
          type: string
          description: The username string to analyze.
    bodyguard.analyze.v1.AnalyzeUsernameResponse:
      type: object
      properties:
        usernameAnalysis:
          $ref: '#/components/schemas/bodyguard.analyze.v1.UsernameAnalysis'
    bodyguard.analyze.v1.UsernameAnalysis:
      type: object
      properties:
        classifications:
          type: array
          description: >-
            Classifications detected on the username. See the [username
            taxonomy](/en/documentation/taxonomy/username-classifications) for
            the full list and descriptions of each classification.
          items:
            type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: |
        API key authentication. Provide your key in the `Authorization`
        header with the `ApiKey` scheme:
        ```
        Authorization: ApiKey <your-api-key>
        ```

````