Create a new comment for a chart

POST
https://api.datawrapper.de/v3/charts/{id}/comments

Requires scope chart:write.

Example Request

curl --request POST \
  --url https://api.datawrapper.de/v3/charts/example-id/comments \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'Content-Type: application/json' \
  --data '{
  "body": "string",
  "json": {}
}'

Headers

NameValueRequiredDescription
Content-Typeapplication/jsonYesThe format of the request body.

Path Parameters

NameTypeAllowed valuesRequiredDescription
idstring
5 characters
Yes

Request Body

FieldTypeAllowed valuesRequiredDescription
bodystring Yes
jsonobject
Default: [object Object]
No
json.typestring Yes
json.attrsobject No
json.attrs.idstring No
json.marksobject[] No
json.marks.typestring Yes
json.marks.attrsobject No
json.marks.attrs.idstring No
json.textstring No
json.contentstring[] No
parentIdinteger No