---
title: "publishablePublish"
description: >
  Publish a resource to a specified channel. Should the resource be a product, it will only be visible in the channel when its status is active.Products sold by subscription only (requiresSellingPlan: true) can only be published to the online store.
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/store-properties/mutations/publishable-publish'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/store-properties/mutations/publishable-publish.md'
---
# publishablePublish

Publish a resource to a specified channel. Should the resource be a product, it will only be visible in the channel when its status is active.Products sold by subscription only (requiresSellingPlan: true) can only be published to the online store.

- **Required Scopes:** `write_publications`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Mutation

## Type Signature

`PublishablePublishPayload`

## Required Permissions

* `write_publications`

An access token is required to call this API. Refer to [Authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md) for more information about how to obtain the token.

## Arguments

* `id`

  [ID!](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The resource for which to create or update the publication.

* `input`

  [[PublicationInput!]!](https://developer.shopline.com/docs/admin-graph-ql-api/apps/inputs/publication-input.md)

  Input fields required to specify the resource to be published.

## Returns

* `shop`

  [Shop!](https://developer.shopline.com/docs/admin-graph-ql-api/store-properties/objects/shop.md)

  The object representing the user's store.

* `userErrors`

  [[UserError!]!](https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/objects/user-error.md)

  A list of errors that occurred during execution.

## Code Example

```graphql
mutation publishablePublish($id: ID! $input: [PublicationInput!]! ) {
	publishablePublish(id: $id, input: $input ) 
		 {
			# PublishablePublishPayload fields
		}
		
	}

```

## Variables

```json
{
  "id": {},
  "input": {
    "publicationId": {},
    "publishDate": {}
  }
}
```

## Examples

### Publish resources to channels

Publishes a resource to a channel. A product is visible in the channel only when its status is active. Products exclusively sold through subscriptions (requiresSellingPlan: true) are publishable solely in online stores.

**Request:**

```json
mutation PublishablePublish {
    publishablePublish(
        id: "gid://shopline/Product/16055271775622479314742093"
        input: [
            { publicationId: "gid://shopline/Publication/57843853" }
            { publicationId: "gid://shopline/Publication/57843853" }
        ]
    ) {
        userErrors {
            field
            message
        }
    }
}

```

**Response:**

```json
{
  "data": {
    "data": {
      "publicationUpdate": {
        "userErrors": []
      }
    }
  }
}
```

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

