# Delete a Post

{% hint style="info" %}
Delete a post (audio question or answer) from the Matar database.
{% endhint %}

## Delete Post

Delete an audio post in a specific category by its post id for an organization.

<img src="https://203590333-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIHuU6kmTWQfXxOUkN7No%2Fuploads%2Fw92EgMDg6POCKaT2M0Ci%2Ffile.excalidraw.svg?alt=media&#x26;token=19fff543-085b-482c-a63f-a9ce16ac5bfd" alt="API: - https://matar.in.ngrok.io/api/v1/delete_post?organization_id=<org_id>&#x26;post_id=<post_id>>" 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>organization_id </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>A unique identifier for finding a particular post in an organization/community. To get a list of all organizations check the Organization Selection API endpoint.</td></tr><tr><td><strong>post_id </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>Post ID can be fetched from the Post a New Question API endpoint.</td></tr></tbody></table>

**Header Parameter ⬇️**

<table data-full-width="false"><thead><tr><th width="235.33333333333331">Header Parameter</th><th width="109">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 Token for securely accessing Matar Resources.</td></tr></tbody></table>

**Body Parameter ⬇️**

<table data-full-width="false"><thead><tr><th width="242.33333333333331">Body Parameter</th><th width="129">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>category_id </strong><mark style="color:red;"><strong>(required)</strong></mark></td><td>String</td><td>Category name by id in which post is available.</td></tr></tbody></table>

***

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

```
curl --location 'https://matar.in.ngrok.io/api/v1/delete_post?organization_id=129487316&post_id=ACDM6HSQB3' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyODcyNDIxLCJqdGkiOiIyZmNiODJiYi0zMDYzLTQzNGUtOGM5OS00NTVjMDhhY2Y3MmMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyODcyNDIxLCJleHAiOjE2OTM3MzY0MjF9.ovz0ItiPsYG_rqT3vEYl42WZBonX52NXf-oWE4DuGmQ' \
 --form 'category_id="TFTWNI"'
```

**Responses ⬇️**

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

```200
{
    "message": "post deleted"
}
```

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

```
{
    "message": "post deleted"
}
```
