---
title: "PublishRule"
description: "PublishRule"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/dot-net/reference/publishrule"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-06"
---

# PublishRule

## PublishRule

Publish Rules are conditions that you define for your content publishing. It allows you to govern whether entries can be published with or without someone’s approval or only when the content is at a particular stage.

## Create

The Create Publish Rules request allows you to create publish rules for the workflow of a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule().CreateAsync(model);
```

PublishRule Model for creating rule.

Query parameter collection.

## CreateAsync

The Create Publish Rules request allows you to create publish rules for the workflow of a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule().CreateAsync(model);
```

PublishRule Model for creating rule.

Query parameter collection.

## Delete

The Delete Publish Rules request allows you to delete an existing publish rule.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Delete();
```

Query parameter collection

## DeleteAsync

The Delete Publish Rules request allows you to delete an existing publish rule.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").DeleteAsync();
```

Query parameter collection

## Fetch

The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Fetch();
```

Query parameter collection

## FetchAsync

The fetch Publish Rule request retrieves the comprehensive details of a specific publish rule of a Workflow.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").FetchAsync();
```

Query parameter collection

## FindAll

The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule().FindAll();
```

Query parameter collection

## FindAllAsync

The Get all Publish Rules request retrieves the details of all the Publish rules of a workflow.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule().FindAllAsync();
```

Query parameter collection

## Update

The Update Publish Rules request allows you to add a publish rule or update the details of the existing publish rules of a workflow.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").Update(model);
```

PublishRule Model for updating Content Type.

Query parameter collection.

## UpdateAsync

The Update Publish Rules request allows you to add a publish rule or update the details of the existing publish rules of a workflow.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
PublishRuleModel model = new PublishRuleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Workflow().PublishRule("<PUBLISH_RULE_UID>").UpdateAsync(model);
```

PublishRule Model for updating Content Type.

Query parameter collection.

## PublishRule | .NET Management SDK | Contentstack

PublishRule defines conditions governing content publishing, controlling whether entries require approval or a specific workflow stage.