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