Callback cityboard

POST,GET https://api.publishme.se/1/callbacks/cityboard

Description
Callback for CityBoard

GET PARAMETERS
access_token String, the user authentication token. required
authstring String, the identifier token we use to directly login the user required
user_id String, the cityboard id of the user required
Callback tourn

POST,GET https://api.publishme.se/1/callbacks/tourn

Description
Callback for Tourn

GET PARAMETERS
access_token String, the user authentication token. required
state String, state of current campaign(accepted / no-post / no-post-removed). required
status String, campaign status. required
user_id String, Tourn user ID. required
campaign_title String, Campaign title. required
campaign_id String, Campaign title. required
enddate String, Campaign end date. required
message String, Message for user. required
company String, Company name. //required//
Apns unregister

POST https://api.publishme.se/1/apns/unregister

Description
Unregister a previously registered Apple device from Push notifications (APNS)

Requires apns API priv

GET PARAMETERS
access_token String, the user authentication token. required

POST PARAMETERS
device_id String, The Apple device id to unregister required

RETURNS
{success: Boolean}
Apns register

POST https://api.publishme.se/1/apns/register

Description
Register an Apple device for Push notifications (APNS)

Requires apns API priv

GET PARAMETERS
access_token String, the user authentication token. required

POST PARAMETERS
device_id String, The Apple device id required
ios_version String, The IOS version optional
app_version String, The app version optional

RETURNS
{success: Boolean}
Gcm unregister

POST https://api.publishme.se/1/gcm/unregister

Description
Unregister a previously registered Android device from Google Cloud Messaging (GCM)

Requires apns API priv

GET PARAMETERS
access_token String, the user authentication token. required

POST PARAMETERS
device_id String, The GCM token to unregister required

RETURNS
{success: Boolean}
Gcm register

POST https://api.publishme.se/1/gcm/register

Description
Register an Android device from Google Cloud Messaging (GCM)

Requires apns API priv

GET PARAMETERS
access_token String, the user authentication token. required

POST PARAMETERS
device_id String, the GCM token to register required
android_version String, The Android version optional
app_version String, The app version optional

RETURNS
{success: Boolean}
Errors

GET https://api.publishme.se/1/errors

Description
List all error numbers

RETURNS
{success: Boolean, errors: Array[Object]}

