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

# Find characters

> When called with an API key, the caller must have a client_access grant on the requested character (set via the user UI). Without a grant, returns 403. Filtering by campaign_id only returns all characters in that campaign so members can see each other.



## OpenAPI

````yaml POST /find-character
openapi: 3.1.0
info:
  title: Wanderer's Guide API
  description: >-
    Public HTTP API for Wanderer's Guide, the Pathfinder 2e character builder.
    Every endpoint is a Supabase Edge Function reached via `POST
    /functions/v1/<name>`. All responses follow the
    [JSend](https://github.com/omniti-labs/jsend) convention: `{ status:
    'success' | 'fail' | 'error', data?, message? }`.
  version: 1.0.0
  contact:
    name: Wanderer's Guide Discord
    url: https://discord.com/invite/FxsFZVvedr
  license:
    name: MIT
    url: https://github.com/wanderers-guide/wanderers-guide/blob/main/LICENSE
servers:
  - url: https://api.wanderersguide.app/functions/v1
    description: Production
  - url: '{supabaseUrl}/functions/v1'
    description: Self-hosted Supabase
    variables:
      supabaseUrl:
        default: http://127.0.0.1:54321
        description: Base URL of your Supabase instance, including scheme and port.
security:
  - apiKeyAuth: []
tags:
  - name: Content
    description: 'Pathfinder 2e content: spells, items, feats, ancestries, classes, etc.'
  - name: Characters
    description: Player characters.
  - name: Campaigns
    description: Campaigns and encounters.
  - name: GM
    description: 'Game-master tools: group management, access codes.'
  - name: Users
    description: Public user profiles, account management, Patreon integration.
  - name: Search
    description: Full-text and advanced search across content.
  - name: Files
    description: User-uploaded portrait and background images.
  - name: Integrations
    description: Vector DB and Discord webhooks.
paths:
  /find-character:
    post:
      tags:
        - Characters
      summary: Find characters
      description: >-
        When called with an API key, the caller must have a `client_access`
        grant on the requested character (set via the user UI). Without a grant,
        returns 403. Filtering by `campaign_id` only returns all characters in
        that campaign so members can see each other.
      operationId: findCharacter
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  oneOf:
                    - type: integer
                    - type: array
                      items:
                        type: integer
                user_id:
                  type: string
                  format: uuid
                campaign_id:
                  type: integer
      responses:
        '200':
          description: JSend success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    oneOf:
                      - type: array
                        items:
                          $ref: '#/components/schemas/Character'
                      - $ref: '#/components/schemas/Character'
                      - type: 'null'
        '403':
          $ref: '#/components/responses/JSendFail'
components:
  schemas:
    Character:
      type: object
      required:
        - name
        - level
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        campaign_id:
          type:
            - integer
            - 'null'
        user_id:
          type: string
          format: uuid
        name:
          type: string
        level:
          type: integer
        experience:
          type: integer
        hero_points:
          type: integer
        hp_current:
          type: integer
        hp_temp:
          type: integer
        stamina_current:
          type: integer
        resolve_current:
          type: integer
        inventory:
          type: object
          additionalProperties: true
        details:
          type: object
          additionalProperties: true
        notes:
          type: object
          additionalProperties: true
        roll_history:
          type: object
          additionalProperties: true
        spells:
          type: object
          additionalProperties: true
        operation_data:
          type: object
          additionalProperties: true
        meta_data:
          type: object
          additionalProperties: true
        custom_operations:
          type: array
          items:
            $ref: '#/components/schemas/Operation'
        options:
          type: object
          additionalProperties: true
        variants:
          type: object
          additionalProperties: true
        content_sources:
          type: object
          properties:
            enabled:
              type: array
              items:
                type: integer
        companions:
          type: object
          additionalProperties: true
    Operation:
      description: >-
        An entry in the operations engine. See the Content Model guide. Shape
        varies by `type`; treated as opaque JSON by the API.
      type: object
      additionalProperties: true
    JSendFail:
      type: object
      required:
        - status
        - data
      properties:
        status:
          type: string
          enum:
            - fail
        data:
          type: object
          properties:
            message:
              type: string
  responses:
    JSendFail:
      description: Operation failed due to invalid input or insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JSendFail'
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key (UUID, 36 chars)
      description: >-
        API key created in your Wanderer's Guide account settings. Send as
        `Authorization: Bearer <key>`. Used for direct API access from external
        tools and scripts.

````