# 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="https://203590333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIHuU6kmTWQfXxOUkN7No%2Fuploads%2FMAaDF2GvX1FaCMcTCZgS%2Ffile.excalidraw.svg?alt=media&#x26;token=241d2e8f-3a4f-4c63-a73d-b5edf47f1713" 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"
}
```
