--- title: Batch API description: The Batch API provides endpoints to send a single request containing multiple REST API calls, and returns a stream of response payloads.Sends multiple REST API requests in a single call. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/rest-apis/batch-api.html release: australia product: REST APIs classification: rest-apis topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 6 breadcrumb: [REST API reference, API reference, API implementation and reference] --- # Batch API The Batch API provides endpoints to send a single request containing multiple REST API calls, and returns a stream of response payloads. This REST API enables integrators to: - Decrease the amount of time required to send API requests by batching them together, and reduce overhead by narrowing authentication, session setup, and round-trip traffic to a single step. - Create more efficient code for client-side integrations. - Mix batch item formats and include them in single batch request. For example, one batch can include a Bases64-encoded request in XML format to send to one endpoint and a Base64 encoded request in JSON format to send to a different endpoint. - Receive a stream of response payloads in return. - Apply existing ACLs to each API call in the batch. You can include any API available on the instance in a Batch API call. For performance reasons, avoid including long-running requests and requests that retrieve large amounts of data. **Important:** The Batch API has the same performance characteristics as individual API requests but avoids the overhead of multiple client-server requests. The Batch API is not intended for parallel transaction processing and long-running API requests may cause the API request to exceed the maximum transaction time and return a failure. ## Size and processing limits Payloads adhere to these size limits: - Each item in the request: 5 MB. You can change this default by updating the **glide.rest.batch.max.inputSize** system property. Maximum value: 10 MB. - Each item in the response: 10 MB. You can change this default by updating the **glide.rest.batch.max.outputSize** system property or adding the **X-BATCHREQUEST-MAX-OUTPUT-SIZE** header to your request. The **X-BATCHREQUEST-MAX-OUTPUT-SIZE** header value cannot exceed the value of the system property. **Note:** If a request runs longer than 30 seconds, the **REST Batch API request timeout** transaction quota rule ends the transaction. Increasing the value of this transaction quota rule may result in performance issues. When a batch request reaches a size or processing limit, the system cancels the transaction and returns unprocessed requests in the **unserviced** JSON array in the response. **Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md) ## Batch - POST /now/batch Sends multiple REST API requests in a single call. You can include any API available on the instance in a Batch API call. For performance reasons, avoid including long-running requests and requests that retrieve large amounts of data. ### URL format Versioned URL: `/api/now/{api_version}/batch` ### Supported request parameters
| Name | Description |
|---|---|
| api\_version | Version of the endpoint to access. For example, `v1` or `v2`.Data type: String |
| Name | Description |
|---|---|
| batch\_request\_id | ID that identifies the batch of requests.Data type: String |
| rest\_requests | Required. List of request objects to include in the batch request. Data type: Array ``` "rest_requests":[ { "body": "String", "exclude_response_headers": Boolean, "headers":[Array], "id": "String", "method": "String", "url": "String" } ] ``` |
| rest\_requests.body | Base64-encoded body of the request. Only applies to methods that require a body, for example POST. Before encoding, the body can be in any format. For example, XML or JSON. Data type: String |
| rest\_requests.exclude\_response\_headers | Flag that indicates whether to exclude response headers from the response.Valid values: - true: Response headers are not included in the response. - false: Response headers are included in the response. Data type: Boolean Default: false |
| rest\_requests.headers | List of request header objects to send to the endpoint.Data type: Array ``` "headers":[ { "name":"String", "value":"String" } ] ``` |
| rest\_requests.headers.name | Name of the header.Data type: String |
| rest\_requests.headers.value | Value of the header.Data type: String |
| rest\_requests.id | Required. ID for each item in the batch.Data type: String |
| rest\_requests.method | Required. Method to call for the associated endpoint.Data type: String |
| rest\_requests.url | Required. Relative path of the endpoint to send the request to. Includes the query parameters. Data type: String |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **multipart/mixed**.To stream multipart responses, set the **glide.rest.serialize.disable\_response\_stream\_buffering** system property to true. For more information, see [Available system properties](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/r_AvailableSystemProperties.md). |
| Content-Type | Data format of the request body. Only supports **application/json**. |
| X-BATCHREQUEST-MAX-OUTPUT-SIZE | Size limit for each item in the batch response. Add this header to provide a lower size limit than the default set by the **glide.rest.batch.max.outputSize** system property. You cannot set a value higher than the value in the system property. Default: 10 MB. |
| Name | Description |
|---|---|
| batch\_request\_id | ID of the batch that matches the **batch\_request\_id** parameter in the request.Data type: String |
| serviced\_requests | List of response objects from the batch request. Data type: Array ``` "serviced_requests":[ { "body": "String", "error_message": "String", "execution_time": Number, "headers": [Array], "id": "String", "redirect_url: "String", "status_code": Number, "status_text": "String" } ] ``` |
| serviced\_requests.body | Base64 encoded body of the response. To get the value of the body, Base64 decode the content of this parameter.Data type: String |
| serviced\_requests.error\_message | If present, the error messages.Data type: String |
| serviced\_requests.execution\_time | Time it took to execute the batch item request.Data type: Number Unit: Milliseconds |
| serviced\_requests.headers | Headers for the batch item.Data type: Array ``` "headers":[ { "name":"String", "value":"String" } ] ``` |
| serviced\_requests.headers.name | Name of the header.Data type: String |
| serviced\_requests.headers.value | Value of the header.Data type: String |
| serviced\_requests.id | ID of the batch item that matches the **rest\_requests.id** parameter in the request.Data type: String |
| serviced\_requests.redirect\_url | If present, the redirect URL.Data type: String |
| serviced\_requests.status\_code | Status code for the batch item.Data type: Number |
| serviced\_requests.status\_text | Text of the status code for the batch item.Data type: String |
| unserviced\_requests | IDs of the requests that were not processed because the batch request reached a size or processing limit. Data type: Array |