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

# Create Call Outcome

> Create a call outcome for an agent.

Call outcomes are the end-states a call can be classified into after analysis
— "resolved", "escalated", "no answer". Each carries an `outcome_type` of
success or failure, which drives the success rate on your dashboards.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json post /api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/call-outcomes
openapi: 3.1.0
info:
  title: My Public API
  version: 1.0.0
servers:
  - url: https://api.usetuner.ai
security: []
tags:
  - name: calls
    x-group: Calls
  - name: workspaces
    x-group: Workspaces
  - name: agent-settings
    x-group: Agent Settings
  - name: agents
    x-group: Agents
  - name: simulation
    x-group: Simulation
  - name: providers
    x-group: Providers
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/call-outcomes:
    post:
      tags:
        - agent-settings
      summary: Create Call Outcome
      description: >-
        Create a call outcome for an agent.


        Call outcomes are the end-states a call can be classified into after
        analysis

        — "resolved", "escalated", "no answer". Each carries an `outcome_type`
        of

        success or failure, which drives the success rate on your dashboards.
      operationId: >-
        create_call_outcome_api_v1_workspaces__workspace_id__agents__agent_id__settings_call_outcomes_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            description: Tuner's internal numeric ID for the agent.
            title: Agent Id
          description: Tuner's internal numeric ID for the agent.
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            description: Workspace ID. Find this in Workspace > General Settings.
            title: Workspace Id
          description: Workspace ID. Find this in Workspace > General Settings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallOutcomeInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallOutcomeResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                detail: Not authenticated
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have access to this workspace.
          content:
            application/json:
              example:
                detail: User does not have access to workspace 42
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agent not found.
          content:
            application/json:
              example:
                detail: Agent with ID 17 not found
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    CallOutcomeInput:
      properties:
        label:
          type: string
          maxLength: 200
          minLength: 1
          title: Label
          description: Display name for this outcome, shown on call records and dashboards.
        prompt_definition:
          type: string
          minLength: 1
          title: Prompt Definition
          description: 'Instruction the AI uses to decide whether a call ended this way. '
        outcome_type:
          type: string
          enum:
            - success
            - failure
          title: Outcome Type
          description: >-
            Whether this outcome counts as a success or a failure. Drives the
            success rate on dashboards and alerts.
        stop_analysis:
          type: boolean
          title: Stop Analysis
          description: >-
            Skip the remaining analysis steps when a call matches this outcome.
            Use for outcomes where further grading isn't meaningful, such as a
            call that never connected.
          default: false
      type: object
      required:
        - label
        - prompt_definition
        - outcome_type
      title: CallOutcomeInput
      description: Input schema for call outcome.
    CallOutcomeResponse:
      properties:
        id:
          type: integer
          title: Id
          description: Unique identifier for the call outcome.
          examples:
            - 5
        label:
          type: string
          title: Label
          description: Display name for this outcome, shown on call records and dashboards.
          examples:
            - Resolved
        ui_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Ui Description
          description: Optional longer description of the outcome, shown in the UI.
          examples:
            - The caller's issue was fully resolved on this call.
        prompt_definition:
          type: string
          title: Prompt Definition
          description: Instruction the AI uses to decide whether a call ended this way.
          examples:
            - >-
              The caller confirmed their issue was resolved before ending the
              call.
        outcome_type:
          type: string
          enum:
            - success
            - failure
          title: Outcome Type
          description: >-
            Whether this outcome counts as a success or a failure. Drives the
            success rate on dashboards and alerts.
          examples:
            - success
        stop_analysis:
          type: boolean
          title: Stop Analysis
          description: >-
            Skip the remaining analysis steps when a call matches this outcome.
            Use for outcomes where further grading isn't meaningful, such as a
            call that never connected.
          examples:
            - false
      type: object
      required:
        - id
        - label
        - prompt_definition
        - outcome_type
        - stop_analysis
      title: CallOutcomeResponse
      description: Response schema for call outcome.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Human-readable description of what went wrong.
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error body returned when a request fails.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Bearer:
      type: http
      description: >-
        Use Tuner API key (tr_api_...) or user session token. Find your API key
        in Workspace Settings > API Keys.
      scheme: bearer

````