Skip to main content
Users
Developers
CloudPortalLogin
  • Powered byPowered by
Introduction to the Sitecore Send API
Getting started with the Sitecore Send API
API reference
  • Sitecore Send API documentation
  • Getting started with the Sitecore Send API
  • Request and response parameters

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 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/json

application/xml

application/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.

RequestResponse
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:

RequestResponse
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:

RequestResponse
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:

RequestResponse
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.

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

RequestResponse
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, 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.

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

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

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore