Define a REST API response header

task australia Updated Sep 10, 2026 1 min read define-scripted-api-response-header.md
Raw file servicenow.com

Define one or more REST API response headers in a REST API.

Before you begin

Role required: web_service_admin

Procedure

  1. Create a REST response header in one of the following ways.

Option

Procedure

Create a response header from a REST API

  1. Navigate to All > System Web Services > Scripted REST APIs.
  2. Select a scripted REST API record.
  3. In the Response Headers related list, select New.

Create a response header and associate it with a REST API

Navigate to All > Filter and enter sys_ws_response_header.form.1. Enter sys_ws_response_header.form in the filter navigator. 2. In the API field, select or enter the API to associate with the response header.

2. In the **Header Name** field, add the name of the new header.
  1. In the Example value field, enter an example of a valid header value.

  2. Select Submit.

  3. Repeat these steps for each response header that you want to define.

Result

The response headers that you added are included in the exportable OpenAPI specification in the REST API Explorer with a type: string schema definition. For more information about exporting OpenAPI specifications, see Export to OpenAPI specification.

Parent Topic:Create a scripted REST API

Search documentation
Search document titles and file paths on the australia branch