# Site article feedback

This endpoint lets you manage article's feedback.

# The article object

  • id integer

    The system-generated ID of the article.

  • article_id integer

    The system-generated ID of the article.

  • feedback string

    The article's feedback.

  • article object expandable

    The feedback's article.

  • created_at string

    The timestamp when the feedback was created.

# The feedback object

{
  "id": 1,
  "article_id": 1,
  "feedback": "Hey! There's a typo at line 1 😁",
  "article": {...},
  "created_at": "2019-04-24T01:27:22+00:00",
}

# Create a feedback

  • article_id integer required

    The ID of an article.

  • feedback string required

    The feedback.

# Sample request

curl https://www.yourdomain.com/api/v1/site/1/article-feedbacks \
  --request POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access-token>" \
  -d article_id=1 \
  -d feedback="Hey! There's a typo at line 1 😁"

# Sample successful response

{
  "data": {
    "id": 1,
    "article_id": 1,
    "feedback": "Hey! There's a typo at line 1 😁",
    "article": {...},
    "created_at": "2019-04-24T01:27:22+00:00",
  }
}

# Retrieve a feedback

# Sample request

curl https://www.yourdomain.com/api/v1/sites/1/article-feedbacks/1 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access-token>" \ 
  -G

# Sample successful response

{
  "data": {
    "id": 1,
    "article_id": 1,
    "feedback": "Hey! There's a typo at line 1 😁",
    "article": {...},
    "created_at": "2019-04-24T01:27:22+00:00",
  }
}

# Delete a feedback

curl https://www.yourdomain.com/api/v1/sites/1/article-feedbacks/1 \
  --request DELETE
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access-token>"

If successful, the above request will return an empty response with 204 HTTP status code.

# List all feedback

# Parameters

  • article_id integer optional

    A filter on the list based on the feedback's article_id field.

# Sample request

curl https://www.yourdomain.com/api/v1/sites/1/article-feedbacks \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access-token>" \
  -G

# Sample successful response

{
  "data": [
    {
      "id": 1,
      "article_id": 1,
      "feedback": "Hey! There's a typo at line 1 😁",
      "article": {...},
      "created_at": "2019-04-24T01:27:22+00:00",
    },
    {...}
  ]
}