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

# Create WebRTC connection

> Create a new WebRTC connection. See [WebRTC Connections](https://docs.galtea.ai/concepts/product/webrtc-connection).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /webRtcConnections
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /webRtcConnections:
    post:
      tags:
        - web-rtc-connections
      summary: Create WebRTC connection
      description: >-
        Create a new WebRTC connection. See [WebRTC
        Connections](https://docs.galtea.ai/concepts/product/webrtc-connection).
      operationId: createWebRtcConnection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebRtcConnection'
      responses:
        '201':
          description: WebRTC connection created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebRtcConnection'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    WebRtcConnection:
      type: object
      required:
        - productId
        - name
        - apiKey
        - agentName
      properties:
        id:
          type: string
          example: webRtcConnection_123
        productId:
          type: string
          example: prod_123
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: Support agent (WebRTC)
        apiKey:
          type: string
          writeOnly: true
          description: >-
            Pipecat Cloud PUBLIC API key (`pk_...`) Galtea uses to provision a
            room via the runtime `/start` call. This is NOT the `pcc_pat_`
            Personal Access Token used to deploy agents. Encrypted at rest and
            never returned; read `hasApiKey` to know whether one is set. On
            update, omit it to keep the stored key.
          example: pk_...
        hasApiKey:
          type: boolean
          readOnly: true
          description: Whether a Pipecat Cloud API key is stored for this connection.
          example: true
        agentName:
          type: string
          description: >-
            Name of your deployed Pipecat Cloud agent. Must match that agent's
            deployed name exactly. Galtea passes it to the Pipecat Cloud
            `/start` call to launch the session; if no deployed agent has this
            name, `/start` fails.
          example: my-voice-agent
        agentSpeaksFirst:
          type: boolean
          default: false
          description: >-
            Whether the voice agent opens the conversation once the session
            connects. `false` (default) means the simulated caller speaks first;
            `true` suits interviewer-style agents that greet first.
          example: false
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````