# API response

![](/files/-MYoBIw6X61JMBC05fzh)

If a third-party service requires specific response to its API-calls, you can easily do it using the API-response step. You can edit response for:

* POST requests via [API-endpoints](/api-integrations/api-endpoints-security-layer.md);
* [Webhooks](/api-integrations/webhooks.md).

{% hint style="warning" %}
Remember, that step works only for scenarios running in [synchronic mode](/scenarios/synchronic-scenarios-1.md)
{% endhint %}

![](/files/-MYoirxbASjlsog9NEHy)

* **Return body**. Actual response. Can contain data from object fields via [the template system](/template-system/basics-of-template-system.md). You can compose JSON, XML or simple text here;
* **Return code**. 200 – by default;
* **Content-type:** JSON, XML or text.

### Example

*Example.* an external service would send an API-request to Directual via Webhook, and would expect a response in XML format `<xml><yes /></xml>`.

You should enter to "Return body" field the following:

```
<xml><yes /></xml>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://readme.directual.com/scenarios/editing-scenarios/integration-steps/api-response.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
