Pre-release — content may change.

Comments

Update a comment

PATCH
/comments/{id}

Updates a comment. Sending only pinned toggles the pin state (subject to a distinct authorization check); sending comment edits the body.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/comments/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "data": {      "type": "comments",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "attributes": {}    }  }'
{  "data": {    "type": "comments",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "attributes": {      "comment": "string",      "active": true,      "pinned": true,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "deleted_at": "2019-08-24T14:15:22Z"    },    "relationships": {      "person": {        "data": {          "type": "people",          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"        }      },      "commentable": {        "data": {          "type": "string",          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"        }      }    },    "links": {      "self": "/comments/7247ad7d-9275-454b-9e3a-0570e403739e"    },    "meta": {}  }}
{  "errors": [    {      "status": 0,      "title": "string",      "source": {        "pointer": "string",        "parameter": "string"      },      "meta": {        "error": "string",        "field": "string"      }    }  ]}
{  "errors": [    {      "status": 0,      "title": "string",      "source": {        "pointer": "string",        "parameter": "string"      },      "meta": {        "error": "string",        "field": "string"      }    }  ]}
{  "errors": [    {      "status": 0,      "title": "string",      "source": {        "pointer": "string",        "parameter": "string"      },      "meta": {        "error": "string",        "field": "string"      }    }  ]}