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

# Trigger Ticket Agent

> Ask Serval to process an existing open ticket, including human-assigned tickets. The current assignee is preserved and paused AI resumes. The trigger and optional instructions create no ticket message or notification. Serval may reply and take its normal actions. Returns when accepted; processing is asynchronous and remains subject to normal agent policies. Retry with the same idempotencyKey and instructions.

## Authentication and permissions

> **Token requirements:** **User-based token (OAuth)** or **Organization-scoped API key** or **Team-scoped API key**.
>
> Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.

| Credential | Access requirements |
| - | - |
| Organization-scoped API key | `tickets:trigger-agent` |
| Team-scoped API key | `tickets:trigger-agent` |
| User-based token (OAuth) | Supported, subject to permissions |

Permissions joined by **+** are all required; **or** separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Team keys must allow every team checked by the request. OAuth access depends on the user’s roles and resource access.

Requires visibility into the ticket and permission to trigger the agent on its team. The ticket must be open and unarchived; its current assignee is preserved.


## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/tickets/{ticket_id}/trigger-agent
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Membership API
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: Analytics API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Procedure API
  - name: Approval Request API
  - name: Assignment Rules API
  - name: Audit Log API
  - name: Billing API
  - name: Browser API
  - name: Campaign API
  - name: Change Blackout API
  - name: Change Model API
  - name: Connected Channels API
  - name: Custom Field API
  - name: Custom Role API
  - name: Custom Service API
  - name: Dashboards API
  - name: Email Intake API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Forms API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: One-Time Window API
  - name: Package API
  - name: Report API
  - name: Review API
  - name: Roles API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team Group API
  - name: Team SDLC Settings API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Widgets API
  - name: Worker API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/tickets/{ticket_id}/trigger-agent:
    post:
      tags:
        - Ticket API
      summary: Trigger Ticket Agent
      description: >-
        Ask Serval to process an existing open ticket, including human-assigned
        tickets. The current assignee is preserved and paused AI resumes. The
        trigger and optional instructions create no ticket message or
        notification. Serval may reply and take its normal actions. Returns when
        accepted; processing is asynchronous and remains subject to normal agent
        policies. Retry with the same idempotencyKey and instructions.
      operationId: svrelay.publicv2.PublicAPIServiceV2.TriggerTicketAgent
      parameters:
        - name: ticket_id
          in: path
          required: true
          schema:
            type: string
            title: ticket_id
            description: >-
              Existing ticket to process. Must be open and unarchived. The
              current assignee is preserved.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                instructions:
                  type:
                    - string
                    - 'null'
                  title: instructions
                  description: >-
                    Optional instructions, up to 20000 bytes. Omit to review the
                    ticket and take the next appropriate step.
                idempotencyKey:
                  type: string
                  title: idempotency_key
                  description: >-
                    Required retry key (1-200 bytes), unique per ticket and
                    caller. Reuse with identical instructions to retry safely.
              title: TriggerTicketAgentRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svhelp.publicapi.TriggerTicketAgentResponse
      security:
        - BearerAuth: []
components:
  schemas:
    svhelp.publicapi.TriggerTicketAgentResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svhelp.publicapi.TicketAgentTrigger'
          title: data
          x-stainless-terraform-configurability: optional
      title: TriggerTicketAgentResponse
      additionalProperties: false
    svhelp.publicapi.TicketAgentTrigger:
      type: object
      properties:
        triggerId:
          type: string
          title: trigger_id
          description: >-
            Identifies the accepted request. Acceptance does not mean the agent
            has finished or resolved the ticket.
          x-stainless-terraform-configurability: optional
      title: TicketAgentTrigger
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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