---
schema_version: "1"
id: 4904828d39e05d9f00da4ed3d26982373e80858646e81bdf87805cdb64fa846a
title: Calling Web Services with the Omniscripts HTTP Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_http_action_12374.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_http_action_12374.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 331539c480893f7ef86a0f510d743b310348803bc91e49d8e38b6d9a6dba11d5
description: With the HTTP Action, call internal and external web services from an Omniscript without coding or making Salesforce API calls. You can call an HTTP API that allows Apex, Named Credentials, SOAP/XML, or Web, and use the Omniscript's JSON as input.
products:
  - Omnistudio
release: "264"
---
# Calling Web Services with the Omniscripts HTTP Action

With the HTTP Action, call internal and external web services from an Omniscript without coding or making Salesforce API calls. You can call an HTTP API that allows Apex, Named Credentials, SOAP/XML, or Web, and use the Omniscript's JSON as input.

To make sure that the HTTP Action functions correctly without errors related to Content Security Policy (CSP) restrictions, you must add a trusted URL in the Setup, and specify CSP directives and Permissions-Policy directives. When adding this URL, it's important to select all checkboxes under CSP Directives to fully configure the directives. See [Add or Edit a Trusted URL](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/security_trusted_urls_manage.htm).

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)

Note

You must add the Salesforce org's domain into a Remote Site's **Remote Site URL** field. For more information, see [Adding Remote Site Settings](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_remote_site_settings.htm).

Use the HTTP Action to:

- Send GET, POST, PUT, or DELETE requests to standard REST Endpoints.
- Call Apex REST.
- Access Salesforce Named Credential (OAuth) identity services.

Configure the HTTP settings to call web services.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
      <colgroup>
        <col>
        <col>
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d66137e82">
            <p style="margin-bottom:0;">Property</p>
          </th>
          <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d66137e88">
            <p style="margin-bottom:0;">Description</p>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">HTTP Path</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">The request URL of the API. For example, <code>/NS/v1/application</code>. <samp class="parmname">NS</samp> = namespace of the
            Apex REST API. The path can contain <strong class="uicontrol">merge fields</strong>. For
            example, to pass a UserId node from the data JSON, add the node name with
            percentage signs on either side, i.e., %UserId%.</td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">HTTP Method</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p>The method name, which has two parameters. For example,
              <strong class="uicontrol">doPost(String fullJSON, String filesMap)</strong>.
            </p>
            <p style="margin-bottom:0;">GET,
              POST, PUT, PATCH, or DELETE.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Endpoint Type</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p>Specifies the endpoint type:</p><a name="os_http_action_12374__ul_jrv_mcn_ncc"><!-- --></a>
            <ul id="os_http_action_12374__ul_jrv_mcn_ncc">
              <li>
                <p>Apex — Invokes Apex REST. You must add the Salesforce org's domain to
                  a Remote Site's&nbsp;<strong class="uicontrol">Remote Site URL</strong>&nbsp;field.</p>
              </li>

              <li>
                <p>Named Credential — Access Salesforce Named Credential (OAuth) identity
                  services.</p>
              </li>

              <li>
                <p>SOAP/XML — Send requests to standard REST endpoints using XML format
                  for the request and response bodies.</p>
              </li>

              <li>
                <p>Web — Send requests to standard REST endpoints (unauthenticated or
                  credentials in HTTP headers).</p>
              </li>

            </ul>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Named Credential</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">Salesforce named credential. For Named Credential and optionally SOAP/XML
              endpoint types.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">HTTP Headers</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">HTTP headers specified as key-value pairs. Supports merge field syntax.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Parameters</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">URL parameters specified as Key/Value pairs. Supports merge field
              syntax.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Encode URI</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">Uses HTML escape codes in the URI.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Cache response</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">Caches the response.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Require credentials</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">Requires security credentials such as a username and password.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Extra Payload </p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">Sends additional Key/Value pairs. Supports merge field syntax.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;">Send body</p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">Sends the Extra Payload as the request body for a POST action.</p>
          </td>

        </tr>
        <tr class="">
          <td data-label="Property" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e82 ">
            <p style="margin-bottom:0;"> Send only extra payload </p>
          </td>

          <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d66137e88 ">
            <p style="margin-bottom:0;">Enables the action to send Extra Payload's key-value pairs without including
              the Omniscript's data JSON.</p>
          </td>

        </tr>
      </tbody>
    </table>