Articles

Articles created in Media Pocket are stored in markdown as a single string. Example: #header, Header 1, text preceded by single number sign (#) italics, Text encapsulated in single underscore (_) is italics bold text, Text encapsulated with two asterisks (**) is bold text.

Media Pocket specific

Image asset tag:

When an image is added to the article in Media Pocket article editor, only the asset ID from the image is stored.

Example:

[mp-image]:Z_braGGNp690TnBjdr1N(alttext)

This tag consists of [mp-image]: followed by asset ID from Media Pocket and then alt text for the image encapsulated in parenthesis ( (text) ) The image used in Media Pocket article editor is preview_jpg version of the asset.

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Examples

// Successful request
GET /api/v2/assets/TgBobh10jVDsUptmT12U/article
200
{
  "content": "#Header1\n          plain text\n          **bold text**\n          *italic text*"
}
// If asset is not found
GET /api/v2/assets/not-found-id/article
404
{
  "error": "asset not found"
}
// If asset is not an article
GET /api/v2/assets/WLx0N3tRhFCEQhgYECE_/article
404
{
  "error": "article not found"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters