Inbox
Get an inbox item
Get an inbox item.
GET
/v1/inbox/{id}TL;DR
| Question | Answer |
|---|---|
| What does it do? | Get an inbox item. |
| What does it need? | An API key or an OAuth access token. |
| What does it take? | id in the path. |
| What does it return? | Status 200 with a body of type InboxItem. |
| In the SDK? | flung.inbox.get() |
| What can go wrong? | 401 Missing, unknown, revoked or expired API key; 404 No such item in this workspace; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape. |
Example
bash
curl -X GET 'https://api.flung.dev/v1/inbox/ibx_aaaaaaaaaaaaaaaaaaaaaaaa' \ --header "Authorization: Bearer $FLUNG_API_KEY"ts
import { Flung } from '@flung.dev/sdk'
const flung = new Flung({ apiKey: process.env.FLUNG_API_KEY! })const result = await flung.inbox.get({ id: 'ibx_aaaaaaaaaaaaaaaaaaaaaaaa',})js
const response = await fetch('https://api.flung.dev/v1/inbox/ibx_aaaaaaaaaaaaaaaaaaaaaaaa', { method: 'GET', headers: { 'Authorization': `Bearer ${process.env.FLUNG_API_KEY}`, },})if (!response.ok) throw new Error((await response.json()).error.message)const result = await response.json()A successful answer looks like this:
json
{ "id": "ibx_aaaaaaaaaaaaaaaaaaaaaaaa", "accountId": "string", "platform": "x", "kind": "comment", "status": "unread", "text": "string", "author": { "id": "string", "name": "string", "handle": "string" }, "url": "string", "platformItemId": "string", "platformPostId": "string", "targetId": "string", "createdAt": "2026-11-01T09:00:00.000Z", "repliedAt": "2026-11-01T09:00:00.000Z"}Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The item. | InboxItem |
| 401 | Missing, unknown, revoked or expired API key. | Error |
| 404 | No such item in this workspace. | Error |
| 422 | The request failed validation. | Error |
| 429 | Too many requests for this credential; wait for retry-after seconds. | Error |
Response body
A 200 answer has the type InboxItem.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
accountId | string | yes | |
platform | Platform | yes | |
kind | "comment" | "mention" | yes | comment: a reply to one of the account's posts. mention: the account named elsewhere. |
status | "unread" | "read" | "replied" | "archived" | yes | |
text | string | yes | |
author | object | yes | |
author.id | string | yes | |
author.name | string | null | yes | |
author.handle | string | null | yes | |
url | string | null | yes | |
platformItemId | string | yes | |
platformPostId | string | null | yes | The platform post it answers. |
targetId | string | null | yes | The Flung post target it answers, when that post went out through Flung. |
createdAt | string | yes | |
repliedAt | string | null | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint |
| Schemas | Every request and response type |
| Errors | Every error code and what to do about it |