Adding a news article

This method will allow you to create a news article for a particular support centre.

URL

/api/v2/support_centres/add_news_article

Access

This method can be accessed by account tokens and user tokens where the associated user has access to manage the support centre content.

Supported Parameters

  • support_centre - ID or permalink of a support centre. (required)
  • title - the title for the article (required)
  • content - the content of the article (required)
  • permalink - the permalink for the article, leave blank to automatically generate (optional)
  • user - the username, email address or ID of a user (optional)
  • published - whether the article should be displayed in the support centre (optional)

Example JSON

A successful article

{
    "id": 4,
    "title": "Testing",
    "permalink": "test",
    "author": {
        "id": 2,
        "username": "danq",
        "first_name": "Dan",
        "last_name": "Quinney",
        "job_title": null,
        "avatar_url": "https://secure.gravatar.com/avatar/144bf62bac97854d81eb4e1eb02e748d?rating=PG&size={{size}}&d=mm"
    },
    "content": "Test",
    "published": true
}

A failed article

{
    "errors": {
        "permalink": [
            "has already been taken"
        ],
        "content": [
            "can't be blank"
        ]
    }
}

Proudly powered by Katapult. Running on 100% renewable energy.