---
title: "Request and response parameters"
slug: "request-and-response-parameters"
abstract: "Describes the different types of request and response parameters that are used when making calls to the Sitecore Send API."
---
# Request and response parameters

When making an API request, you can pass different parameters to the API endpoints to determine the response. There are several types of request parameters: header parameters, path parameters, query parameters, and request body parameters.

Not all Sitecore Send API endpoints contain each type of parameter. The [API Reference](https://doc.sitecore.com/send/en/developers/api-documentation/api-reference.html "API reference") details the specific request and response parameters for each API endpoint.

## Header parameters

You must set the correct header parameters in every API request to retrieve the response data in the expected format and data type. The following headers are supported in Sitecore Send API requests:

| Request header | Value |
| --- | --- |
| Accept | application/jsonapplication/xmlapplication/html+xml |
| Content-Type | application/json |

For the response header parameter, only the JSON type is supported.

| Request header | Value |
| --- | --- |
| Accept | application/json |
| Content-Type | application/json |

## Query parameters

You can use query parameters for filtering, pagination, and partial responses in the Sitecore Send API. Query parameters are added to the request URL after the query string `?`. You can add one or more query parameters separated by `&`.

The following is an example that shows three query parameters `apikey`, `WithStatistics`, and `SortMethod`.

```curl
curl --include \\
'https://{hostname}/v3/lists.{Format}?apikey=value1&&WithStatitiscs=value2&SortMethod=value3'
```

When you have an API request that uses query parameters, you must add the actual value of each parameter after the `=`. For example:

```curl
curl --include \\
'https://{hostname}/v3/campaigns.{Format}?apikey=bafe55f4-e53e-4651-8164-c6d6ff05081b'
```

The `apikey` is an example of a request query parameter that is required in all Sitecore Send API endpoints.

## Path parameters

You can use path parameters as identifiers to help you structure your requests. Path parameters appear within the path of the request URL before the query string `?` and are usually indicated in curly brackets `{ }`.

The following example shows three path parameters `Page`, `PageSize`, and `Format`:

```curl
curl --include \\
'https://{hostname}/v3/lists/{Page}/{PageSize}.{Format}?'
```

When you have an API request that uses path parameters, you must replace the path parameter with their actual values in your request. For example:

```curl
curl --include \\
'https://{hostname}/v3/lists/1/100.json?'
```

`Format` is an example of a path parameter that is required in all Sitecore Send API endpoints. There are only two available formats you can use in getting a response: `xml` and `json`.

## Request body parameters

For `POST` requests, you must include a request body with parameters. You can find the details of request body parameters for each endpoint, including required fields in the [API Reference](https://doc.sitecore.com/send/en/developers/api-documentation/api-reference.html "API reference").

The following is an example of a request body containing the `Name`, `ConfirmationPage`, and `RedirectAfterUnsubscribePage` parameters:

```curl
curl --include \\
     --request POST \\
     --header "Content-Type: application/json" \\
     --header "Accept: application/json" \\
     --data-raw '{
        "Name": "New List",
        "ConfirmationPage": "www.someUrl.com",
        "RedirectAfterUnsubscribePage": "www.someUrl.com"
     }' \\
'https://{hostname}/v3/lists/create.{Format}?apikey='
```

## Response body parameters

All responses to API calls include an [HTTP status code](https://doc.sitecore.com/send/en/developers/api-documentation/getting-started-with-the-sitecore-send-api/http-status-codes.html "HTTP status codes"), a response header, and a response schema with a JSON-formatted body. You can find the details of the response body parameters corresponding to each endpoint in the [API Reference](https://doc.sitecore.com/send/en/developers/api-documentation/api-reference.html "API reference").

The following is an example of a JSON response body containing three parameters for `Code`, `Error`, and `Context`:

```json
{
  "Code": 0,
  "Error": null,
  "Context": "e5f6c0a3-1fe6-4d89-951e-eafae0b01368"
}
```