Send one way request

The send-one-way-request policy sends the provided request to the specified URL without waiting for a response.


Set the policy's elements and child elements in the order provided in the policy statement. Learn more about how to set or edit API Management policies.

Policy statement

<send-one-way-request mode="new | copy" timeout="time in seconds">
  <set-url>request URL</set-url>
  <authentication-certificate thumbprint="thumbprint" />


Attribute Description Required Default
mode Determines whether this is a new request or a copy of the headers and body in the current request. In the outbound policy section, mode=copy does not initialize the request body. Policy expressions are allowed. No new
timeout The timeout interval in seconds before the call to the URL fails. Policy expressions are allowed. No 60


Element Description Required
set-url The URL of the request. Policy expressions are allowed. No if mode=copy; otherwise yes.
set-method Sets the method of the request. Policy expressions aren't allowed. No if mode=copy; otherwise yes.
set-header Sets a header in the request. Use multiple set-header elements for multiple request headers. No
set-body Sets the body of the request. No
authentication-certificate Certificate to use for client authentication, specified in a thumbprint attribute. No
proxy Routes request via HTTP proxy. No



This example uses the send-one-way-request policy to send a message to a Slack chat room if the HTTP response code is greater than or equal to 500. For more information on this sample, see Using external services from the Azure API Management service.

    <when condition="@(context.Response.StatusCode >= 500)">
      <send-one-way-request mode="new" timeout="20">
                return new JObject(
                        new JProperty("username","APIM Alert"),
                        new JProperty("icon_emoji", ":ghost:"),
                        new JProperty("text", String.Format("{0} {1}\nHost: {2}\n{3} {4}\n User: {5}",
                                                context.Request.Url.Path + context.Request.Url.QueryString,

Next steps

For more information about working with policies, see: