# includeUnpublished not working for drafts

**URL:** <https://forum.builder.io/t/includeunpublished-not-working-for-drafts/5163>\
**Category:** Technical Questions\
**Tags:** visual-editor, nextjs\
**Created:** [March 13, 2024, 8:54pm UTC](https://forum.builder.io/t/includeunpublished-not-working-for-drafts/5163 "2024-03-13T20:54:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CourseStudio](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@CourseStudio](https://forum.builder.io/u/CourseStudio)\
**Post date:** [March 13, 2024, 8:54pm UTC](https://forum.builder.io/t/includeunpublished-not-working-for-drafts/5163/1 "2024-03-13T20:54:27Z")

</div>

_Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank._

**Builder content link**

> **[Builder.io: Visual Development Platform](https://builder.io/content/71714c1b79f344bd9142e45a69a1e3b4)**
>
> Drag and drop with your components, right within your existing site or app. Build and optimize digital experiences for any tech stack, visually..

**Builder public api key**  
4ccc9312e0d14fb3b6d94d2864010b90

**What are you trying to accomplish**  
using `builder.get`, we’re trying to get a draft piece of content. This comes back as undefined. When we publish the piece, we get the content. We tried using the `includeUnpublished: true` property here. But it had no effect.

**Code stack you are integrating Builder with**  
We’re using NEXT.js 14. We’re using the app router with the following route:

```auto
src/app/blog/[...slug]/page.jsx

```

```auto
export default async function Page({ params }) {
  const urlPath = "/blog/" + (params?.slug?.join("/") || "");
  const content = await builder
    .get("article", {
      includeRefs: true,
      enrich: true,
      includeUnpublished: true,
      userAttributes: {
        urlPath,
      },
    })
    .toPromise();

  console.log(content); // This is undefined.
  return ...
}

```

---

<div class="post-metadata">

**Author:** ![anon43891756](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon43891756](https://forum.builder.io/u/anon43891756)\
**Post date:** [April 2, 2024, 4:11pm UTC](https://forum.builder.io/t/includeunpublished-not-working-for-drafts/5163/2 "2024-04-02T16:11:25Z")

</div>

Hi @CourseStudio,

At the content API level `includeUnpublished` is working, Can please confirm which SDK version you are using?

[https://cdn.builder.io/api/v3/content/article?apiKey=4ccc9312e0d14fb3b6d94d2864010b90&userAttributes.urlPath=%2Fblog%2Farticle-template&limit=1&omit=data.blocks&includeUnpublished=true](https://cdn.builder.io/api/v3/content/article?apiKey=4ccc9312e0d14fb3b6d94d2864010b90&userAttributes.urlPath=%2Fblog%2Farticle-template&limit=1&omit=data.blocks&includeUnpublished=true)
