Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Agent Telephony

Cancel an outbound telephony call job

POST /agents/{agent_name}/telephony/call_jobs/{call_job_id}:cancel

Requests cancellation of a durable outbound call job. A connected call is allowed to finish.

Header parameters

Foundry-Features enum

A feature flag opt-in required when using preview operations or modifying persisted preview resources.

VoiceAgents=V1Preview
If-Match string required

The entity tag returned by the latest read. The request fails if the resource changed since that read.

Path parameters

agent_name string required
call_job_id string required

Query parameters

api-version string required

The API version to use for this operation.

Responses

The request has succeeded.

Headers

ETag string required

The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource. It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed. It is a string of ASCII characters placed between double quotes, like "675af34563dc-tr34".

Body

Content-Type: application/json
destination TelephonyOutboundDestination required

The destination of an outbound call.

type string | enum required

The type of destination for an outbound call.

Any of the following:
string
enum
phone_number
value string required

The destination E.164 phone number.

connection_name string required

The Foundry connection name in the current project used to originate the call. Its category selects Twilio or Azure Communication Services / Teams Phone Extension. No inbound telephony binding is required.

source string required

An outbound caller identity: an E.164 phone number or a non-empty Teams Resource Account UUID. The connection category determines which form is accepted.

purpose string

An optional customer-declared purpose for placing the call.

structured_inputs object

Structured input values available to the agent and greeting for this call. Agent-declared inputs are validated against their schemas; omitted optional inputs may use their Agent-defined default values, while omitted required inputs are rejected. Additional inputs remain available as dynamic template variables.

schedule TelephonyCallJobSchedule

The optional execution window for a direct outbound call.

not_before integer
expires_at integer
id string required

A service-generated durable outbound call-job identifier.

object enum required

The object type. Always telephony.call_job.

telephony.call_job
agent_name string required

The name of the voice agent used at execution time.

status string | enum required

The lifecycle status of a durable outbound call job.

Any of the following:
string
enum
acceptedwaiting_for_schedulequeueddispatchingin_progresswaiting_for_retrycancellation_requestedcompletedblockedexpiredfailedcancelled
cancellation TelephonyCallJobCancellation

A cancellation request recorded for an outbound call job.

requested_by string required

The authenticated principal that requested cancellation.

mode string required

The cancellation mode applied to the call job.

requested_at integer required
revision integer required

The call-job revision at which cancellation was recorded.

retry_policy fixed_interval required

The retry policy for one durable outbound call intent. max_attempts includes the first attempt. Strategy-specific settings are defined by the derived policy.

One of the following:
fixed_interval TelephonyOutboundFixedIntervalRetryPolicy

The frozen fixed-interval retry policy returned for an outbound call or campaign.

type enum required

The fixed-interval retry strategy.

fixed_interval
interval integer required

A duration encoded as an integer number of seconds.

attempt_count integer required

The number of provider attempts created so far.

next_attempt_at integer
terminal_reason string | enum

Known terminal reasons for an overall outbound call job, which can span multiple provider attempts. These are distinct from individual call lifecycle reasons. Additional string codes may be returned.

Any of the following:
string
enum
no_answerno_answer_timeoutanswer_failedbridge_cancelledbridge_failedvoice_session_configuration_invalidconnection_project_mismatchoutbound_connection_changedoutbound_connection_unavailabletelephony_binding_invalidtelephony_binding_not_foundtelephony_binding_inactivetelephony_binding_changedcampaign_not_foundcampaign_cancelledcampaign_completedcampaign_failedorigination_fence_not_recordedorigination_reconciliation_timeoutcancellation_reconciliation_timeoutprovider_callback_timeout_cancellation_reconciliation_timeout
revision integer required

The monotonically increasing optimistic-concurrency revision.

created_at integer required
updated_at integer required

The request has been accepted for processing, but processing has not yet completed.

Headers

ETag string required

The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource. It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed. It is a string of ASCII characters placed between double quotes, like "675af34563dc-tr34".

Location string required
Retry-After integer required

A duration encoded as an integer number of seconds.

Body

Content-Type: application/json
destination TelephonyOutboundDestination required

The destination of an outbound call.

type string | enum required

The type of destination for an outbound call.

Any of the following:
string
enum
phone_number
value string required

The destination E.164 phone number.

connection_name string required

The Foundry connection name in the current project used to originate the call. Its category selects Twilio or Azure Communication Services / Teams Phone Extension. No inbound telephony binding is required.

source string required

An outbound caller identity: an E.164 phone number or a non-empty Teams Resource Account UUID. The connection category determines which form is accepted.

purpose string

An optional customer-declared purpose for placing the call.

structured_inputs object

Structured input values available to the agent and greeting for this call. Agent-declared inputs are validated against their schemas; omitted optional inputs may use their Agent-defined default values, while omitted required inputs are rejected. Additional inputs remain available as dynamic template variables.

schedule TelephonyCallJobSchedule

The optional execution window for a direct outbound call.

not_before integer
expires_at integer
id string required

A service-generated durable outbound call-job identifier.

object enum required

The object type. Always telephony.call_job.

telephony.call_job
agent_name string required

The name of the voice agent used at execution time.

status string | enum required

The lifecycle status of a durable outbound call job.

Any of the following:
string
enum
acceptedwaiting_for_schedulequeueddispatchingin_progresswaiting_for_retrycancellation_requestedcompletedblockedexpiredfailedcancelled
cancellation TelephonyCallJobCancellation

A cancellation request recorded for an outbound call job.

requested_by string required

The authenticated principal that requested cancellation.

mode string required

The cancellation mode applied to the call job.

requested_at integer required
revision integer required

The call-job revision at which cancellation was recorded.

retry_policy fixed_interval required

The retry policy for one durable outbound call intent. max_attempts includes the first attempt. Strategy-specific settings are defined by the derived policy.

One of the following:
fixed_interval TelephonyOutboundFixedIntervalRetryPolicy

The frozen fixed-interval retry policy returned for an outbound call or campaign.

type enum required

The fixed-interval retry strategy.

fixed_interval
interval integer required

A duration encoded as an integer number of seconds.

attempt_count integer required

The number of provider attempts created so far.

next_attempt_at integer
terminal_reason string | enum

Known terminal reasons for an overall outbound call job, which can span multiple provider attempts. These are distinct from individual call lifecycle reasons. Additional string codes may be returned.

Any of the following:
string
enum
no_answerno_answer_timeoutanswer_failedbridge_cancelledbridge_failedvoice_session_configuration_invalidconnection_project_mismatchoutbound_connection_changedoutbound_connection_unavailabletelephony_binding_invalidtelephony_binding_not_foundtelephony_binding_inactivetelephony_binding_changedcampaign_not_foundcampaign_cancelledcampaign_completedcampaign_failedorigination_fence_not_recordedorigination_reconciliation_timeoutcancellation_reconciliation_timeoutprovider_callback_timeout_cancellation_reconciliation_timeout
revision integer required

The monotonically increasing optimistic-concurrency revision.

created_at integer required
updated_at integer required

Client error

Body

Content-Type: application/json
error OpenAI.Error required
code string | null required
message string required
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Any of the following:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string required

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Body

Content-Type: application/json
error OpenAI.Error required
code string | null required
message string required
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Any of the following:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string required

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Request

POST /agents/{agent_name}/telephony/call_jobs/{call_job_id}:cancel HTTP/1.1

Response

Status: 200
Content-Type: application/json
Status: 202
Content-Type: application/json
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json
en-us
Your Privacy Choices
  • AI Disclaimer
  • Previous Versions
  • Blog
  • Contribute
  • Privacy
  • Consumer Health Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2026