# Admin Action Postbacks

NATS has to ability to post information to a script of your choice for admin actions. These postbacks can be enabled from the Configuration admin.&#x20;

For other postback examples, please see [Postbacks and Post URLs](/nats-admin/sites/further-reading/postbacks-and-post-urls.md).

## Configuration Admin

If you would like to enable these postbacks, go to the [Configuration Admin](/nats-admin/configuration.md) and select "Postback" from the Current Section drop-down menu. You will then see the following configurations under the "Admin Postback" sub-section

* ADMIN\_ACTION\_POSTBACK - Receive a postback whenever an admin page is viewed or used. To enable, put the URL of the script to post all admin actions.

## Postback Logging Script

The following example script allows you to log the contents of a postback

{% hint style="warning" %}
**Please Note:** Make sure that the log is NOT in a web-accessible folder.
{% endhint %}

```
<?php

	$file = '/path/to/nats4/logs/postback_logs.txt';
	// Open the file to get existing content
	$post = print_r($_REQUEST, TRUE);
	file_put_contents($file, $post, FILE_APPEND);
 
?>
```

## Admin Postback Format

Here is an exmaple log of the ADMIN\_ACTION\_POSTBACK when viewing the edit page of a site:

{% code overflow="wrap" %}

```
Array
(
    [query_string] => view=edit&site[id]=1&nats_sess=1068ac55f635337ed03ffca0883a1dd8
    [performed_action_loginid] => 2
    [performed_action_ip] => 10.10.10.31
    [performed_action_script] => /admin_sites.php
    [performed_action_time] => 1437762032
)
```

{% endcode %}


---

# 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://docs.toomuchmedia.com/nats-admin/sites/further-reading/postbacks-and-post-urls/admin-action-postbacks.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.
