# API response

![](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MYfEZdbWUM9IXLiu8Xi%2F-MYoBIw6X61JMBC05fzh%2Fstep.png?alt=media\&token=fa4ece7c-56cd-45ef-a899-5bc48b47edd9)

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](https://readme.directual.com/api-integrations/api-endpoints-security-layer);
* [Webhooks](https://readme.directual.com/api-integrations/webhooks).

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

![](https://3071851461-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Nnmtk9_gFGWOddsf6%2F-MYoMNBWa38Brk94uY-E%2F-MYoirxbASjlsog9NEHy%2Fstep_settings.png?alt=media\&token=b33ed0b7-57fb-4a9d-a7c9-2cf3d5d38810)

* **Return body**. Actual response. Can contain data from object fields via [the template system](https://readme.directual.com/template-system/basics-of-template-system). 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>
```
