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

# Update Phrase Replacement Config

> <b>Update an existing phrase replacement configuration</b>

Updates an existing phrase replacement configuration with new phrase replacements.




## OpenAPI

````yaml post /synthesis/phrase-replacement-config/{configId}
openapi: 3.1.0
info:
  title: UpliftAI API
  version: 1.0.0
  description: >
    API for UpliftAI messaging, media handling, and text-to-speech capabilities.
    This API enables real-time communication

    with AI assistants, supporting various content types including text, images,
    audio,

    and documents. It provides both synchronous and asynchronous messaging
    capabilities

    with webhook support for real-time updates. The API also supports
    text-to-speech synthesis

    and phrase replacement configuration.
servers:
  - url: https://api.upliftai.org/v1
    description: Version 1 API
security: []
paths:
  /synthesis/phrase-replacement-config/{configId}:
    post:
      summary: Update Phrase Replacement Config
      description: >
        <b>Update an existing phrase replacement configuration</b>


        Updates an existing phrase replacement configuration with new phrase
        replacements.
      parameters:
        - in: path
          name: configId
          required: true
          schema:
            type: string
          description: ID of the configuration to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PhraseReplacementConfigRequest'
      responses:
        '200':
          description: Successful update of configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhraseReplacementConfigResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Configuration not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Rate limit exceeded, please try again later
      security:
        - apiKeyAuth: []
      x-codeSamples:
        - lang: JavaScript
          label: Update phrase replacement config
          source: |
            {
              "phraseReplacements": [
                {
                  "phrase": "سیونگز اکاؤنٹ",
                  "replacement": "savings account"
                },
                {
                  "phrase": "Isabion",
                  "replacement": "ایزابیان"
                },
                {
                  "phrase": "Meezan bank",
                  "replacement": "میزان بینک"
                }
              ]
            }
components:
  schemas:
    PhraseReplacementConfigRequest:
      type: object
      required:
        - phraseReplacements
      description: Request to create or update phrase replacement configuration
      properties:
        phraseReplacements:
          type: array
          maxItems: 1000
          description: Array of phrase replacement rules
          items:
            $ref: '#/components/schemas/PhraseReplacement'
    PhraseReplacementConfigResponse:
      type: object
      required:
        - configId
        - phraseReplacements
      description: Response containing phrase replacement configuration
      properties:
        configId:
          type: string
          description: Unique identifier for the configuration
        phraseReplacements:
          type: array
          description: Array of phrase replacement rules
          items:
            $ref: '#/components/schemas/PhraseReplacement'
    PhraseReplacement:
      type: object
      required:
        - phrase
        - replacement
      description: Configuration for how to replace specific phrases
      properties:
        phrase:
          type: string
          maxLength: 50
          description: Original phrase to be replaced
        replacement:
          type: string
          maxLength: 50
          description: Text to use as replacement
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API key with format "Bearer sk_api_..."

````