Publish Article

POST https://api.presshub.io/v1/publish

Publishes content to specified services.

Body JSON
template
array
required
Presshub template array. See Get Template Info endpoint for the template structure. See Presshub Template structure information.
services
array
required
Array of service names where you will publish article.
Body JSON Format
{
  "template": {
    "version": "1.0",
    "title": "Your Article Title",
    "subtitle": "Your Article Subtitle",
    "canonicalURL": "http://example.com/your-article-url.html",
    "keywords": [
      "Keyword1",
      "Keyword2",
      "Keyword3"
    ],
    "maturityRating": null,
    "language": "en",
    "thumbnail": "https://example.com/article-thumbnail.jpg",
    "template": "basic",
    "components": [
      {
        "map": "byline",
        "value": "By Author Name",
        "options": []
      },
      {
        "map": "featured_image",
        "value": "URL",
        "options": {
          "Caption": "Image caption",
          "Photographer": "Photo by Name"
        }
      },
      {
        "map": "body",
        "value": "<p>HTML content</p>",
        "options": []
      }
    ]
  },
  "services": {
    "AppleNews" : [],
    "Medium" : [],
    "Twitter" : {
      "message": ""
    },
    "Slack" : {
      "message": ""
    },
    "FacebookIA" : {
      "message": ""
    },
    "LinkedIn" : {
      "message": ""
    }
  }
}
Response Format
{
  "post_id": "pub_2c49f539",
  "data": {
    "AppleNews": {
      "data": {
        "createdAt": "2016-10-28T06:23:41Z",
        "modifiedAt": "2016-10-28T06:23:41Z",
        "id": "51078695-2c37-4bd1-b9db-c52e00393e45",
        "type": "article",
        "shareUrl": "https://apple.news/AUciGlSx3S9G128UuADeyRQ",
        "links": {
          "channel": "https://news-api.apple.com/channels/1da7cd6a-1425-4154-17ef-aaf2161d3e4d",
          "self": "https://news-api.apple.com/articles/51078695-2c37-4bd1-b9db-c52e00393e45",
          "sections": [
            "https://news-api.apple.com/sections/c735b10c-c2b8-3c56-9ce8-8f0002af7b3e"
          ]
        },
        "revision": "AAAAAAAAAAD//////////w==",
        "state": "PROCESSING",
        "accessoryText": null,
        "title": "Your Article Title",
        "maturityRating": null,
        "warnings": [],
        "isCandidateToBeFeatured": false,
        "isSponsored": false,
        "isPreview": false,
        "isDevelopingStory": false
      }
    },
    "Medium": {
      "data": {
        "id": "48b09b7b0413",
        "title": "Your Article Title",
        "authorId": "13503d6e538c2de396738abd5d1eb3e82f0bdf4ed08f9263c488e1226f24f8842",
        "url": "https://medium.com/@minnur/your-article-title-48b09b7b0413",
        "canonicalUrl": "http://example.com/your-article-ul.html",
        "publishStatus": "public",
        "publishedAt": 1477635823301,
        "license": "",
        "licenseUrl": "https://medium.com/policy/9db0094a1e0f",
        "tags": []
      }
    },
    "Twitter": {
      "created_at": "Fri Oct 28 06:23:44 +0000 2016",
      "id": 191888158145785611,
      "id_str": "191888158145785611",
      "text": "Your Article Title https://t.co/MeSzyOgsGk",
      "truncated": false,
      "entities": {
        "hashtags": [],
        "symbols": [],
        "user_mentions": [],
        "urls": [
          {
            "url": "https://t.co/MeSzyOgsGk",
            "expanded_url": "http://example.com/your-article-ul.html",
            "display_url": "example.com/your-article-u…",
            "indices": [
              19,
              42
            ]
          }
        ]
      },
      "source": "Presshub",
      "in_reply_to_status_id": null,
      "in_reply_to_status_id_str": null,
      "in_reply_to_user_id": null,
      "in_reply_to_user_id_str": null,
      "in_reply_to_screen_name": null,
      "user": {
        "id": 36314405,
        "id_str": "36314405",
        "name": "Minnur Yunusov",
        "screen_name": "minnur",
        "location": "San Francisco, CA",
        "description": "Founder at Presshub.io",
        "url": "http://t.co/XIz3yRKETy",
        "entities": {
          "url": {
            "urls": [
              {
                "url": "http://t.co/XIz3yRKETy",
                "expanded_url": "http://www.minnur.com/",
                "display_url": "minnur.com",
                "indices": [
                  0,
                  22
                ]
              }
            ]
          },
          "description": {
            "urls": []
          }
        },
        "protected": false,
        "followers_count": 139,
        "friends_count": 250,
        "listed_count": 34,
        "created_at": "Wed Apr 29 07:58:26 +0000 2009",
        "favourites_count": 210,
        "utc_offset": 32400,
        "time_zone": "Tokyo",
        "geo_enabled": false,
        "verified": false,
        "statuses_count": 422,
        "lang": "en",
        "contributors_enabled": false,
        "is_translator": false,
        "is_translation_enabled": false,
        "profile_background_color": "000000",
        "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_tile": false,
        "profile_image_url": "http://pbs.twimg.com/profile_images/672553729728483329/jLLCnFHo_normal.png",
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/672553729728483329/jLLCnFHo_normal.png",
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/36314405/1458843785",
        "profile_link_color": "403560",
        "profile_sidebar_border_color": "000000",
        "profile_sidebar_fill_color": "000000",
        "profile_text_color": "000000",
        "profile_use_background_image": false,
        "has_extended_profile": false,
        "default_profile": false,
        "default_profile_image": false,
        "following": false,
        "follow_request_sent": false,
        "notifications": false,
        "translator_type": "none"
      },
      "geo": null,
      "coordinates": null,
      "place": null,
      "contributors": null,
      "is_quote_status": false,
      "retweet_count": 0,
      "favorite_count": 0,
      "favorited": false,
      "retweeted": false,
      "possibly_sensitive": false,
      "lang": "en"
    },
    "LinkedIn": {
      "data": {
        "updateKey": "UPDATE-c12905069-1197653849742786560",
        "updateUrl": "https://www.linkedin.com/company/12905069/comments?topic=1197653849742786560&type=U&scope=12905069&stype=C&a=fkSR"
      }
    }
  }
}