API Documentation
The Infogram API platform connects your website or application with the infographics.

POST infographics

Creates new infographic.

Resource URL

https://infogr.am/service/v1/infographics

Parameters

Name Type Required Description
content String yes Contents of the infographic to be created. See content JSON format
theme_id Integer yes Theme indentifier for the infographic.
title String no Define explicit title for the infographic instead of inferring it from the content.
publish Boolean no Publish the newly created infographic or not, false by default.
publish_mode String, “public” or “private” no If publish is specified, allows publishing infographic either as “private” or “public” (default)
password String no If publish_mode is "private", sets access password for the infographic
width Number no Specify width, in pixels, for the infographic
copyright String no Specify copyright text for the infographic

Response

Successful response contains:

  • HTTP status 201 “Created”,
  • header Location with URL which can be used to access the newly created infographic resource through the REST API
  • header X-Infogram-Id which contains identifier of the newly created infographic
  • body containing JSON string which represents the newly created infographic metadata

Example request

curl -XPOST http://infogr.am/service/v1/infographics -D- -d 'api_key=nMECGhmHe9&content=%5B%7B%22type%22%3A%22h1%22%2C%22text%22%3A%22Hello%20infogr.am%22%7D%5D&publish=false&theme_id=45&title=Hello&api_sig=bqwCqAk1TWDYNy3eqV0BiNuIERQ%3D'

Example response (headers)

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Location: /service/v1/infographics/ede8a168-d3f4-41c5-8201-0931ac365372
X-Infogram-Id: ede8a168-d3f4-41c5-8201-0931ac365372
Content-Length: 287
{
    "id": "ede8a168-d3f4-41c5-8201-0931ac365372",
    "title": "Hello",
    "theme_id": 45,
    "published": false,
    "thumbnail_url": "https://s3-eu-west-1.amazonaws.com/infogram-thumbs-200/ede8a168-d3f4-41c5-8201-0931ac365372.jpg",
    "date_modified": "2014-12-04T15:36:11.000Z",
    "embed_responsive": "<script id=\"infogram_0_84619316-7b36-43be-b3e1-19caea940e79\" title=\"\" src=\"https://e.infogram.com/js/dist/embed.js?Qzy\" type=\"text/javascript\"></script>",
    "embed_async": "<div class=\"infogram-embed\" data-id=\"84619316-7b36-43be-b3e1-19caea940e79\" data-type=\"interactive\" data-title=\"\"></div><script>!function(e,i,n,s){var t=\"InfogramEmbeds\",d=e.getElementsByTagName(\"script\")[0];if(window[t]&&window[t].initialized)window[t].process&&window[t].process();else if(!e.getElementById(n)){var o=e.createElement("script");o.async=1,o.id=n,o.src=\"https://e.infogram.com/js/dist/embed-loader-min.js\",d.parentNode.insertBefore(o,d)}}(document,0,\"infogram-async\");</script>"

}