---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Scripting outbound REST

# Scripting outbound REST {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

You can send outbound REST requests from any
place in the ServiceNow AI Platform where
scripting is allowed.

For example, you can return data from a REST endpoint
using a business rule when an event is triggered. Create a script from scratch or let the REST
message preview feature create the script based on content and parameters you provide in the
method record.{#c_ScriptingOutboundREST__p_outbound_rest_scripting_overview}

For detailed API information about the server-side RESTMessageV2 and RESTResponseV2 APIs, see
the API documentation on [developer.servicenow.com](https://developer.servicenow.com/app.do#!/home). For additional tips and best practices, see
the [Outbound REST Web Services RESTMessageV2 and SOAPMessageV2
execute() vs executeAsync() Best Practices \[KB0694711\]](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694711) article in the Now Support
Knowledge Base.
* **[Generate a REST message script preview](https://servicenow-prod.fluidtopics.net/AU5qFs_7_bRgGcjd07BhoA)**   
  You can generate an example script to send a REST message based on content and parameters you provide in the method record.
* **[Direct RESTMessageV2 example](https://servicenow-prod.fluidtopics.net/6oOpLY1WSw_qV8_mg5IhHw)**   
  You can send an outbound REST message directly to the endpoint.
* **[RESTMessageV2 MID server example](https://servicenow-prod.fluidtopics.net/s7ssqIW2iBF4L9Itv2~cZA)**   
  You can send an outbound REST message through a MID Server.
* **[Recordless RESTMessageV2 example](https://servicenow-prod.fluidtopics.net/xapNUxne_80Ic6CsVJJEMQ)**   
  You can use the RESTMessageV2() constructor with no parameters to define a REST message entirely in the script.

