Moderate content queue item

Moderate a single content queue item by updating the state.

Endpoint

PATCH https://q.crowdynews.com/v1/queue/{contract}

Request Parameters

HEADER FIELD VALUE DESCRIPTION
Content-Type The content type of the request body, must be set to application/json.
URL PARAMETER VALUE DESCRIPTION
contract The slugified name of the contract. This is the slug property of your contract. The consumer that wants to moderate the queue must have access to the contract, otherwise this action is forbidden.
QUERY PARAMETER VALUE DESCRIPTION
access_token A valid OAuth access token with the correct permission(s).
q The slugified name of the collection to moderate the content item for. This is the slug property of the collection.
id Id of the content item to update.
REQUEST BODY DATA VALUE TYPE VALUE DESCRIPTION
state String Publish or unpublish a content item.

Supported values: published, unpublished

Response Format

On success, the HTTP status code in the response header is 200 OK and the response body will contain a content item object in JSON format. On error, the header status code is an error code and the response body contains an error object.

Example Request

Request:

PATCH https://q.crowdynews.com/v1/queue/my-contract?q=my-collection&id=536434_23241&access_token={your access token}

{
    "state": "unpublished"
}

Response:

HTTP/1.1 200

{
  "id": "536434_23241",
  "service": "rss",
  "type": "link",
  "title": "Macedonia country profile",
  "text": "Provides an overview of Macedonia, including key events and facts about this European country",
  "url": "http://www.bbc.co.uk/news/world-europe-17550407#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa",
  "date": "2016-03-18T16:19:00.000Z",
  "author": {
    "name": null,
    "username": null,
    "url": "http://feeds.bbci.co.uk/news/world/europe/rss.xml"
  },
  "media": null,
  "kudos": {
    "score": 0,
    "rss_score": 0
  },
  "state": "unpublished"
}

Additional Resources