> ## Documentation Index
> Fetch the complete documentation index at: https://docs.letmepost.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch a single post with its publish attempts

> Returns the post row plus every publish attempt (start/finish, success flag, upstream response, error code). Use the `postId` returned in `CreatePostResponse.results[]` as `{id}`.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/posts/{id}
openapi: 3.1.0
info:
  title: letmepost.dev API
  version: v1
  description: >-
    Open-source social media publishing API. Preflight validation, transparent
    errors, idempotency, stable platform versions.


    The full developer documentation lives at
    [letmepost.dev/docs/](https://letmepost.dev/docs/). This reference is
    generated from the canonical Zod schemas at `packages/schemas/`.


    **Auth:** Bearer key in the `Authorization` header. See
    [Authentication](https://letmepost.dev/docs/authentication/).

    **Idempotency:** every write accepts `Idempotency-Key`. See
    [Idempotency](https://letmepost.dev/docs/idempotency/).

    **Errors:** stable envelope with `code`, `rule`, `platformResponse`,
    `remediation`, `docUrl`, `ruleUrl`. See
    [Errors](https://letmepost.dev/docs/errors/).
  contact:
    name: letmepost.dev
    url: https://github.com/rosekamallove/letmepost.dev
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.letmepost.dev
    description: Production
security:
  - bearer: []
tags:
  - name: Posts
    description: >-
      Publish and read posts. Multi-target: a single `POST /v1/posts` fans out
      to up to 25 connected accounts.
  - name: Media
    description: Upload and reference media assets.
  - name: Accounts
    description: Connect, list, and disconnect platform accounts.
  - name: API Keys
    description: Mint and revoke API keys (dashboard session only).
  - name: Webhooks
    description: Register, test, and manage outbound webhook endpoints.
paths:
  /v1/posts/{id}:
    get:
      tags:
        - Posts
      summary: Fetch a single post with its publish attempts
      description: >-
        Returns the post row plus every publish attempt (start/finish, success
        flag, upstream response, error code). Use the `postId` returned in
        `CreatePostResponse.results[]` as `{id}`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Post detail with attempts.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostDetail'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - bearer: []
components:
  headers:
    X-RateLimit-Limit:
      description: >-
        Per-route request ceiling for this endpoint. A static contract —
        sliding-window remaining/reset live on the IETF-draft `RateLimit-*`
        headers (no prefix) when enforcement is active.
      schema:
        type: integer
        minimum: 1
        example: 1000
    X-Request-Id:
      description: >-
        Per-request correlation id, also echoed inside the error envelope as
        `error.requestId`.
      schema:
        type: string
        example: req_01HY6X4AWBJM2K9F2PTQMRD9JQ
  schemas:
    PostDetail:
      allOf:
        - $ref: '#/components/schemas/Post'
        - type: object
          required:
            - attempts
          properties:
            attempts:
              type: array
              items:
                $ref: '#/components/schemas/PostAttempt'
    Post:
      type: object
      description: A single per-target post row from the post log.
      required:
        - id
        - profileId
        - accountId
        - account
        - platform
        - status
        - text
        - mediaRefs
        - scheduledAt
        - publishedAt
        - platformUri
        - platformCid
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        profileId:
          type: string
        accountId:
          type: string
        account:
          type: object
          required:
            - id
            - platform
            - platformAccountId
            - displayName
          properties:
            id:
              type: string
            platform:
              $ref: '#/components/schemas/Platform'
            platformAccountId:
              type: string
            displayName:
              type:
                - string
                - 'null'
        platform:
          $ref: '#/components/schemas/Platform'
        status:
          $ref: '#/components/schemas/PostStatus'
        text:
          type: string
        mediaRefs:
          type: array
          items: {}
        scheduledAt:
          type:
            - string
            - 'null'
          format: date-time
        publishedAt:
          type:
            - string
            - 'null'
          format: date-time
        platformUri:
          type:
            - string
            - 'null'
        platformCid:
          type:
            - string
            - 'null'
        error: {}
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PostAttempt:
      type: object
      required:
        - id
        - attemptNumber
        - startedAt
        - finishedAt
        - succeeded
      properties:
        id:
          type: string
        attemptNumber:
          type: integer
          minimum: 1
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type:
            - string
            - 'null'
          format: date-time
        succeeded:
          type: boolean
        errorCode:
          type:
            - string
            - 'null'
        errorMessage:
          type:
            - string
            - 'null'
        platformResponse: {}
    ApiError:
      type: object
      description: >-
        Stable error envelope. Every non-2xx response uses this shape. `docUrl`
        is always present; `ruleUrl` is present whenever `rule` is set.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - docUrl
            - requestId
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
              description: >-
                Human-readable summary. Stable enough to log, not stable enough
                to switch on — switch on `code` and `rule`.
            rule:
              type: string
              description: >-
                The specific preflight rule or validator that failed (e.g.
                `bluesky.text.max_graphemes`,
                `targets.options.platform_mismatch`).
              example: bluesky.text.max_graphemes
            platform:
              $ref: '#/components/schemas/Platform'
            platformVersion:
              type: string
              description: >-
                Pinned upstream API version the call targeted (e.g.
                `graph-v23.0` for Facebook).
            platformResponse:
              description: Raw upstream platform response, when available.
            remediation:
              type: string
              description: Actionable next step for the caller — short, imperative.
            docUrl:
              type: string
              format: uri
              description: Link to the docs page for this `code`.
              example: https://docs.letmepost.dev/errors/preflight_failed
            ruleUrl:
              type: string
              format: uri
              description: >-
                Link to the docs page for this preflight `rule`. Present
                whenever `rule` is set.
              example: https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes
            requestId:
              type: string
              description: >-
                Per-request correlation id, also echoed in the `X-Request-Id`
                response header.
              example: req_01HY6X4AWBJM2K9F2PTQMRD9JQ
            traceId:
              type: string
              description: OpenTelemetry trace id, when tracing is active.
      example:
        error:
          code: preflight_failed
          message: Bluesky posts are capped at 300 graphemes; this body is 312.
          rule: bluesky.text.max_graphemes
          platform: bluesky
          remediation: Trim 12 graphemes, or split into a thread.
          docUrl: https://docs.letmepost.dev/errors/preflight_failed
          ruleUrl: https://docs.letmepost.dev/preflight/bluesky-text-max_graphemes
          requestId: req_01HY6X4AWBJM2K9F2PTQMRD9JQ
    Platform:
      type: string
      enum:
        - bluesky
        - facebook
        - instagram
        - linkedin
        - pinterest
        - threads
        - tiktok
        - twitter
      description: >-
        Supported platforms. `tiktok` is currently in App Review — connect
        requests return `platform_not_enabled` until approval lands.
    PostStatus:
      type: string
      enum:
        - queued
        - validated
        - publishing
        - published
        - failed
        - rejected
        - canceled
      description: >-
        Lifecycle state of a single per-target post row. `canceled` is the
        terminal state reached via `DELETE /v1/posts/{id}` on a queued scheduled
        post.
    ErrorCode:
      type: string
      enum:
        - validation_failed
        - preflight_failed
        - platform_auth_failed
        - platform_rejected
        - platform_unavailable
        - platform_not_enabled
        - internal_error
        - unauthenticated
        - unauthorized
        - not_found
        - idempotency_conflict
        - rate_limited
      description: >-
        Canonical error codes. See https://letmepost.dev/docs/errors/ for
        per-code documentation.
  responses:
    Unauthenticated:
      description: '`unauthenticated` — missing or invalid Bearer key.'
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: >-
        `not_found` — the resource does not exist in the caller's organization
        (or, for profile-scoped keys, in the caller's profile).
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: >-
        `rate_limited` — too many requests. Inspect `X-RateLimit-Limit` (static
        ceiling) and the IETF-draft `RateLimit-*` headers (sliding-window
        remaining/reset) before retrying.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: lmp_live_… or lmp_test_…
      description: >-
        Mint an API key in the dashboard. See
        https://letmepost.dev/docs/authentication/.

````