{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"10823ace-27fe-4b15-ae3d-cd2380aac915","name":"Alerti public API","description":"The Alerti public API allows you to programmatically access data stored in your Alerti account with ease.\n\nThe easiest way to get started with the API is to click the Run in Postman button present at the top of the documentation page and use the Postman App to send requests.\n\n# Overview\n\n1. Response to every request is sent in JSON format.\n2. API has an access rate limit applied to it\n3. In case the API request results in an error, it is represented by an \"error\": {} key in the JSON response. More information about the error codes and their explaination below.\n4. The API calls will respond with appropriate HTTP status codes for all requests. A 200 OK indicates all went well, while 4XX or 5XX response codes indicate an error from the requesting client or our API servers respectively.\n5. The Alerti API will only respond to secured communication done over HTTPS. HTTP requests will be sent a 301 redirect to corresponding HTTPS resources.\n6. The Alerti public API is available at the url `https://publicapi.alerti.com`\n\n# Authentication\n\nAn API Token is required to be sent as part of every request to the Alerti API, in the form of the header parameter `X-Auth-Token`.\n\nTo get a user token you need to be on a business or enterprise paid plan. To get the API Key go to the alerti app, account > settings > Api key. \n\nThis token should not be shared with others, it is personal. Your user token will not expire while you are on a premium plan, but you can revoke it and regenerate a new one via the interface. If a token is expired or invalid, you will receive a `A0002` error. \n\n\n# Versioning\n\nThe API is accessed by making HTTP requests to a specific version endpoint URL. Everything (methods, parameters, etc.) is fixed to a version number, and every call must contain one. In the future, different Versions could be available at different endpoint URLs. The latest version is Version 1.\n\nThe stable HTTP endpoint for the latest version is: `https://publicapi.alerti.com/v1/`\n\n\n# Rate Limits\n\nThe api is rate limited to avoid misuse of the api and alerti server resources. \nRate limits are divided into 15 minute intervals. All endpoints require authentication, so there is no concept of unauthenticated calls and rate limits. Requests are limited to 180 calls every 15 minutes.\n\n\nIn the case where you reached the limit, the api will send you a `429` http status code with a response body `Throttled` and a header with the following information:\n\n| HTTP Header | \tDescription |\n|------------|--------------|\n|RateLimit-Limit |\tTotal credits that can be allocated. |\n|RateLimit-Remaining |\tTotal credits available.|\n|RateLimit-Reset |\tTimestamp (unix epoch) for when the credits will be reset. |\n\n\n# Your first api call\n\nIf you want to get the list of your alerts, you can run the following javascript code after having replaced the api key from your account\n\n```\nvar xhr = new XMLHttpRequest();\nxhr.addEventListener(\"readystatechange\", function() {\n  if(this.readyState === 4) {\n    console.log(this.responseText);\n  }\n});\nxhr.open(\"GET\", \"https://publicapi.alerti.com/v1/alerts?page=1\");\nxhr.setRequestHeader('Content-Type', 'application/json');\nxhr.setRequestHeader(\"X-Auth-Token\", \"<MY_API_KEY_HERE>\");\nxhr.send();\n```\n\nor via curl it would be:\n\n```\ncurl --location -g --request GET 'https://publicapi.alerti.com/v1/alerts?page=1' \\\n--header 'X-Auth-Token: {{api_key}}'\n```\n\n\n# Error codes\n\nYou will find here the complete list of error codes sent back by the API in case something went wrong. An error json is described with at least the information below, some errors can have more details specific to your call. \n\n```\n{\n  \"error\": {\n    \"title\": \"Bad Authentication Parameters\",\n    \"code\": \"A0003\",\n    \"status\": 401,\n    \"trace_id: 'RANDOM'\n  }\n}\n\n```\nWe give you here more information about each error:\n\n### A0000 - Internal Server Error\n```\n{\n  \"error\": {\n    \"title\": \"Internal Server Error\",\n    \"code\": \"A0000\",\n    \"status\": 500\n  }\n}\n```\nWell... Something has gone particularly wrong, this is our fault, we should have handled this case better. Do not hesitate to drop us an email and we will look into it.\n\n### A0001 - Params Validation Error\n```\n{\n  \"error\": {\n    \"title\": \"Params Validation Error\",\n    \"code\": \"A0001\",\n    \"status\": 400,\n    \"detail\": \"login is missing\"\n  }\n}\n```\nWe could not validate the parameters you sent, a detailed message will be sent for more explanation.\n\n### A0002 - Unauthorized. Invalid or expired token\n```\n{\n  \"error\": {\n    \"title\": \"Unauthorized. Invalid or expired token\",\n    \"code\": \"A0002\",\n    \"status\": 401\n  }\n}\n```\nBe sure to pass the correct token parameter that you will find in your alerti app (see \"Authentication\" documentation section\n\n### A0003 - Bad Authentication Parameters\n```\n{\n  \"error\": {\n    \"title\": \"Bad Authentication Parameters\",\n    \"code\": \"A0003\",\n    \"status\": 401\n  }\n}\n```\nYou did not provide the right credential to login.\n\n### A0004 - Params Not Exist Error\n```\n{\n  \"error\": {\n    \"title\": \"Params Not Exist Error\",\n    \"code\": \"A0004\",\n    \"status\": 422,\n    \"detail\": \"entry 36104 does not exist\"\n  }\n}\n```\nWe didn't find a corresponding object in the database or you cannot access it.\n\n### A0005 - Permission Denied\n```\n{\n  \"error\": {\n    \"title\": \"Permission Denied\",\n    \"code\": \"A0005\",\n    \"status\": 403,\n    \"detail\": \"You cannot update this alert\"\n  }\n}\n```\nYou are doing something you are not authorized to do. This resource is not yours.\n\n### A0006 - Invalid Object Error\n```\n{\n  \"error\": {\n    \"title\": \"Invalid Object Error\",\n    \"code\": \"A0006\",\n    \"status\": 422,\n  }\n}\n```\nYou are trying to save an object but the validation did not pass. further detail will be displayed on the error json.\n\n### A0007 - Timeout Error\n```\n{\n  \"error\": {\n    \"title\": \"Timeout Error\",\n    \"code\": \"A0007\",\n    \"status\": 500,\n  }\n}\n```\nThe request took too long to proceed. Please contact the support team for more help.\n\n### A0008 - Need Alerts First\n```\n{\n  \"error\": {\n    \"title\": \"Need Alerts First\",\n    \"code\": \"A0009\",\n    \"status\": 404,\n    \"detail\": \"No alerts created. Please create an alert first.\"\n  }\n}\n```\nYou are performing an action but you have no alerts to perform this action on. Create your first alert !\n### A0009 - Account Upgrade Needed\n```\n{\n  \"error\": {\n    \"title\": \"Account Upgrade Needed\",\n    \"code\": \"A0009\",\n    \"status\": 403,\n    \"detail\": \"You are not a premium user.\"\n  }\n}\n```\nYou will need to upgrade to another plan to be able to perform this action.\n\n\n### A0016 - Action Already Done\n```\n{\n  \"error\": {\n    \"title\": \"Action Already Done\",\n    \"code\": \"A0016\",\n    \"status\": 403,\n    \"detail\": \"This invitation has already been accepted\"\n  }\n}\n```\nWe could not find the user with the information given.\n\n\n### A0018 - Email Already Taken\n```\n{\n  \"error\": {\n    \"title\": \"Email Already Taken\",\n    \"code\": \"A0018\",\n    \"status\": 403,\n    \"detail\": \"This email has already been taken by another user. Please choose a different email address.\"\n}\n```\n\n### A0019 - Cannot Delete Error\n```\n{\n  \"error\": {\n    \"title\": \"Cannot Delete Error\",\n    \"code\": \"A0019\",\n    \"status\": 500\n}\n```\nWe didn't manage to delete the resource, This resource is yours but we had a problem, please contact the support team.\n\n### A0020 - Cannot Update Error\n```\n{\n  \"error\": {\n    \"title\": \"Cannot Update Error\",\n    \"code\": \"A0020\",\n    \"status\": ,\n    \"detail\": \"Error while updating your account\"\n}\n```\nWe didn't manage to update the resource, This resource is yours but we had a problem, please contact the support team.\n\n### A0023 - Tags Export Error\n```\n{\n  \"error\": {\n    \"title\": \"Export Error\",\n    \"code\": \"A0023\",\n    \"status\": 422,\n    \"detail\": \"Alert with id 1 does not have any tags\"\n}\n```\n\n### A0024 - Alert Not Active Error\n```\n{\n  \"error\": {\n    \"title\": \"Alert Not Active Error\",\n    \"code\": \"A0024\",\n    \"status\": 403\n}\n```\nYou alert has been deactivated or deleted in the last 30 days, manually or automatically. This alert stays in our database during 30 days before being completely deleted. Be aware that a plan downgrade can deactivate some of your alerts.\n\n### A0026 - Cursor Based Pagination Not Supported\n```\n{\n  \"error\": {\n    \"title\": \"Cursor Based Pagination Not Supported\",\n    \"code\": \"A0026\",\n    \"status\": 422,\n    \"detail\": \"you can only use cursor when sorting by date\" \n}\n```\n\n### F1001 - Facebook Fan Page Not Found\n```\n{\n  \"error\": {\n    \"title\": \"Facebook Fan Page Not Found\",\n    \"code\": \"F1001\",\n    \"status\": 400,\n}\n```\nCheck that the fan page you are requesting exists in your account.\n\n\n### F1003 - Facebook Statistics Never Processed\n```\n{\n  \"error\": {\n    \"title\": \"Facebook Statistics Never Processed\",\n    \"code\": \"F1003\",\n    \"status\": 400,\n    \"detail\": \"No statistics are available yet, we are currently processing them. Please check back in a little bit\"\n}\n```\n\n### F1004 - Facebook Dashboard Needs Admin Account\n```\n{\n  \"error\": {\n    \"title\": \"Facebook Dashboard Needs Admin Account\",\n    \"code\": \"F1004\",\n    \"status\": 403,\n    \"detail\": \"\"\n}\n```\nIn order to access facebook stats dashboard data, you need to administer the fan page.\n\n\n### F1005 - Facebook Dashboard Unavailable\n```\n{\n  \"error\": {\n    \"title\": \"Facebook Dashboard Unavailable\",\n    \"code\": \"F1005\",\n    \"status\": 400,\n}\n```\nDashboard data are unavailable. This is usually the case when you period filter is not correct. \n\n### F1006 - Facebook Max Fans Count Reached\n```\n{\n  \"error\": {\n    \"title\": \"Facebook Max Fans Count Reached\",\n    \"code\": \"F1006\",\n    \"status\": 403,\n}\n```\n\nYou are trying to create/update an alert by adding a facebook fan page that has too many fans. You are allowed only a certain limit of fans across all your fans pages. Contact the support team for any help.\n\n### F1007 - Invalid Facebook Page Error\n```\n{\n  \"error\": {\n    \"title\": \"Invalid Facebook Page Error\",\n    \"code\": \"F1007\",\n    \"status\": 422,\n}\n```\nYou probably added invalid facebook fan page urls.\n\n\n### F1009 - Insufficient permissions Facebook Error\n```\n{\n  \"error\": {\n    \"title\": \"Insufficient permissions Facebook Error\",\n    \"code\": \"F1009\",\n    \"status\": 403,\n}\n```\nYou are trying to perform an action but you don't have the sufficient permissions on facebook or you are not the admin of the fan page.\n\n\n\n### F1013 - Facebook Action Error\n```\n{\n  \"error\": {\n    \"title\": \"Facebook Action Error\",\n    \"code\": \"F1013\",\n    \"status\": 422\n}\n```\nUsually an error with the Facebook API, please check the facebook api status page or contact the alerti support team to find help.\n\n### T0002 - No Stats Data For Period\n```\n{\n  \"error\": {\n    \"title\": \"No Stats Data For Period\",\n    \"code\": \"T0002\",\n    \"status\": 422,\n    \"detail\": \"'We can not yet provide you with data for this period'\"\n}\n```\nYou are trying to access twitter statistics data for a period where we do not have data. \n\n### T0003 - No Twitter Users For Alert\n```\n{\n  \"error\": {\n    \"title\": \"No Twitter Users For Alert\",\n    \"code\": \"T0003\",\n    \"status\": 422\n}\n```\nWe cannot find any Twitter user for the alert given.\n\n### T0005 - Invalid or expired Twitter Account\n```\n{\n  \"error\": {\n    \"title\": \"Invalid or expired Twitter Account\",\n    \"code\": \"T0005\",\n    \"status\": 401\n}\n```\n\nYou need to edit the parameters of your alert and link your twitter account to your alert to be able to do that. If this is already done, your twitter token has been expired, and you need to update your twitter account.\n\n\n### T0006 - Direct Messages Impossible\n```\n{\n  \"error\": {\n    \"title\": \"Direct Messages Impossible\",\n    \"code\": \"T0006\",\n    \"status\": 401\n}\n```\n\nThe DM has failed because either you don't follow the Twitter user or the Twitter user does not follow your twitter account.\n\n### T0007 - No Tweets For Alert\n```\n{\n  \"error\": {\n    \"title\": \"No Tweets For Alert\",\n    \"code\": \"T0007\",\n    \"status\": 401\n}\n```\nYou are trying to access alert twitter statistics but the alert does not have any tweets.\n\n### T0008 - Insufficient permissions Twitter Error\n```\n{\n  \"error\": {\n    \"title\": \"Insufficient permissions Twitter Error\",\n    \"code\": \"T0008\",\n    \"status\": 422\n}\n```\nTo be able to make a specific twitter action from your Alerti account you need to give to alerti write acess to your twitter account.\n\n### T0010 - Like Tweet Impossible\n```\n{\n  \"error\": {\n    \"title\": \"Like Tweet Impossible\",\n    \"code\": \"T0010\",\n    \"status\": 422\n}\n```\n\nYou can not like Tweets of protected users you aren't following.\n\n### I0001 - Instagram Business Account Not Found\n```\n{\n  \"error\": {\n    \"title\": \"Instagram Business Account Not Found\",\n    \"code\": \"I0001\",\n    \"status\": 400,\n}\n```\nCheck that the instagram account exists, it is valid and not deleted.\n\n\n### I0002 - Instagram Statistics Never Processed\n```\n{\n  \"error\": {\n    \"title\": \"Instagram Statistics Never Processed\",\n    \"code\": \"I0002\",\n    \"status\": 400\n}\n```\n\nNo statistics are available yet, we are currently processing them. Please check back in a little bit\n\n### I0003 - Instagram Dashboard Unavailable\n```\n{\n  \"error\": {\n    \"title\": \"Instagram Dashboard Unavailable\",\n    \"code\": \"I0003\",\n    \"status\": 403,\n    \"detail\": \"\"\n}\n```\nDashboard data are unavailable. This is usually the case when you period filter is not correct. \n\n### I0004 - Insufficient permissions Instagram Error\n```\n{\n  \"error\": {\n    \"title\": \"Insufficient permissions Instagram Error\",\n    \"code\": \"I0004\",\n    \"status\": 403,\n}\n```\n\nThe facebook account linked to instagram is deleted on alerti or not valid anymore, or it does not have the required permissions to manage instagram pages.\n\n\n### I0005 - Instagram Action Error\n```\n{\n  \"error\": {\n    \"title\": \"Instagram Action Error\",\n    \"code\": \"I0005\",\n    \"status\": 422,\n}\n```\nAn error occured in the instagram api. Please contact support if you need any more help.\n\n\n# Support\n\nIf you need help regarding the API, feel free to contact us via email at support@alerti.com\n\n# Terms of Use\n\nFor information on API terms of use and privacy, refer to our policy document at https://en.alerti.com/terms#cgu","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"331772","collectionId":"10823ace-27fe-4b15-ae3d-cd2380aac915","publishedId":"SzRyyUZh","public":true,"publicUrl":"https://apidoc.alerti.com","privateUrl":"https://go.postman.co/documentation/331772-10823ace-27fe-4b15-ae3d-cd2380aac915","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2022-03-04T15:25:49.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/ba9f7b9f4403a01151dd8d513a46e8b504d4783155141fe953e41b45e5a6aee3","favicon":"https://res.cloudinary.com/postman/image/upload/v1573561704/team/g6hfrl7gsjiql4fwoa1u.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://apidoc.alerti.com/view/metadata/SzRyyUZh"}