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

# Create Profile

> Creates a new user profile with a username and optional referral code.



## OpenAPI

````yaml post /profiles
openapi: 3.1.0
info:
  title: Offline Protocol API
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.offlineprotocol.com/api/v1
security: []
paths:
  /profiles:
    post:
      summary: Create Profile
      description: Creates a new user profile with a username and optional referral code.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  example: john_doe
                referral:
                  type: string
                  example: REF12345
              required:
                - username
                - referral
      responses:
        '201':
          description: Profile created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Profile created successfully
                  profile:
                    $ref: '#/components/schemas/Profile'
        '400':
          description: Invalid request body
        '409':
          description: Username already exists
      security:
        - bearerAuth: []
components:
  schemas:
    Profile:
      type: object
      properties:
        username:
          type: string
        about:
          type: string
          nullable: true
        socials:
          type: object
          properties:
            x:
              type: string
              format: uri
              nullable: true
            telegram:
              type: string
              format: uri
              nullable: true
            website:
              type: string
              format: uri
              nullable: true
            discord:
              type: string
              format: uri
              nullable: true
        location:
          type: object
          properties:
            latitude:
              type: number
            longitude:
              type: number
          nullable: true
        hidden:
          type: boolean
          default: false
      required:
        - username
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````