{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fopost-com/json-schema/fopost-com-inbox-item-schema.json",
  "title": "InboxItem",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fopost-com-openapi.json#/components/schemas/InboxItem",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "workspace_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Present on list rows"
    },
    "platform": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "comment",
        "mention",
        "dm",
        "review"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "unread",
        "read",
        "resolved",
        "snoozed"
      ]
    },
    "direction": {
      "type": "string",
      "enum": [
        "inbound",
        "outbound"
      ]
    },
    "conversation_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "author_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "author_handle": {
      "type": [
        "string",
        "null"
      ]
    },
    "author_avatar_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "text": {
      "type": [
        "string",
        "null"
      ]
    },
    "rating": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Stars on a review, 1-5. Null on every other type"
    },
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InboxAttachment"
      }
    },
    "permalink": {
      "type": [
        "string",
        "null"
      ]
    },
    "post_external_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "parent_external_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "platform_created_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "snoozed_until": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "replied_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "can_reply": {
      "type": "boolean",
      "description": "False on platforms whose API reads but cannot answer"
    },
    "hidden": {
      "type": "boolean"
    },
    "liked": {
      "type": "boolean"
    },
    "reposted": {
      "type": "boolean",
      "description": "Reposted to the account's own timeline (X)"
    },
    "bookmarked": {
      "type": "boolean",
      "description": "Bookmarked on the account (X)"
    },
    "pinned": {
      "type": "boolean"
    },
    "reaction": {
      "type": [
        "string",
        "null"
      ],
      "description": "Our reaction on a DM"
    },
    "edited_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "moderation_status": {
      "type": [
        "string",
        "null"
      ],
      "description": "The platform's own moderation state, where it reports one: `published`, `held`, `spam` or `rejected`"
    },
    "can_hide": {
      "type": "boolean"
    },
    "can_delete": {
      "type": "boolean",
      "description": "A comment someone left, or our own reply"
    },
    "can_like": {
      "type": "boolean"
    },
    "can_repost": {
      "type": "boolean",
      "description": "The network has a repost (X)"
    },
    "can_bookmark": {
      "type": "boolean",
      "description": "The network has bookmarks (X)"
    },
    "can_vote": {
      "type": "boolean",
      "description": "The network ranks by votes, so a down vote exists"
    },
    "can_pin": {
      "type": "boolean",
      "description": "Our own comment only"
    },
    "can_edit": {
      "type": "boolean",
      "description": "Our own comment only"
    },
    "can_react": {
      "type": "boolean"
    },
    "can_send_media": {
      "type": "boolean"
    },
    "can_quick_reply": {
      "type": "boolean"
    },
    "can_private_reply": {
      "type": "boolean",
      "description": "A DM can be opened with `POST /v1/inbox/conversations` and `comment_id`"
    },
    "post": {
      "type": [
        "object",
        "null"
      ],
      "description": "The FoPost post this item was left under, when we published it",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "post_context": {
      "$ref": "#/$defs/InboxPostContext"
    },
    "raw": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true,
      "description": "The platform's message object as stored; only with `include_raw=1` on one workspace, for a bypassed user"
    },
    "account": {
      "$ref": "#/$defs/InboxAccountRef"
    }
  },
  "$defs": {
    "InboxAccountRef": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "platform": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "avatar": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "InboxAttachment": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "description": "`image`, `video`, `audio`, `file`, `link` or `share`"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "width": {
          "type": [
            "integer",
            "null"
          ]
        },
        "height": {
          "type": [
            "integer",
            "null"
          ]
        },
        "link": {
          "type": [
            "string",
            "null"
          ],
          "description": "The target of a `link` attachment"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Served by `GET /v1/inbox/{id}/attachments/{index}`, never a platform URL"
        },
        "preview_url": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "InboxPostContext": {
      "type": [
        "object",
        "null"
      ],
      "description": "The platform post the item sits under, whoever published it",
      "properties": {
        "external_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_own": {
          "type": "boolean",
          "description": "Published from one of our accounts"
        },
        "text": {
          "type": [
            "string",
            "null"
          ]
        },
        "author_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "author_handle": {
          "type": [
            "string",
            "null"
          ]
        },
        "author_avatar_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "thumbnail_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "permalink": {
          "type": [
            "string",
            "null"
          ]
        },
        "published_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "published": {
          "type": [
            "object",
            "null"
          ],
          "description": "The FoPost post this was published from, when it was",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid"
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      }
    }
  }
}