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

# Update agent

> Mirrors GraphQL `updateAgent` (`agentId` from path).

**Request body schema:** `McpUpdateAgentBodyDto` — see **Schemas** (`#/components/schemas/McpUpdateAgentBodyDto`). Nested: `AgentPersonalizationInput`, `AgentFeeConfigurationInput`.



## OpenAPI

````yaml https://mcp.echozero.app/api/docs-json patch /api/v1/agents/{id}
openapi: 3.0.0
info:
  title: EchoZero MCP API
  description: >-
    EchoZero MCP Server - Developer API for agent management, trading,
    marketplace, and AI chat.


    **Rate Limiting:** All endpoints enforce per-API-key rate limits. Tiers:
    free (60 req/min), standard (300 req/min), premium (1000 req/min). Every
    response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`,
    `X-RateLimit-Reset` headers. Exceeding the limit returns `429 Too Many
    Requests` with a `Retry-After` header.
  version: '1.0'
  contact: {}
servers:
  - url: https://mcp.echozero.app
    description: Production
security: []
tags:
  - name: MCP Protocol
    description: >-
      Model Context Protocol (Streamable HTTP): `/mcp`, `/mcp/sse` — not under
      `/api`; same API key as REST
  - name: Health
    description: Server health check
  - name: API Keys
    description: API key generation, listing, and revocation
  - name: User
    description: >-
      User profile, sessions, social, onboarding, internal agent subscriptions,
      and bot activations (v1: /v1/users/me)
  - name: Token
    description: Token data and trending
  - name: Trade
    description: Trade execution and history
  - name: Strategy
    description: Strategy (trading bot) configuration and control
  - name: Agent
    description: Agent registration and management
  - name: AI
    description: AI chat, intent, and insights
  - name: Wallet
    description: Wallet operations, deposits, and withdrawals
  - name: Notification
    description: Notification management and settings
  - name: Auth
    description: >-
      Public authentication: signup / login lookup, code verification, Google
      OAuth, refresh, and sign-out. Returns `accessToken` / `refreshToken` in
      the JSON body.
  - name: OAuth
    description: >-
      OAuth 2.1 authorization-code + PKCE for AI assistant clients:
      `/oauth/authorize`, `/oauth/token`, `/oauth/introspect`, `/status`.
  - name: Activity
    description: User trade activity list and search
  - name: Feed
    description: Social activity feed timeline
  - name: Earn
    description: Leaderboard, rewards, and referrals
  - name: Statics
    description: Countries, languages, and static data
  - name: Misc
    description: File uploads and utility endpoints
  - name: Developer
    description: Developer registration and profile
  - name: Developer dashboard
    description: >-
      Per-agent dashboard: subscribers (anonymized), performance detail, signal
      history (v1)
  - name: Developer Agent
    description: Developer agent listings and management
  - name: Developer Agents (Marketplace)
    description: Public browse, search, and subscribe to external developer-listed agents
  - name: Admin
    description: Admin-only endpoints for review, approval, and platform management
  - name: Webhooks
    description: >-
      Inbound provider webhooks (no API key). Telegram signal-bot uses
      `X-Telegram-Bot-Api-Secret-Token` when configured.
paths:
  /api/v1/agents/{id}:
    patch:
      tags:
        - Agent
      summary: Update agent
      description: >-
        Mirrors GraphQL `updateAgent` (`agentId` from path).


        **Request body schema:** `McpUpdateAgentBodyDto` — see **Schemas**
        (`#/components/schemas/McpUpdateAgentBodyDto`). Nested:
        `AgentPersonalizationInput`, `AgentFeeConfigurationInput`.
      operationId: McpAgentController_update
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-signature
          in: header
          required: false
          description: >-
            HMAC-SHA256 signature: HMAC-SHA256(secretKey, timestamp + METHOD +
            path + body). Optional -- when omitted, HMAC verification is
            skipped.
          schema:
            type: string
        - name: x-timestamp
          in: header
          required: false
          description: >-
            Request timestamp in epoch milliseconds. Required when x-signature
            is provided. Rejected if drift exceeds 5 minutes.
          schema:
            type: string
      requestBody:
        required: true
        description: >-
          OpenAPI schema **McpUpdateAgentBodyDto**; `agentId` is taken from the
          path.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpUpdateAgentBodyDto'
            examples:
              nameOnly:
                summary: Rename only
                value:
                  name: Updated name
              personalityOverride:
                summary: API personality override
                description: >-
                  Sets `personalization.apiOverride`, which takes precedence
                  over portal style/customInstructions in subscriber chat.
                value:
                  personality:
                    style: FRIENDLY
                    customInstructions: Always mention risk levels. Use emojis.
              fullAllFields:
                summary: All optional fields
                description: >-
                  Every property on **McpUpdateAgentBodyDto** including nested
                  `personalization` and `feeConfiguration` (GraphQL
                  `AgentPersonalizationInput` / `AgentFeeConfigurationInput`).
                value:
                  name: Full patch example
                  description: Updated description
                  imageUrl: avatars/agent.png
                  tags:
                    - SOL
                    - AI
                  personalization:
                    imageUrl: avatars/personalization.png
                    style: FRIENDLY
                    customInstructions: Prefer limit orders.
                    bio: Short bio
                    interests:
                      - TECH
                      - GAMING
                  personality:
                    style: EFFICIENT
                    customInstructions: API override instructions for external agents.
                  isPublic: true
                  feeConfiguration:
                    feePercentage: 4
                    chargeOnPerformance: false
                    hideFromPublic: false
                  status: ACTIVE
      responses:
        '200':
          description: Updated agent.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/McpSuccessResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/McpAgentListItemDto'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpErrorResponseDto'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpErrorResponseDto'
      security:
        - bearer-jwt: []
        - api-key: []
