---
title: "Configure the request using a POST or PUT method"
slug: "configure-the-request-using-a-post-or-put-method"
abstract: "How to configure a POST or PUT request when creating a connection to a data system or analytical model (Sitecore Personalize)."
---
# Configure the request using a POST or PUT method

After you [authenticate the connection](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/connecting-sitecore-personalize-to-an-external-system/connecting-sitecore-personalize-to-a-data-system-or-analytical-model/name-and-authenticate-a-connection-to-a-data-system-or-analytical-model.html "Name and authenticate a connection to a data system or analytical model"), you can configure the request using a `POST` or `PUT` method. Use a `POST` method if you want to send data to create a child resource under the resource collection. Alternatively, use a `PUT` method if you want to send data to update an existing resource, or if the resource does not exist yet, create a new resource.

To configure the request using a `POST` or `PUT` method:

1. On the **Configure Request** screen, click **POST** or **PUT** from the method drop-down list.
2. In the **Request URL** field, enter the URL to send the request. Use the following format: `https://example.com/api/endpoint`
3. Click **Show Default Headers** to display the default headers and parameters for the REST request:
    - **Accept** - this field displays *application/json* to specify that JSON is the accepted format for the response.
    - **Accept-Encoding** - this field displays *gzip* to specify that gzip is the accepted compression type.
    - **Content-Type** - this field displays *application/json* to specify that JSON is the format of content sent in the `POST` or `PUT` method.

        > [!tip]
        > Headers and parameters represent the meta-data associated with the REST API request and response. Headers and parameters contain information that can help you troubleshoot issues.

4. To add additional headers, click **Add Header**. In the additional row that displays, enter the following:
    - **Key** - the header name.
    - **Value** - the parameter.
5. To configure the **Connection** timeout:
    - **Connection Timeout (ms)** - in the drop-down list, click the milliseconds for the connection to timeout. This is the number of milliseconds of inactivity before the connection closes. This displays **1000 milliseconds** by default.
    - **Read Timeout (ms)** - in the drop-down list, click the milliseconds for the read timeout. This is the number of milliseconds that the connection remains open without a response from the server. This displays **1000 milliseconds** by default.
6. In the **Request Body** window, enter a sample JSON request to test your connection. Ensure that the JSON is valid. Do not send real guest contact details in the sample request.
7. Click **Test Request**. The results of the test display in the **Response** window with the relevant status code.
8. Click **Next**. The **Output Configuration** screen displays for you to set the parameters that the user can select when they add the data system or analytical model to the canvas when creating a decision model variant. You must continue to [configure output references](https://doc.sitecore.com/personalize/en/users/sitecore-personalize/connecting-sitecore-personalize-to-an-external-system/connecting-sitecore-personalize-to-a-data-system-or-analytical-model/configure-output-references-for-a-connection-in-sitecore-personalize.html "Configure output references for a connection in Sitecore Personalize") or your connection will not be saved.