{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":415,"path":"api-reference/rest-api-explorer/define-scripted-api-response-header.md","title":"Define a REST API response header","bundle":null,"doc_type":null,"release":"australia","body":"\n# Define a REST API response header\n\nDefine one or more REST API response headers in a REST API.\n\n## Before you begin\n\nRole required: web\\_service\\_admin\n\n## Procedure\n\n1.  Create a REST response header in one of the following ways.\n\n<table id=\"choicetable_rv3_mwc_j3c\"><thead><tr><th align=\"left\" id=\"d237351e60\">\n\nOption\n\n</th><th align=\"left\" id=\"d237351e63\">\n\nProcedure\n\n</th></tr></thead><tbody><tr><td id=\"d237351e69\">\n\n**Create a response header from a REST API**\n\n</td><td>\n\n1.  Navigate to **All** &gt; **System Web Services** &gt; **Scripted REST APIs**.\n2.  Select a scripted REST API record.\n3.  In the **Response Headers** related list, select **New**.\n\n\n</td></tr><tr><td id=\"d237351e108\">\n\n**Create a response header and associate it with a REST API**\n\n</td><td>\n\nNavigate to **All** &gt; **Filter** and enter `sys_ws_response_header.form`.1.  Enter `sys_ws_response_header.form` in the filter navigator.\n2.  In the **API** field, select or enter the API to associate with the response header.\n\n\n</td></tr></tbody>\n</table>2.  In the **Header Name** field, add the name of the new header.\n\n3.  In the **Example value** field, enter an example of a valid header value.\n\n4.  Select **Submit**.\n\n5.  Repeat these steps for each response header that you want to define.\n\n\n## Result\n\nThe 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/export-openapi-specification.md).\n\n**Parent Topic:**[Create a scripted REST API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/t_CreateAScriptedRESTService.md)\n\n"}}