---
schema_version: "1"
id: 3f22bd08d25f4a8ebecef619195cbf4a2284657d5c79815e57d56241d5b9e681
title: Configure an HTTP Callout Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/flow_http_callout_configure.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.flow_http_callout_configure.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: bdb76b47ad2e9d26b4dac8bff75ce247b497afb31e148e607267671f1d1119ce
description: HTTP Callout guides you through entering the details about the HTTP web-based service or REST API endpoint that you're connecting to. After you complete the configuration, you invoke the action in a flow. HTTP Callout assumes that you're familiar with the API that you want to call.
products:
  - Flow Builder
  - Salesforce Platform
release: "264"
---
# Configure an HTTP Callout Action

HTTP Callout guides you through entering the details about the HTTP web-based service or REST API endpoint that you're connecting to. After you complete the configuration, you invoke the action in a flow. HTTP Callout assumes that you're familiar with the API that you want to call.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=platform.flow_ref_supported_editions.htm&amp;release=264.0.0&amp;type=5" title="Learn about the editions and user interfaces that support Flow Builder. Some Flow Builder features integrate with other Salesforce products that require additional licenses.">View supported editions.</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="vertical-align:top;" id="d230156e63">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d230156e63 ">To open, edit, create, activate or
              deactivate a flow using all flow types, elements, and features available in Flow
              Builder, including Einstein and Agentforce for Flow:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d230156e63 ">Manage Flow</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d230156e63 ">To create an external credential, a named credential, and an HTTP callout
              action:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d230156e63 ">Customize Applications</td>

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

Before you configure an HTTP callout action:

- Create an external credential and a named credential so that the external service can connect to the API. See [Guidelines for Authenticating HTTP Callout Actions](https://help.salesforce.com/s/articleView?id=platform.flow_http_callout_guidelines_authenticating.htm&release=264.0.0&type=5 "Before you configure an HTTP Callout action within Flow Builder, set up a named credential to authenticate requests to the external system. From Setup, follow these guidelines to create a permission set, auth provider, external credential, and named credential, in that order; then grant users access to the User Credentials object.").
- Prepare a sample API response in JSON format. If a sample doesn't exist in the API's documentation, you can use a third-party API platform to retrieve a response.
- Start with an API that's well documented. If details such as field requirements or definitions are inaccurate or outdated, it can take time to debug.

1. Open the Flows list view.
    
    - From the Automation app, select the **Flows** tab.
    - From the **Flows** tab in any Lightning app, click the actions menu and select **Open Flow**.
    - From Setup, in the Quick Find box, enter Flows, and then select **Flows**.
    
    Note that the Automation app and Flows tab options don't require Setup access.
2. Open an existing flow that you want to use the callout in or create one.
3. Add an Action element to the flow and click **Create HTTP Callout**.
4. Configure the external service that connects Salesforce to the HTTP-based API.
    1. Enter a name for the external service, such as ConnectToMaps. The name must begin with a letter and contain only alphanumeric characters without spaces.
    2. For reference, enter a description that describes what the external service connects to.
    3. Select the named credential that you created for this external service.
        
        Salesforce autopopulates the URL associated with the credential.
    4. Click **Next**.
5. Configure the invocable action that you can use in Flow Builder or across Salesforce.
    1. For Label, enter the action that the callout performs, for example, Connect to Maps.
    2. Select the operation or method required by the API that you're calling.
        
        Generally, GET brings in external data. The rest of the methods modify data in an external system. The functionality depends on the API.
    3. Enter a description of the API performing the operation, and include a link to the API document so that you can reference it if you change the callout.
6. Add the URL endpoint for the request.
    
    The base URL shows the Named Credential URL for the external service. If you can't see the entire URL, click the field.
    
    1. Enter the URL path for the endpoint that starts with a slash (/) and doesn't contain a question mark (?).
        
        The supported characters for a URL path include alphanumeric characters, underscores, slash, and curly brackets.
    2. If you have path variables, place them in curly brackets, and select the variable's data type. Path variables can contain only alphanumeric characters and underscores.
    3. Enter the variable's description, including usage details.
7. Add query parameter keys if the API you're calling has them. When you use this action in a flow, you input values for the defined keys.
    1. Click **\+ Add Key**.
    2. Enter the key value and select the data type.
    3. To require a value when the flow invokes the action, select **Require**.
    4. Enter the query parameter key's description, including usage details.
8. For POST, PUT, PATCH, and DELETE, provide a sample API request body. Salesforce generates a data structure from the sample request.
    
    If your external service uses any type (schema: {}), skip this step and the next step. Connect a record variable directly to the body input in the flow.
    
    1. Click **New**.
    2. Paste a sample JSON request.
    3. Click **Review** and confirm that the Apex data structure is correct.
    4. To make changes, edit the text in Sample JSON Request or select data types from the data structure.
    5. Click **Review**.
    6. Click **Done**.
9. Provide a sample API response body. Salesforce generates a data structure from the sample response.
    1. Click **New**.
    2. Paste a sample JSON response.
    3. Click **Review** and confirm that the Apex data structure is correct.
    4. To make changes, edit the text in Sample JSON Response or select data types from the data structure.
    5. Click **Review**.
    6. Click **Done**.
10. Click **Save**.
    
    Flow Builder creates the action and external service. The action is available in the Actions window in the flow.
11. For POST, PUT, PATCH, and DELETE, set the body for the flow by creating a resource and selecting the Apex class for the external server's body.
    
    If your external service uses any type (schema: {}), skip this step. Connect a record variable directly to the body input instead of creating an Apex-defined variable.
    
    1. For body, select **New Resource**.
    2. Enter an API name for the new resource.
    3. Enter a description that describes the variable and how it's used.
        
        The data type and Apex class are set for you. The Apex class for the HTTP callout action uses this naming convention: ExternalServiceName\_\_HTTP Callout Label\_IN\_body. For example, if the external service name is MyCustomES and the label for the new HTTP Callout is Get Accounts, then the Apex class is MyCustomES\_Getx20Accounts\_IN\_body, where x20 represents a space in the label.
    4. Click **Done**.
    5. For body, select the Apex-defined variable that you created.
    6. Click **Done**.

To transform the data between Salesforce and the external system in the flow, use the Transform element. For POST, PUT, PATCH, and DELETE methods, you then add an Assignment element before the HTTP callout action. In the Assignment element, assign values for each of the fields on the Apex-defined variable. The HTTP callout action references the Apex-defined variable as the input to create the data in the external server.

Flow Builder creates Apex classes automatically from the inferred data structures to store data that's transferred between Salesforce and the external server. The Apex class naming convention for HTTP callout actions that use the GET method is ExternalServiceName\_\_HTTP Callout Label\_OUT\_2XX. For example, if the external service name is MyCustomES and the label for the new HTTP Callout is Get Accounts, then the Apex class is MyCustomES\_Getx20Accounts\_OUT\_2XX. To delete an Apex class, delete the external service associated with the Apex class. For more information, see [Delete an External Service](https://help.salesforce.com/s/articleView?id=platform.external_services_manage_delete.htm&type=5&language=en_US).

#### See Also

- [HTTP Callout Considerations and Limits](https://help.salesforce.com/s/articleView?id=platform.flow_http_callout_considerations.htm&release=264.0.0&type=5 "When using HTTP Callout, keep these considerations and limits in mind.")