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

# Update Widget Key

> Change a web widget key's name, allowed domains, allowed variables or limits. The change applies to the next call.



## OpenAPI

````yaml PATCH /web-call/public-keys/{key}
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: >-
      Bring-your-own-carrier SIP trunks, their gateways, carrier IPs and
      numbers.
paths:
  /web-call/public-keys/{key}:
    patch:
      description: >-
        Change a widget key's name, domains, variables or limits. Send only the
        fields to change; the key's other fields stay as they are, and the
        result is checked like a new key. The change applies to the next call.
      parameters:
        - in: path
          name: key
          required: true
          schema:
            type: string
          description: The widget key, `pk_` followed by 32 characters
      requestBody:
        description: The fields to change
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebWidgetKeyUpdateRequest'
            example:
              allowed_domains:
                - acme.com
                - '*.acme.com'
                - acme.vercel.app
        required: true
      responses:
        '200':
          description: Key updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebWidgetKey'
        '404':
          description: key not found for this account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebWidgetKeyMessage'
        '422':
          description: >-
            The change isn't allowed, for the same reasons as when creating a
            key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebWidgetKeyMessage'
components:
  schemas:
    WebWidgetKeyUpdateRequest:
      type: object
      description: The fields to change. Each takes the same values as when creating a key.
      properties:
        name:
          type: string
          maxLength: 100
          description: A name to recognise the key by
        allowed_domains:
          type: array
          maxItems: 20
          items:
            type: string
          description: >-
            The websites the key works on, as hostnames with no scheme, port or
            path. `acme.com` matches only `https://acme.com`; `*.acme.com`
            matches its subdomains over HTTPS but not `acme.com` itself.
            `localhost` and `127.0.0.1` allow local testing over HTTP. Wildcards
            over shared hosting domains such as `*.vercel.app` are refused.
        allowed_variables:
          type: array
          maxItems: 20
          items:
            type: string
          description: >-
            The prompt variable names a page may send. A call that sends any
            other name is refused.
        max_concurrent_calls:
          type: integer
          minimum: 1
          nullable: true
          description: >-
            Most live calls on this key at once, at most your account's web-call
            concurrency. `null` lets the key use all of your web-call
            concurrency.
        per_minute_limit:
          type: integer
          minimum: 1
          maximum: 120
          description: New calls on this key a minute, across all visitors
        per_day_limit:
          type: integer
          minimum: 10
          maximum: 5000
          description: Calls on this key a day
        per_ip_minute_limit:
          type: integer
          minimum: 1
          maximum: 10
          description: Calls from one visitor IP address a minute
        per_ip_day_limit:
          type: integer
          minimum: 5
          maximum: 100
          description: Calls from one visitor IP address a day
        max_call_seconds:
          type: integer
          minimum: 60
          maximum: 1800
          description: >-
            The longest a call on this key may last, in seconds. The call ends
            when it reaches it.
    WebWidgetKey:
      type: object
      properties:
        key:
          type: string
          example: pk_4f6c1d2e3a5b4c7d8e9f0a1b2c3d4e5f
          description: The widget key to put in the `public-key` attribute
        name:
          type: string
          description: A name to recognise the key by
        allowed_domains:
          type: array
          items:
            type: string
          description: >-
            The websites the key works on, as hostnames with no scheme, port or
            path. `acme.com` matches only `https://acme.com`; `*.acme.com`
            matches its subdomains over HTTPS but not `acme.com` itself.
            `localhost` and `127.0.0.1` allow local testing over HTTP. Wildcards
            over shared hosting domains such as `*.vercel.app` are refused.
        allowed_variables:
          type: array
          items:
            type: string
          description: >-
            The prompt variable names a page may send. A call that sends any
            other name is refused.
        max_concurrent_calls:
          type: integer
          nullable: true
          description: >-
            Most live calls on this key at once, at most your account's web-call
            concurrency. `null` lets the key use all of your web-call
            concurrency.
        per_minute_limit:
          type: integer
          description: New calls on this key a minute, across all visitors
        per_day_limit:
          type: integer
          description: Calls on this key a day
        per_ip_minute_limit:
          type: integer
          description: Calls from one visitor IP address a minute
        per_ip_day_limit:
          type: integer
          description: Calls from one visitor IP address a day
        max_call_seconds:
          type: integer
          description: >-
            The longest a call on this key may last, in seconds. The call ends
            when it reaches it.
        is_active:
          type: boolean
          description: Always `true` for a key returned by these endpoints
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    WebWidgetKeyMessage:
      type: object
      properties:
        message:
          type: string
          example: Key not found for this account
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.