# Guide: Having a custom response schema

For API requests, Cohesive supports semantic instructions for structuring the API response. You can specify a JSON response format in the request, and Cohesive will extract and return the data in the requested structure.

{% hint style="info" %}
Provide comments (via `//<comment>`) to help describe or provide more instructional context into the data request
{% endhint %}

### Example: time-based metric import

*Note: this schema is available as a template. This example simply illustrates how it could be custom-defined.*

<figure><img src="https://1659501652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgXnl6gX6OwfIRspyklk3%2Fuploads%2FO6HyUi8enmyp8BeyBcAh%2FScreen%20Shot%202023-06-05%20at%206.26.20%20PM.png?alt=media&#x26;token=08f023aa-4af1-40b8-a656-f4af1739c9ed" alt="" width="563"><figcaption><p>Example operational metrics</p></figcaption></figure>

For the above metric data, we could pass in a request specifying the JSON response format as below:

<figure><img src="https://1659501652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgXnl6gX6OwfIRspyklk3%2Fuploads%2Fpp6k8qtCQ6Vw4cc74hfE%2FScreen%20Shot%202023-06-05%20at%206.26.54%20PM.png?alt=media&#x26;token=158dc287-1cbe-41a9-9a4c-094b61196b3f" alt="" width="375"><figcaption><p>This schema can be provided via API request or in Cohesive's workflow builder platform</p></figcaption></figure>

Cohesive would then return all of the processed metrics in the requested response structure:

<figure><img src="https://1659501652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgXnl6gX6OwfIRspyklk3%2Fuploads%2FiOtPt9cOJOWjepqOYQ9o%2FScreen%20Shot%202023-06-05%20at%206.28.13%20PM.png?alt=media&#x26;token=3f42fce4-8356-4650-bd78-92149515db5a" alt="" width="188"><figcaption><p>Data will be returned in the API response (or in the workflow builder platform) in the specified structure</p></figcaption></figure>
