Create new visualization

POST
https://api.datawrapper.de/v3/charts

Requires scope chart:write.

Example Request

curl --request POST \
  --url https://api.datawrapper.de/v3/charts \
  --header 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "My cool chart",
  "theme": "datawrapper",
  "type": "d3-lines",
  "lastEditStep": 3
}'

Headers

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

Request Body

FieldTypeAllowed valuesRequiredDescription
titlestring NoTitle of your visualization. This will be the visualization headline.
themestring
matches ^[a-z0-9]+(?:-{1,2}[a-z0-9]+)*$
2 characters or more
NoChart theme to use.
typestring NoType of the chart (Reference)
forkableboolean NoSet to true if you want to allow other users to fork this visualization
workspacestring NoSlug of the workspace that the visualization should be created in. The authenticated user must have access to this workspace.
organizationIdstring NoID of the team (formerly known as organization) that the visualization should be created in. The authenticated user must have access to this team.
folderIdinteger NoID of the folder that the visualization should be created in. The authenticated user must have access to this folder.
externalDatastring NoURL of external dataset
languagestring
matches ^[a-z]{2}([_-][A-Z]{2})?$
NoVisualization locale (e.g. en-US)
lastEditStepinteger
1 to 4
Default: 3
NoCurrent position in chart editor workflow
metadataobject NoMetadata that saves all visualization specific settings and options.
metadata.axesobject NoMapping of dataset columns to visualization "axes"
metadata.dataobject No
metadata.data.transposeboolean No
metadata.describeobject No
metadata.describe.introstring NoThe visualization description
metadata.describe.bylinestring NoByline as shown in the visualization footer
metadata.describe.source-namestring NoSource as shown in visualization footer
metadata.describe.source-urlstring NoSource URL as shown in visualization footer
metadata.describe.aria-descriptionstring NoAlternative description of visualization shown in screen readers (instead of the visualization)
metadata.annotateobject No
metadata.annotate.notesstring NoNotes as shown underneath visualization
metadata.publishobject No
metadata.customobject No

Response

FieldTypeRequiredDescription
idstringNoID of the visualization
titlestringNoTitle of the visualization
publicIdstringNoPublic ID of the visualization. May be different from the internal ID, if *hash publishing* is enabled.
authorIdintegerNoID of user that created the visualization.
organizationIdstringNoID of the team that the visualization is located in. If null, visualization is private.
folderIdintegerNoID of the folder that the visualization is located in. If null, visualization is in the root of a team, or your private archive.
folderobjectNo
folder.namestringNoUser-defined folder name
languagestringNoVisualization language (output locale), e.g en-US
themestringNoID of theme applied to the visualization
typestringNoType of visualization, e.g d3-lines, d3-maps-choropleth, tables
createdAtstringNoTime and date when the visualization was created.
lastModifiedAtstringNoTime and date when the visualization was last edited.
publishedAtstringNoTime and date when the visualization was last published. null, if the visualization has not been published yet.
lastEditStepintegerNoA number encoding which of the editor steps this chart has been edited in so far. 5 = published.
publicVersionintegerNoIndicates how many times a visualization has been published.
authorobjectNo
author.namestringNoName of the user who created the visualization
author.emailstringNoEmail address of the user who created the visualization
author.avatarstringNoURL pointing to the user avatar
author.colorstringNoColor chosen by the user
thumbnailsobjectNo
thumbnails.fullstringNoURL pointing to the most recently generated preview thumbnail for the visualization. (Image includes header & footer).
thumbnails.plainstringNoURL pointing to the most recently generated preview thumbnail for the visualization. (Image is just the visualization, without header & footer).
urlstringNoAPI URL for the visualization, can be used to retreive additional information, including its metadata.
guestSessionstringNoGuest session id
downloadImageFilenamestringNoDownload image filename
downloadDataFilenamestringNoDownload data filename
sourceImageFilenamesobjectNoSource image filenames
sourceImageFilenames.pngstringNo
sourceImageFilenames.svgstringNo
sourceImageFilenames.pdfstringNo
readonlyKeysstring[]No
openCommentsintegerNoNumber of comments on the visualization
workspaceTeamSettingsobjectNoFrontend-allowed team and workspace settings
deletionInDaysnumberNoNumber of days until the visualization will be permanently deleted.
deletedByobjectNoUser who moved the visualization to the trash.
deletedBy.namestringNoName of the user who moved the visualization to the trash.
deletedBy.emailstringNoEmail address of the user who moved the visualization to the trash.
deletedBy.avatarstringNoURL pointing to the user avatar
deletedBy.colorstringNoColor chosen by the user
publicUrlstringNoURL of published visualization.
deletedbooleanNo
deletedAtstringNoTime and date when the visualization was deleted.
forkablebooleanNoIndicates if the visualization has been shared in the Datawrapper River.
isForkbooleanNoIndicates if the visualization is a copy of another visualization.
forkedFromstringNoID of the visualization that this visualization was copied from. null if it is not a copy.
externalDatastringNoExternal data URL, relevant for live visualizations.
metadataobjectNoAll of the visualization's settings.
chartHashstringNoHash of the visualization's metadata.
customFieldsobjectNo
keywordsstringNoKeywords
utf8booleanNoUTF-8
riverobjectNo
river.sourcestringNo
river.sourceUrlstringNo
basedOnBylinestringNo
workspacestringNo