components:
  schemas:
    McpUpdateAgentBodyDto:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
          nullable: true
        imageUrl:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
        personalization:
          $ref: '#/components/schemas/AgentPersonalizationInput'
        isPublic:
          type: boolean
        feeConfiguration:
          $ref: '#/components/schemas/AgentFeeConfigurationInput'
        status:
          type: string
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - DELETED
        closeActiveTrades:
          type: boolean
          description: >-
            When setting status to PAUSED: required for private agents (true =
            close owner trades first, false = keep open). Optional for public
            agents.
        strategyDescription:
          type: string
        marketplacePricingModel:
          type: string
          enum:
            - subscription
            - success-fee
            - both
            - free
        marketplaceMonthlyPrice:
          type: number
          minimum: 0
        marketplaceSuccessFeePercent:
          type: number
          minimum: 0
        listingStatus:
          type: string
          enum:
            - pending-review
            - beta
            - public
            - rejected
        betaStartDate:
          type: string
          format: date-time
        maxBetaUsers:
          type: number
          minimum: 1
        riskLevel:
          type: string
          enum:
            - low
            - medium
            - high
        performanceStats:
          type: object
        featured:
          type: boolean
        featuredRank:
          type: number
        inboundWebhookUrl:
          type: string
        signalSourceKind:
          type: string
          enum:
            - webhook
            - signal_group
        connectedChannels:
          type: array
          items:
            type: object
        signalDetectionRule:
          type: object
        signalExecutionDefaults:
          type: object
        parserAiMode:
          type: string
          enum:
            - inherit
            - 'off'
            - shadow
            - fallback
          description: >-
            Per-agent hybrid parser: inherit (server env), off, shadow, or
            fallback.
        membershipGated:
          type: boolean
        externalSignupUrl:
          type: string
        rotateInboundWebhookSigningSecret:
          type: boolean
          description: >-
            When true and signalSourceKind is webhook, rotate inbound signing
            secret (returned once on the agent payload)
        personality:
          nullable: true
          description: >-
            API personality override for subscriber chat. Stored as
            personalization.apiOverride and takes precedence over portal
            defaults. Pass null to clear.
          allOf:
            - $ref: '#/components/schemas/McpAgentPersonalityOverrideDto'
    McpSuccessResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          description: Endpoint-specific payload
          additionalProperties: true
      required:
        - success
        - data
    McpAgentListItemDto:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
    McpErrorResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          $ref: '#/components/schemas/McpErrorBodyDto'
      required:
        - success
        - error
    AgentPersonalizationInput:
      type: object
      properties: {}
    AgentFeeConfigurationInput:
      type: object
      properties: {}
    McpAgentPersonalityOverrideDto:
      type: object
      properties:
        style:
          type: string
          enum:
            - DEFAULT
            - PROFESSIONAL
            - FRIENDLY
            - CANDID
            - QUIRKY
            - EFFICIENT
            - NERDY
            - CYNICAL
        customInstructions:
          type: string
    McpErrorBodyDto:
      type: object
      properties:
        code:
          type: string
          example: NOT_FOUND
        message:
          type: string
          example: Resource not found
      required:
        - code
        - message
  securitySchemes:
    bearer-jwt:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        User JWT access token issued by `POST /api/auth/verify` or `POST
        /api/auth/social/verify`. Routes that accept both auth modes declare
        `api-key` *and* `bearer-jwt` security schemes.
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````