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

# Update AI by ID

> Update AI agent by id



## OpenAPI

````yaml POST /agents/{agent_id}
openapi: 3.0.0
info:
  title: Fliqr AI API
  version: '1.1'
  description: >-
    REST API for Fliqr AI. Authenticate every request with the `X-ACCESS-TOKEN`
    header.
servers:
  - url: https://app.fliqr.ai/api
    description: Production
security:
  - APIKeyHeader: []
tags:
  - name: Accounts
  - name: Contacts
  - name: AI Agents
  - name: Pipelines
  - name: Ecommerce
  - name: Appointment Management
  - name: Templates
paths:
  /agents/{agent_id}:
    post:
      tags:
        - AI Agents
      summary: Update AI By Id
      description: Update AI agent by id
      operationId: updateAIById
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: number
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                prompt:
                  type: string
                  description: The prompt field for the AI agent
                max_output_tokens:
                  type: number
                  description: The max_output_tokens field for the AI agent
                model:
                  type: object
                  properties:
                    openAI:
                      type: string
                    gemini:
                      type: string
                    claude:
                      type: string
                    xAI:
                      type: string
                    deepseek:
                      type: string
              example:
                prompt: Your prompt here
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: ''
components:
  schemas:
    Agent:
      type: object
      properties:
        id:
          type: number
          format: int64
        name:
          type: string
        created_by:
          type: number
          format: int64
        created_at:
          type: string
          format: date-time
          description: Date in UTC. Example 2022-10-12 14:40:00
      xml:
        name: Agent
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-ACCESS-TOKEN
      description: >-
        API access token from your Fliqr AI dashboard (**Settings → API**). Send
        it in the `X-ACCESS-TOKEN` header on every request.

````