# Delete Bluesky post

> Delete a post from a Bluesky account.

Canonical: <https://www.tryadeli.com/docs/api/posts/delete-bluesky-post>

`DELETE https://app.tryadeli.com/api/v1/posts/bluesky/{postId}`

Authorization: `Bearer <API key>` — see [Authentication](https://www.tryadeli.com/docs/authentication)

Deletes a post from the Bluesky account. `postId` is the post's record key, the
last segment of its `providerId` (`3l6oveex3ii2l` in
[the publish example](https://www.tryadeli.com/docs/api/posts/publish-bluesky)), or the whole AT URI,
URL-encoded. It cannot be undone.

**Path parameters**

| Name     | Type     | Required | Description                                              |
| -------- | -------- | -------- | -------------------------------------------------------- |
| `postId` | `string` | Yes      | The post's record key, or its whole AT URI, URL-encoded. |

**Query parameters**

| Name        | Type   | Required | Description                                                                       |
| ----------- | ------ | -------- | --------------------------------------------------------------------------------- |
| `accountId` | `uuid` | Yes      | The Bluesky account the post belongs to.                                          |
| `profileId` | `uuid` |          | Optional, because accountId names its profile. If you pass both, they must agree. |

## Request examples

**cURL**

```bash
curl --fail-with-body -X DELETE "https://app.tryadeli.com/api/v1/posts/bluesky/3l6oveex3ii2l?accountId=00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer $ADELI_API_KEY"
```

**JavaScript**

```javascript
const response = await fetch("https://app.tryadeli.com/api/v1/posts/bluesky/3l6oveex3ii2l?accountId=00000000-0000-0000-0000-000000000000", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.ADELI_API_KEY}`,
  },
});
console.log(await response.json());
```

**Python**

```python
import os

import requests

response = requests.delete(
    "https://app.tryadeli.com/api/v1/posts/bluesky/3l6oveex3ii2l",
    headers={"Authorization": f"Bearer {os.environ['ADELI_API_KEY']}"},
    params={
        "accountId": "00000000-0000-0000-0000-000000000000",
    },
)
print(response.json())
```

## Responses

### 200

```json
{ "id": "bluesky_post_00000000-0000-0000-0000-000000000000_3l6oveex3ii2l", "platform": "bluesky", "accountId": "00000000-0000-0000-0000-000000000000", "providerId": "at://did:plc:abc123/app.bsky.feed.post/3l6oveex3ii2l", "deleted": true }
```

### 404

```json
{
  "error": {
    "code": "post_not_found",
    "message": "Post not found on this account"
  }
}
```
