HTTP statuses and errors

HTTP statuses indicate if a request has been successful. The Datawrapper API responses will include standard HTTP statuses including error codes. You can find a good overview of HTTP status codes on https://httpstatuses.com.

To show you an example, the 418 client error is rather funny:

Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.

Since the Datawrapper API cannot make tea (or coffee) you won't see this error code from its endpoints.

Others like 201 CREATED are very likely though, for example when creating a chart. Here are some of the status codes the Datawrapper API uses:

Code

Name

Type

Example

200

OK

Success

GET requests will return status 200 if everything was OK

201

Created

POST requests that create new resources (like a chart) will return 201.

204

No Content

PUT requests usually don't return anything since they replace the complete resource.

301

Moved permanently

Redirection

There is one permanent redirect where /3 gets redirected to /v3

400

Bad request

Client error

Some invalid data was sent to the server. Additional information may be provided as an error message.

401

Unauthorized

The API Access Token is invalid and authorization failed. You can check if the token used has a typo or got revoked at some point. If you can't see it in app.datawrapper.de/account, it won't work.

403

Forbidden

You don't have access to the requested resource.

404

Not found

The requested resource was not found.

409

Conflict

There is a conflict with the target resource. This can happen if you try to create a resource with a unique identifier that already exists.

If you see any statuses in the 5xx (e.g., 500 Internal server error) range, this is probably a bug on our side. It could be that the server is unavailable. In this case, please contact us at support@datawrapper.de.