> ## 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.

# Add Connection

> Adds a new connection between users.



## OpenAPI

````yaml post /connections
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:
  /connections:
    post:
      summary: Add Connection
      description: Adds a new connection between users.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                current_user:
                  type: string
                  example: username1
                connected_peer:
                  type: string
                  example: username2
              required:
                - current_user
                - connected_peer
      responses:
        '200':
          description: Connection created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    nullable: true
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````