EXAMPLE OUTPUT
{
  "errors": {
    "0": {
      "errmsg": "Couldn't find error in the error lookup table",
      "httpcode": 500
    },
    "1001": {
      "errmsg": "Does not support limit > 100",
      "httpcode": 400
    },
    "1002": {
      "errmsg": "Invalid access_token",
      "httpcode": 403
    },
    "1004": {
      "errmsg": "Token invalidated by user",
      "httpcode": 403
    },
    "1005": {
      "errmsg": "Token expired",
      "httpcode": 403
    },
    "1006": {
      "errmsg": "Token invalid",
      "httpcode": 403
    },
    "1007": {
      "errmsg": "App has been inactivated",
      "httpcode": 403
    },
    "1008": {
      "errmsg": "User does not exist",
      "httpcode": 403
    },
    "1009": {
      "errmsg": "Blog does not exist",
      "httpcode": 404
    },
    "1010": {
      "errmsg": "Comment does not exist",
      "httpcode": 404
    },
    "1011": {
      "errmsg": "Entry does not exist",
      "httpcode": 404
    },
    "1012": {
      "errmsg": "Requires client perms",
      "httpcode": 403
    },
    "1013": {
      "errmsg": "Invalid session",
      "httpcode": 403
    },
    "1014": {
      "errmsg": "Invalid client_id",
      "httpcode": 403
    },
    "1015": {
      "errmsg": "Invalid response_type",
      "httpcode": 400
    },
    "1016": {
      "errmsg": "Unsupported timeperiod, supported timeperiods are %s",
      "httpcode": 400
    },
    "1017": {
      "errmsg": "Signup failed, reason: %s",
      "httpcode": 200
    },
    "1018": {
      "errmsg": "Invalid state supplied",
      "httpcode": 400
    },
    "1019": {
      "errmsg": "Invalid redirect_uri supplied",
      "httpcode": 400
    },
    "1020": {
      "errmsg": "Invalid redirect_uri, no match with registered URL",
      "httpcode": 400
    },
    "1022": {
      "errmsg": "Invalid grant_type",
      "httpcode": 400
    },
    "1023": {
      "errmsg": "Invalid client_id",
      "httpcode": 403
    },
    "1024": {
      "errmsg": "Uh-huh-huh, you didn't say the magic word!",
      "httpcode": 403
    },
    "1025": {
      "errmsg": "Invalid code or redirect_uri",
      "httpcode": 400
    },
    "1026": {
      "errmsg": "Invalid authorization",
      "httpcode": 400
    },
    "1027": {
      "errmsg": "Missing required parameters.",
      "httpcode": 400
    },
    "1028": {
      "errmsg": "Couldn't create image.",
      "httpcode": 400
    },
    "1030": {
      "errmsg": "Couldn't approve comment.",
      "httpcode": 400
    },
    "1031": {
      "errmsg": "Couldn't delete comment.",
      "httpcode": 400
    },
    "1032": {
      "errmsg": "Missing body data",
      "httpcode": 400
    },
    "1033": {
      "errmsg": "Couldn't post reply, bad request.",
      "httpcode": 400
    },
    "1034": {
      "errmsg": "Missing required parameters.",
      "httpcode": 400
    },
    "1035": {
      "errmsg": "Couldn't create entry.",
      "httpcode": 400
    },
    "1037": {
      "errmsg": "Bad geo-location data",
      "httpcode": 400
    },
    "1038": {
      "errmsg": "Missing required parameters.",
      "httpcode": 400
    },
    "1039": {
      "errmsg": "Couldn't update entry.",
      "httpcode": 400
    },
    "1040": {
      "errmsg": "Couldn't delete entry.",
      "httpcode": 400
    },
    "1041": {
      "errmsg": "Missing required parameters.",
      "httpcode": 400
    },
    "1042": {
      "errmsg": "Invalid device_id",
      "httpcode": 400
    },
    "1043": {
      "errmsg": "Couldn't register device",
      "httpcode": 400
    },
    "1044": {
      "errmsg": "Not owner of blog %s",
      "httpcode": 403
    },
    "1045": {
      "errmsg": "Comment doesn't belong to blog %s",
      "httpcode": 403
    },
    "1046": {
      "errmsg": "Not owner of entry %s",
      "httpcode": 403
    },
    "1047": {
      "errmsg": "Entry %s does not belong to this blog ",
      "httpcode": 403
    },
    "1048": {
      "errmsg": "API key does not have '%s' permission",
      "httpcode": 403
    },
    "1049": {
      "errmsg": "Missing required parameter '%s'",
      "httpcode": 400
    },
    "1050": {
      "errmsg": "Error when updating blog settings.",
      "httpcode": 400
    },
    "1051": {
      "errmsg": "Error when updating avatar image.",
      "httpcode": 400
    },
    "1052": {
      "errmsg": "Error when updating account settings.",
      "httpcode": 400
    },
    "1053": {
      "errmsg": "Invalid sex, null, \"f\" and \"m\" are accepted values.",
      "httpcode": 400
    },
    "1054": {
      "errmsg": "Invalid api key",
      "httpcode": 403
    },
    "1055": {
      "errmsg": "Invalid default_image_width specified, must be integer between 1 and 1000",
      "httpcode": 400
    },
    "1056": {
      "errmsg": "Not owner of account %s",
      "httpcode": 403
    },
    "1057": {
      "errmsg": "Invalid blog_id",
      "httpcode": 404
    },
    "1058": {
      "errmsg": "Invalid blog_url",
      "httpcode": 404
    },
    "1059": {
      "errmsg": "Blog not found",
      "httpcode": 404
    },
    "1060": {
      "errmsg": "Expired authorization",
      "httpcode": 400
    },
    "1061": {
      "errmsg": "Invalid state passed: %s",
      "httpcode": 400
    },
    "1062": {
      "errmsg": "Missing mandatory argument %s",
      "httpcode": 400
    },
    "1063": {
      "errmsg": "Invalid enddate format",
      "httpcode": 400
    }
  },
  "success": true
}
Index

GET https://api.publishme.se/1

Description
Get account object and all blogs for current logged on account.

GET PARAMETERS
access_token String, the user authentication token. required

RETURNS
{success: Boolean, api_version: Number, time: String}
EXAMPLE OUTPUT
{
  "api_version": 1,
  "success": true,
  "time": "2019-06-20T11:39:12+02:00"
}
Domain available

POST,GET https://api.publishme.se/1/domain/available.<protocol>

Description
Show preview

GET https://api.publishme.se/1/preview/<randhash>

Description
View an entry preview.

URL PARAMETERS
hash hash of the preview as returned by the preview endpoint.

RETURN
Nothing. Client will get redirected to the preview.