---
title: "Mark a task as complete"
method: POST
path: "/tasks/{taskId}/complete"
---

# Mark a task as complete

`POST /tasks/{taskId}/complete`

## Request

- Base URL: `https://api.vogent.ai/api`
- URL: `https://api.vogent.ai/api/tasks/{taskId}/complete`
- Auth: HTTP bearer

Marks a task as complete with the results from a dial.

## Path parameters

- `taskId` string, required

## Request body

- MarkTaskCompleteInput
  - `dialId` string, required: The ID of the completed dial.

## Response `200`

Successful operation

- DialTask
  - `id` string, required
  - `status` 'PENDING' | 'RUNNING' | 'COMPLETED', required
  - `inputData` object, required
  - `keyInputs` string[], required
  - `results` object, nullable
  - `createdAt` string, date-time, required
  - `completedDial` Dial
    - `id` string, required
    - `toNumber` string
    - `agent` Agent
      - `id` string, required
      - `name` string, required
      - `transcriberParams` TranscriberParams
        - `type` string, required: By default, the only supported option is deepgram. Please contact support if you'd like access to more options.
        - `keywords` string[]: Keywords to be used for transcription.
      - `metadata` object
      - `utteranceDetectorConfig` UtteranceDetectorConfig
        - `sensitivity` 'ULTRA_FAST' | 'FAST' | 'MEDIUM' | 'SLOW', required
        - `interruptionPlayTimeMs` integer, nullable: The minimum amount of time in milliseconds that the agent will continue speaking after being interrupted. Defaults to 0.
      - `endpointDetectorConfig` EndpointDetectorConfig
        - `type` 'SIMPLE' | 'SEMANTIC', required
        - `mode` 'CONSERVATIVE' | 'DEFAULT' | 'AGGRESSIVE'
      - `ivrConfiguration` IVRConfiguration, nullable
        - `detectionType` 'NONE' | 'STANDARD', required: The type of IVR detection to use for the agent.
        - `versionedPromptId` string, nullable: The versioned prompt ID to use for IVR detection.
        - `aiVoiceId` string, nullable: The AI voice ID to use for IVR detection.
        - `taggingText` string, nullable: The tagging text for IVR detection.
      - `idleMessageConfig` IdleMessageConfig
        - `enabled` boolean, required: Whether idle messages are enabled for this agent.
        - `messages` string[]: The list of idle messages that the agent can say when the user is silent.
        - `idleDurationMilliseconds` integer: The duration in milliseconds that the user must be silent before an idle message is triggered.
        - `maxIdleMessages` integer: The maximum number of idle messages that can be said during a call.
      - `language` string, required: The language to use for the agent.
      - `maxDurationSeconds` integer: The maximum duration of the call in seconds.
      - `timeoutMessage` string, nullable: An optional message to play via TTS before hanging up when the call reaches its max duration timeout.
      - `timeoutBehaviorConfiguration` TimeoutBehaviorConfiguration, nullable
        - `behavior` 'HANGUP' | 'TRANSFER', required: The behavior when a call reaches its max duration timeout. HANGUP disconnects the call, TRANSFER forwards to a specified number.
        - `transferNumber` string, nullable: The phone number to transfer to when behavior is TRANSFER.
      - `defaultVoiceId` string: The default voice ID to use for the agent.
      - `defaultVersionedPromptId` string: The default versioned prompt ID to use for the agent.
      - `defaultExtractorId` string, nullable: The default extractor ID to use for the agent.
      - `linkedFunctionDefinitions` LinkedFunctionDefinition[]: The function definitions that should be available to this agent.
        - `functionDefinitionId` string, required: The ID of the function definition to link.
        - `lifecycleMessagesOverride` FunctionLifecycleMessages
          - `started` string[], required: Messages to display when the function starts executing. One will be chosen at random.
          - `waiting` string[]: Messages to play while the function is still running and the model returned StillWaiting. One will be chosen at random. If empty, a built-in default set of English phrases is used.
          - `awaitSpeech` boolean: Hold the function until the agent has finished speaking — any text said alongside the call, then the started message — instead of running it while the agent is still talking. Defaults to false.
      - `fillEmptyStringVariables` boolean: If true, variables that are not specified will be filled with empty strings instead of being left as template placeholders.
      - `silenceHangupConfiguration` SilenceHangupConfiguration, nullable
        - `type` 'DISABLED' | 'FIRST_MESSAGE_ONLY' | 'WHOLE_CALL', required: The type of silence hangup behavior. DISABLED means no silence hangup, FIRST_MESSAGE_ONLY means only hangup if no first message is received, WHOLE_CALL means hangup after silence at any point in the call.
        - `silenceDurationSeconds` integer: The duration of silence in seconds before hanging up.
      - `ivrSilenceHangupConfiguration` SilenceHangupConfiguration, nullable
        - `type` 'DISABLED' | 'FIRST_MESSAGE_ONLY' | 'WHOLE_CALL', required: The type of silence hangup behavior. DISABLED means no silence hangup, FIRST_MESSAGE_ONLY means only hangup if no first message is received, WHOLE_CALL means hangup after silence at any point in the call.
        - `silenceDurationSeconds` integer: The duration of silence in seconds before hanging up.
      - `voicemailConfig` VoicemailConfig, nullable
        - `detection` 'DISABLE' | 'HANGUP' | 'LEAVE_VOICEMAIL', required: How the agent reacts to an answering machine. DISABLE disables voicemail detection, HANGUP ends the call on detection, LEAVE_VOICEMAIL waits for the beep and speaks the configured message before hanging up.
        - `message` string, nullable: The text to speak via TTS when leaving a voicemail. Required when detection is LEAVE_VOICEMAIL.
      - `voiceOptionValues` ModelOptionValue[]: The configuration values for the voice being used by the agent.
        - `optionId` string, required: The ID of option.
        - `value` string, required
    - `recordings` CallRecording[]
      - `url` string, required: A URL that can be used to download the recording of the call. Be sure to include an API key in the header to access the recording.
    - `transcript` CallTranscriptEntry[]
      - `text` string, required
      - `speaker` string, required: Either `HUMAN` or `AI`, indicating the speaker type. If this is a function call result the speaker will be `AI`, while the `detailType` will be `function`.
      - `detailType` string, nullable: Will be `function` if this is a function result, otherwise `null`.
      - `functionCallId` string: The function call ID if this is a tool call result.
      - `startTimeMs` integer
      - `endTimeMs` integer
      - `functionCalls` CallTranscriptFunctionCall[]
        - `functionCallId` string
        - `name` string, required
        - `args` string, required: The arguments to the function call, JSON encoded if it is an object.
      - `nodeTransition` CallTranscriptNodeTransition
        - `toNodeId` string, required
        - `transitionData` object, nullable, required
    - `durationSeconds` integer: The total duration of the call, including all telephony time (if the call was transferred, this will include the transfer time)
    - `aiDurationSeconds` integer: The total duration of the call during which the AI was involved. Does not include transfer time.
    - `aiResult` object
    - `inputs` object
    - `status` string
    - `dialTaskId` string
    - `fromNumberId` string
    - `startedAt` string, date-time
    - `endedAt` string, date-time
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `systemResultType` 'BUSY' | 'FAILED' | 'NO_ANSWER' | 'CANCELLED' | 'USER_HANGUP' | 'COUNTERPARTY_HANGUP' | 'TIMEOUT' | 'RATE_LIMITED' | 'TRANSFERRED' | 'AGENT_HANGUP' | 'VOICEMAIL_DETECTED_HANGUP' | 'LONG_SILENCE_HANGUP': The type of system result for a dial.
    - `voiceId` string
    - `versionedPromptId` string

## Other responses

- `400`: Invalid input
- `422`: Validation exception

---

[API](https://skmtc.dev/vogent/apis/vogent-openapi-3-0.md) - [All operations](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/revisions/a5966cc364ef?raw)
