Skip to content

Create a topic in the program

Request

Creates new topic in the program. A topic holds campaigns and users, organizing content for user consumption.

Resources

Security
oauth2_as_a_user(Required scopes: content.write) or oauth2_as_a_server(Required scopes: content.write)
Bodyapplication/json

Attributes of the topic to create.

namestringrequired

The topic name.

Example:"Company News"
descriptionstringrequired

The topic description.

Example:"All the latest from our company."
statestring

The state of the topic. One of: archived, hidden, or published.

Enum:"active""published""hidden""available""archived"
Example:"published"
auto_publishboolean

Whether the topic is set to auto-publish.

Example:true
auto_followboolean

Whether the topic is set to auto-follow.

Example:true
auto_follow_mandatoryboolean

Whether the topic is set to mandatory auto-follow.

Example:true
recommendedboolean

Whether the topic is recommended.

Example:true
targetedboolean

Whether the topic is targeted.

Example:true
user_submittableboolean

Whether the topic is user-submittable.

Example:true
groupsArray of strings

A list of the audiences this topic is targeted to.

Example:
[ "group1", "group2" ]
contributorsArray of integers

Contributor IDs

Example:
[ 1, 2 ]
promotedboolean

Is channel promoted

Example:true
curl -i -X POST \
  https://partner.socialchorus.com/v2/channels \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Company News",
    "description": "All the latest from our company.",
    "state": "published",
    "auto_publish": true,
    "auto_follow": true,
    "auto_follow_mandatory": true,
    "recommended": true,
    "targeted": true,
    "user_submittable": true,
    "groups": [
      "group1",
      "group2"
    ],
    "contributors": [
      1,
      2
    ],
    "promoted": true
  }'

Responses

Created

Bodyapplication/json
dataobject(Content.Channel.Resource)required
Response
{ "data": { "name": "Company News", "description": "All the latest from our company.", "state": "published", "auto_publish": true, "auto_follow": true, "auto_follow_mandatory": true, "recommended": true, "targeted": true, "user_submittable": true, "groups": [], "contributor_count": 12, "contributors": [], "follower_count": 1000, "created_at": "2000-01-01T00:00:00Z", "updated_at": "2000-01-01T00:00:00Z", "promoted": true, "id": 789 } }