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

# Get character details

> Retrieve public details for a character. Internal fields such as knowledge, relationships, filters, memory, and model are omitted.




## OpenAPI

````yaml /api-reference/openapi.yaml get /context/characters/{game_id}/{world_id}/{character_id}
openapi: 3.0.3
info:
  title: NPC Builder - API
  description: >
    This is the latest NPC Builder API specification that defines a
    comprehensive, production-ready API for NPC Builder. The API is divided into
    three primary services:


    **Interactions Service**  
      - **Purpose:** Enables dynamic, context-aware conversations between players and NPC characters.


    **Context Service**  
      - **Purpose:** Manages in-game entities to build and maintain immersive game environments.
      - **Includes:**  
        - **Worlds:** Create, update, and delete game worlds.
        - **Regions:** Define and manage distinct regions within a world.
        - **Locations:** Handle specific locations within regions.
        - **Characters:** Manage the lifecycle (creation, updating, deletion) of NPC characters.


    **Sessions Service**  
      - **Purpose:** Manages player sessions to maintain game context and track interactions.


    Overall, this specification serves as a detailed guide to leveraging NPC
    Builder’s services—empowering developers to build rich, interactive
    experiences while efficiently managing game contexts and entities.
        _You must stick to the data structure defined, otherwise you may encounter unhandled errors_


    **Please check the schemas of each request to find the allowed values for
    certain properties.**


    _Technical Limitations: Character's knowledge and relationships updating and
    deleting are not available through the API. They must be managed through our
    app's frontend._


    Some useful links:

    - [Our website](https://npcbuilder.com)

    - [The App](https://app.npcbuilder.com)
  termsOfService: https://npcbuilder.com/terms-and-conditions/
  contact:
    email: support@npcbuilder.com
  version: 1.6.0
servers:
  - url: https://app.npcbuilder.com/api
    description: Production API for context, sessions, and non-interaction endpoints
security: []
tags:
  - name: Interactions
    description: Manage your NPCs text conversations and interactive responses.
  - name: Characters
    description: Manage characters in your game including creation, update, and deletion.
  - name: Worlds
    description: Create and manage immersive worlds for your game.
  - name: Regions
    description: Define and manage regions within your worlds.
  - name: Locations
    description: Manage specific locations within regions of your game.
  - name: Sessions
    description: Create, retrieve, and delete player sessions for enhanced game management.
paths:
  /context/characters/{game_id}/{world_id}/{character_id}:
    get:
      tags:
        - Characters
      summary: Get character details
      description: >
        Retrieve public details for a character. Internal fields such as
        knowledge, relationships, filters, memory, and model are omitted.
      parameters:
        - name: game_id
          in: path
          required: true
          description: The unique identifier for the game.
          schema:
            type: string
            example: game123
        - name: world_id
          in: path
          required: true
          description: The unique identifier for the world.
          schema:
            type: string
            example: world456
        - name: character_id
          in: path
          required: true
          description: The unique identifier for the character.
          schema:
            type: string
            example: character789
        - name: session_id
          in: query
          description: (Optional) The player's session ID.
          required: false
          schema:
            type: string
            example: 60Z5aZjIuFlyYbjbZZKe
      responses:
        '200':
          description: Character retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  character_id:
                    type: string
                    description: UID of the character.
                    example: character789
                  character:
                    $ref: '#/components/schemas/PublicCharacter'
        '400':
          description: >
            Validation error - The request parameters did not match the required
            schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found - The specified character was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message for the missing character.
                    example: Character with ID character789 not found.
        '500':
          description: >
            Internal Server Error - An error occurred while retrieving the
            character.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - npcbuilder_auth: []
components:
  schemas:
    PublicCharacter:
      type: object
      description: >-
        Public character DTO. Internal fields such as knowledge, relationships,
        filters, memory, and model are omitted.
      properties:
        id:
          type: string
          example: character789
        name:
          type: string
          example: Aragorn
        description:
          type: string
          example: A brave warrior with a mysterious past.
        age:
          type: string
          example: adult
        gender:
          type: string
          example: Male
        role:
          type: string
          example: protagonist
        tone:
          type: string
          example: mysterious
        traits:
          type: array
          description: >-
            Legacy/basic trait list. For non-basic theories, use
            personality_theory and personality_dimensions.
          items:
            type: string
            example: brave
        personality_theory:
          type: string
          enum:
            - basicTraits
            - bigFive
            - darkTriad
            - dndAlignment
            - mbti
            - enneagram
          example: basicTraits
        personality_dimensions:
          type: object
          additionalProperties:
            type: integer
          example: {}
        speech_pattern:
          type: object
          properties:
            vocabulary_level:
              type: string
              example: moderate
            sentence_length:
              type: string
              example: average
            verbal_quirks:
              type: string
              example: ''
        items:
          type: array
          items:
            type: object
            properties:
              itemName:
                type: string
                example: Sword
              unit:
                type: string
                example: Piece
              value:
                oneOf:
                  - type: string
                  - type: number
                example: 100
              type:
                type: string
                example: trade
              description:
                type: string
                example: A sharp sword.
        events:
          type: array
          items:
            type: object
            properties:
              eventName:
                type: string
                example: Attack
              type:
                type: string
                example: action
              description:
                type: string
                example: Act of violence against another person.
        quests:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
                example: Retrieve the lost artifact.
              objective:
                type: string
                example: Find and return the artifact.
              reward:
                type: string
                example: 500 gold coins
    ErrorResponse:
      type: object
      description: Standard error response schema.
      properties:
        message:
          type: string
          description: Detailed error message.
          example: An error occurred
  securitySchemes:
    npcbuilder_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````