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

# Update Agent Status

> Update Agent Status.

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Request

Example curl:

```bash theme={null}
curl -X PATCH "https://api.ravan.ai/api/v1/agents/{id}/status" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "inactive" }'
```

### Path Parameters

<ParamField path="id" type="string" required>
  The unique ID of the resource in the path. Use the ID returned by the related create or list endpoint.
</ParamField>

***

### Body

<ParamField body="status" type="string">
  Filters or sets the current status of the resource. Use one of the status values supported by the endpoint.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable status message.
</ResponseField>

<ResponseField name="data" type="object">
  Returned data.

  <Expandable title="data">
    <ResponseField name="id" type="string">
      Unique agent ID
    </ResponseField>

    <ResponseField name="organization_id" type="string">
      Organization this agent belongs to
    </ResponseField>

    <ResponseField name="widget_settings_id" type="string">
      Associated widget settings ID
    </ResponseField>

    <ResponseField name="name" type="string">
      Internal name of the agent
    </ResponseField>

    <ResponseField name="agent_name" type="string">
      Display name of the agent
    </ResponseField>

    <ResponseField name="status" type="string">
      status field. Allowed values: `AGENT_STATUS_UNSPECIFIED`, `AGENT_STATUS_ACTIVE`, `AGENT_STATUS_INACTIVE`.
    </ResponseField>

    <ResponseField name="model" type="string">
      LLM model identifier
    </ResponseField>

    <ResponseField name="s2s_model" type="string">
      Speech-to-speech model identifier
    </ResponseField>

    <ResponseField name="voice_id" type="string">
      Voice ID for TTS
    </ResponseField>

    <ResponseField name="temperature" type="number">
      LLM temperature setting
    </ResponseField>

    <ResponseField name="reminder_trigger_ms" type="integer">
      Milliseconds before sending a reminder
    </ResponseField>

    <ResponseField name="reminder_max_count" type="integer">
      Maximum number of reminders to send
    </ResponseField>

    <ResponseField name="ambient_sound" type="string">
      Ambient sound identifier
    </ResponseField>

    <ResponseField name="ambient_sound_volume" type="number">
      Volume of ambient sound (0.0 - 1.0)
    </ResponseField>

    <ResponseField name="end_call_after_silence" type="boolean">
      Whether to end the call after silence
    </ResponseField>

    <ResponseField name="max_call_duration_ms" type="integer">
      Maximum call duration in milliseconds
    </ResponseField>

    <ResponseField name="ring_duration_ms" type="integer">
      Ring duration in milliseconds
    </ResponseField>

    <ResponseField name="enable_voicemail_detection" type="boolean">
      Whether to enable voicemail detection
    </ResponseField>

    <ResponseField name="voicemail_message" type="string">
      Message to leave on voicemail
    </ResponseField>

    <ResponseField name="voicemail_detection_timeout_ms" type="integer">
      Voicemail detection timeout in milliseconds
    </ResponseField>

    <ResponseField name="enable_emergency_fallback" type="boolean">
      Whether to transfer the call to a backup number on failure
    </ResponseField>

    <ResponseField name="emergency_fallback_number" type="string">
      The backup number to transfer the call to
    </ResponseField>

    <ResponseField name="ivr_options" type="object">
      IVR (Interactive Voice Response) configuration
    </ResponseField>

    <ResponseField name="post_call_analysis_model" type="string">
      Model to use for post-call analysis
    </ResponseField>

    <ResponseField name="analysis_summary_prompt" type="string">
      Prompt used for generating call summary
    </ResponseField>

    <ResponseField name="selected_tools" type="object">
      Tools selected for this agent
    </ResponseField>

    <ResponseField name="integrations" type="object">
      Integration configuration
    </ResponseField>

    <ResponseField name="knowledge_base" type="string">
      Knowledge base content or reference
    </ResponseField>

    <ResponseField name="begin_message" type="string">
      Opening message spoken by the agent
    </ResponseField>

    <ResponseField name="start_speaker" type="string">
      Who speaks first: agent or user
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Creation timestamp
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      Last update timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Agent status updated successfully",
    "data": { "id": "...", "status": "inactive" }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml PATCH /api/v1/agents/{id}/status/
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/agents/{id}/status/:
    patch:
      tags:
        - AgentService
      summary: Update Agent Status
      operationId: UpdateAgentStatus
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Agent ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentStatusRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateAgentStatusResponse'
components:
  schemas:
    UpdateAgentStatusRequest:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/AgentStatus'
    UpdateAgentStatusResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/Agent'
    AgentStatus:
      type: string
      enum:
        - AGENT_STATUS_UNSPECIFIED
        - AGENT_STATUS_ACTIVE
        - AGENT_STATUS_INACTIVE
      description: Status of the agent
    Agent:
      type: object
      properties:
        id:
          type: string
          description: Unique agent ID
        organization_id:
          type: string
          description: Organization this agent belongs to
        widget_settings_id:
          type: string
          description: Associated widget settings ID
        name:
          type: string
          description: Internal name of the agent
        agent_name:
          type: string
          description: Display name of the agent
        status:
          $ref: '#/components/schemas/AgentStatus'
        model:
          type: string
          description: LLM model identifier
        s2s_model:
          type: string
          description: Speech-to-speech model identifier
        voice_id:
          type: string
          description: Voice ID for TTS
        temperature:
          type: number
          format: double
          description: LLM temperature setting
        reminder_trigger_ms:
          type: integer
          format: int32
          description: Milliseconds before sending a reminder
        reminder_max_count:
          type: integer
          format: int32
          description: Maximum number of reminders to send
        ambient_sound:
          type: string
          description: Ambient sound identifier
        ambient_sound_volume:
          type: number
          format: double
          description: Volume of ambient sound (0.0 - 1.0)
        end_call_after_silence:
          type: boolean
          description: Whether to end the call after silence
        max_call_duration_ms:
          type: integer
          format: int32
          description: Maximum call duration in milliseconds
        ring_duration_ms:
          type: integer
          format: int32
          description: Ring duration in milliseconds
        enable_voicemail_detection:
          type: boolean
          description: Whether to enable voicemail detection
        voicemail_message:
          type: string
          description: Message to leave on voicemail
        voicemail_detection_timeout_ms:
          type: integer
          format: int32
          description: Voicemail detection timeout in milliseconds
        enable_emergency_fallback:
          type: boolean
          description: Whether to transfer the call to a backup number on failure
        emergency_fallback_number:
          type: string
          description: The backup number to transfer the call to
        ivr_options:
          type: object
          description: IVR (Interactive Voice Response) configuration
        post_call_analysis_model:
          type: string
          description: Model to use for post-call analysis
        analysis_summary_prompt:
          type: string
          description: Prompt used for generating call summary
        selected_tools:
          type: object
          description: Tools selected for this agent
        integrations:
          type: object
          description: Integration configuration
        knowledge_base:
          type: string
          description: Knowledge base content or reference
        begin_message:
          type: string
          description: Opening message spoken by the agent
        start_speaker:
          type: string
          description: 'Who speaks first: agent or user'
        created_at:
          type: string
          description: Creation timestamp
        updated_at:
          type: string
          description: Last update timestamp
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key

````