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

# unpublishCoursework

> Unpublish a coursework item, hiding it from members

**Required scopes:** `write:posts`, `host:write:network_posts` (any one)



**mutation** `unpublishCoursework(input: UnpublishCourseworkInput!): UnpublishCourseworkPayload`

## Arguments

**`input`**: `UnpublishCourseworkInput!` (required)

Parameters for UnpublishCoursework

## Returns

`UnpublishCourseworkPayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`coursework`**: `Coursework`

---

**`errors`**: `[String!]!`

## Examples

```graphql Mutation
mutation UnpublishCoursework($input: UnpublishCourseworkInput!) {
  unpublishCoursework(input: $input) {
    clientMutationId
    coursework {
      childCount
      children {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
      }
      completionCriteria
      course {
        avatarDarkModeUrl
        avatarUrl
        coursework {
          __typename
        }
        createdAt
        descriptionHtml
        descriptionText
      }
      createdAt
      descriptionHtml
    }
    errors
  }
}
```

```json Variables
{
  "input": {
    "id": "id"
  }
}
```

```json Response
{
  "data": {
    "unpublishCoursework": {
      "clientMutationId": "string",
      "coursework": {
        "childCount": 1,
        "children": {
          "edges": [
            {
              "__typename": "CourseworkEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "Coursework"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          }
        },
        "completionCriteria": "BUTTON",
        "course": {
          "avatarDarkModeUrl": "string",
          "avatarUrl": "string",
          "coursework": {
            "__typename": "CourseworkConnection"
          },
          "createdAt": "value",
          "descriptionHtml": "string",
          "descriptionText": "string"
        },
        "createdAt": "value",
        "descriptionHtml": "string"
      },
      "errors": [
        "string"
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.