{"_id":"56e590ae69d7890e000ec286","__v":12,"project":"56cecbdb44c5700b0095c03a","githubsync":"","parentDoc":null,"user":"56cecbb2e50c9c1b008303eb","version":{"_id":"56cecbdc44c5700b0095c03d","project":"56cecbdb44c5700b0095c03a","__v":10,"createdAt":"2016-02-25T09:39:40.121Z","releaseDate":"2016-02-25T09:39:40.121Z","categories":["56cecbdc44c5700b0095c03e","56d1d2c05ad7ad0b00b7e809","56d1d2fa5ad7ad0b00b7e80a","56d369331660770b00081159","56d3693d1660770b0008115a","56e5361e7990160e002e3fbc","56e5362775eb791700a9c4d2","57a9030947f2f419009188d4","57b4705ee9e4c60e00f6f4c3","5828f5b04774ab0f005179a2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"56e5362775eb791700a9c4d2","__v":6,"project":"56cecbdb44c5700b0095c03a","pages":["56e590ae69d7890e000ec286","56e590fa3c29b117008dae50","56e6f058d66be417007d2364","56e7eaa8f0fafd36008faf59","56ea8db9ed3ad20e004e5a02","56ea8f3e0252fb17008804ac"],"version":"56cecbdc44c5700b0095c03d","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-13T09:43:03.596Z","from_sync":false,"order":7,"slug":"remote-api","title":"Server API"},"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-13T16:09:18.269Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Our Server REST API allows you to do the following actions:\n* [view campaigns](doc:campaigns) \n* [create campaign](doc:campaigns-create-campaign) \n* [create notification](doc:notifications-create-notification) \n* [view feeds](doc:feeds) \n\n\n\n\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Authentication\"\n}\n[/block]\nAll the requests are authenticated based on your application API Key. You can get it from the our [Admin Console](https://my.pushapps.mobi), in the dashboard tab:\n\n\nThe API key is passed as a header with the name X-API-Key, here is an example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X GET -H \\\"X-API-Key: MY_API_KEY\\\" -H  \\\"https://api.pushapps.mobi/v1/feeds\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Endpoints\"\n}\n[/block]\nOur API is a REST API, we try to stick with standard REST conventions:\n* **GET** requests are for viewing data without modifying it\n* **POST** request are for creating resources, usually with getting their id in the response.\n* **PUT** requests are for updating resources.\n* **DELETE** requests are for deleting resources.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Responses\"\n}\n[/block]\nAll of our responses are in JSON format, and contain the header `Content-Type: application/json; charset=utf-8`\nthe following responses are available:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP status code\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"**200**\",\n    \"0-1\": \"**Success**\\nresponse body is a JSON object with more data.\",\n    \"1-0\": \"**400**\",\n    \"1-1\": \"**Bad request**\\nThe API could not process your request, usually due to invalid or wrong request parameters. there is no point of retrying it. the response contains an array of strings with the key `errors` with more information about the fauilre\",\n    \"2-0\": \"**401**\",\n    \"2-1\": \"**Unauthorized**\\nThe API key is missing or invalid, or there is an issue with your account.\",\n    \"3-0\": \"**5XX**\",\n    \"3-1\": \"**Internal Server Error**\\nThe API has encountered internal error. Try again later or contact our support team to help us resolve it.\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","excerpt":"","slug":"overview-2","type":"basic","title":"Server API Overview"}

Server API Overview


Our Server REST API allows you to do the following actions: * [view campaigns](doc:campaigns) * [create campaign](doc:campaigns-create-campaign) * [create notification](doc:notifications-create-notification) * [view feeds](doc:feeds) [block:api-header] { "type": "basic", "title": "1. Authentication" } [/block] All the requests are authenticated based on your application API Key. You can get it from the our [Admin Console](https://my.pushapps.mobi), in the dashboard tab: The API key is passed as a header with the name X-API-Key, here is an example: [block:code] { "codes": [ { "code": "curl -X GET -H \"X-API-Key: MY_API_KEY\" -H \"https://api.pushapps.mobi/v1/feeds\"", "language": "curl" } ] } [/block] [block:api-header] { "type": "basic", "title": "2. Endpoints" } [/block] Our API is a REST API, we try to stick with standard REST conventions: * **GET** requests are for viewing data without modifying it * **POST** request are for creating resources, usually with getting their id in the response. * **PUT** requests are for updating resources. * **DELETE** requests are for deleting resources. [block:api-header] { "type": "basic", "title": "Responses" } [/block] All of our responses are in JSON format, and contain the header `Content-Type: application/json; charset=utf-8` the following responses are available: [block:parameters] { "data": { "h-0": "HTTP status code", "h-1": "Description", "0-0": "**200**", "0-1": "**Success**\nresponse body is a JSON object with more data.", "1-0": "**400**", "1-1": "**Bad request**\nThe API could not process your request, usually due to invalid or wrong request parameters. there is no point of retrying it. the response contains an array of strings with the key `errors` with more information about the fauilre", "2-0": "**401**", "2-1": "**Unauthorized**\nThe API key is missing or invalid, or there is an issue with your account.", "3-0": "**5XX**", "3-1": "**Internal Server Error**\nThe API has encountered internal error. Try again later or contact our support team to help us resolve it." }, "cols": 2, "rows": 4 } [/block]