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

TelephonyCampaigns

Cancel a telephony campaign

POST /agents/{agent_name}/telephony_campaigns/{campaign_name}:cancel

Cancels a validating or running Campaign using If-Match. Stops new calls and retries; connected calls finish naturally. Returns 202 with an operation monitor to track completion.

Header parameters

Foundry-Features enum required

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

VoiceAgents=V1Preview
If-Match string required

Exact current token; no wildcards. Without replay, missing Campaigns return 404 and stale tokens 412. Starting cancellation outside validating/running returns 409.

Operation-Id string

Optional retry key, generated if omitted. Original If-Match/key replays 202 even after deletion/name reuse, never touching a replacement; conflicts return 409. Failed cancellation needs a fresh key/current token.

Path parameters

agent_name string required

Owning Agent; never overridden in recipient inputs.

campaign_name string required

Campaign name.

Query parameters

api-version string required

The API version to use for this operation.

Responses

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

Headers

Cache-Control enum required

Prevents caches from treating the control token as a validator for changing progress.

no-store
Operation-Location string required

Absolute polling URI including api-version.

Operation-Id string required

Stable cancellation operation ID for this accepted request.

Retry-After integer required

Suggested polling delay in seconds.

Body

Content-Type: application/json
id string required

Server-assigned unique identifier.

status string | enum required

Extensible status values shared by Foundry jobs.

Any of the following:
string
enum
queuedin_progresssucceededfailedcancelledskipped
error OpenAI.Error
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[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

kind string | enum required

Kind of asynchronous work associated with a Campaign.

Any of the following:
string
enum
validationcanceldelete
created_at integer required
finished_at integer

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[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

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[]

Additional errors that contributed to this failure.

additionalInfo object

Additional structured information about the failure.

debugInfo object

Diagnostic information supplied by the service for troubleshooting.

Request

POST /agents/{agent_name}/telephony_campaigns/{campaign_name}:cancel HTTP/1.1

Response

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