# Post GPT Processing

{% hint style="info" %}
Get answers from ChatGPT for posts using API's below:
{% endhint %}

***

### Get ChatGPT answer.

Get answers to your question posts using ChatGPT.

<img src="/files/vXxjQoldCyTaweyGAmXv" alt="API:-" class="gitbook-drawing">

### Params

**Query Parameter ⬇️**

<table data-full-width="false"><thead><tr><th width="240.33333333333331">Query Parameter</th><th width="114">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>post_id </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>A unique identifier for question post.</td></tr><tr><td><strong>organization_id </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>An identifier for organisation/community in which question is posted.</td></tr></tbody></table>

**Header Parameter ⬇️**

<table data-full-width="false"><thead><tr><th width="231.33333333333331">Header Parameter</th><th width="129">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>Bearer {{access_token}} </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>Access tokens provides secure access to Matar Server Resources.</td></tr></tbody></table>

***

**Sample Request ⬇️️**&#x20;

```
curl --location --globoff --request GET 'https://matar.in.ngrok.io/api/v1/get_gpt_answer?post_id=OKFW5UWYHR&organization_id={{org_id}}' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkzMTYzNjYyLCJqdGkiOiI2Yzk3NTI1Mi05OWIzLTQzODEtOTU1NC0zM2VmM2ZhNTE0ZjUiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiRUE5UzZaIiwibmJmIjoxNjkzMTYzNjYyLCJleHAiOjE2OTQwMjc2NjJ9.vVll7d-oq_pNU6dDIZvmxFndZAUQ9QvTdh_AA6BvVuE' 
```

**Responses ⬇️**

Status Code: **🟢200** (200 denotes **'ok'**)

```200
{
      
}
```

Status Code: 🔴**400** (400 denotes **'Bad request'**)

```
{
    "message": "chatgpt not enabled for this post"
}
```


---

# 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://gramhal.gitbook.io/matar/developer-reference/api/posts/post-gpt-processing.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.
