API v2: Cannot Retrieve Post Image/Media ID via /posts/{id} Endpoint

Hello Patreon Developers & Community,

I’m developing a simple WordPress plugin for my personal use to display previews of my recent Patreon posts on my own website. I’m using my Creator OAuth Token (API v2).

My goal is to fetch the featured image URL for recent posts. I’ve implemented a multi-step process:

  1. Fetch Campaign ID (Success)

  2. Fetch recent post IDs/titles/URLs from /campaigns/{campaign_id}/posts?fields[post]=title,url,published_at… (Success)

  3. Fetch individual post data from /posts/{post_id} to get the media_id or image URL.

However, I’m consistently unable to retrieve the necessary image information in Step 3. I’ve tried numerous parameter combinations on the /posts/{post_id} endpoint, all resulting in failures:

  • include=image → Returns 400 Bad Request (“Invalid parameter for ‘include’ on type post: [‘image’]”)

  • include=media → Returns 400 Bad Request (“Invalid parameter for ‘include’ on type post: [‘media’]”)

  • include=image,attachments (with relevant fields) → Returns 400 Bad Request (“Invalid parameter for ‘include’ on type post: [‘image’, ‘attachments’]”)

  • fields[post]=image / fields[post]=post_file → Returns 400 Bad Request (“Invalid value for parameter ‘fields[post]’”)

  • No parameters (/posts/{id}) → Returns 200 OK, but the response JSON lacks the entire relationships block , making it impossible to find the media_id.

  • Minimal valid fields (fields[post]=title,url) → Returns 200 OK, but the relationships block is still missing.

  • Broad valid fields (fields[post]=title,url,content,published_at,…) → Returns 200 OK, but the relationships block is still missing.

This seems like a catch-22: I cannot use include or specific fields to get image data without errors, and fetching the post successfully without those parameters omits the relationships needed to link to the media.

Could you please advise on the correct and currently supported method in API v2 to reliably retrieve either:
a) The media_id associated with a post’s featured image (e.g., via the relationships block) when fetching /posts/{id}?
b) Or, the actual image URLs directly (e.g., via an attribute)?

I understand direct support is limited, but any clarification on whether this is intended behaviour, a bug, or if there’s a working parameter combination would be greatly appreciated. My testing suggests the /posts/{id} endpoint isn’t returning the relationships block as expected by the JSON:API standard when specific fields are requested.

Thank you for your time and any insights you can provide!

Best regards,

Martin Perreault