--- title: Define an API resource response structure description: Add a schema and relevant response headers to a REST response to define the response's expected data structure. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/rest-api-explorer/add-schema-rest-api-response.html release: australia product: REST API Explorer classification: rest-api-explorer topic_type: task last_updated: "2026-03-12" reading_time_minutes: 1 breadcrumb: [Create a scripted REST API, Scripted REST APIs, REST APIs, Web services, API implementation, API implementation and reference] --- # Define an API resource response structure Add a schema and relevant response headers to a REST response to define the response's expected data structure. ## Before you begin At least one REST API resource and at least one schema must already be defined for use in the relevant REST API. You must also define any response headers you want to use. For more information, see [Define a REST API response header](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/define-scripted-api-response-header.md). Role required: web\_service\_admin ## Procedure 1. Navigate to a new REST Response record in one of the following ways. If you navigate through the scripted REST API record, most fields in the REST Response record are pre-populated.
| Option | Procedure |
|---|---|
| **Navigate through a scripted REST API record** | 1. Navigate to **All** > **System Web Services** > **Scripted REST APIs**. 2. Select a scripted REST API record. 3. In the **Resources** related list, select a resource. 4. In the **Response Schema** tab, select **New**. |
| **Navigate directly to the REST Response record** | 1. Navigate to **All** > **Filter** and enter `sys_ws_response_spec.form`. 2. In the **API** field, select an API. 3. In the **API resource** field, select the API resource whose response format you want to specify. 4. In the **Http method** field, select the method whose response format you want to specify \(for example, GET\). 5. **Version** field, select the API resource version. |