|
1 | 1 | { |
2 | | - "schemes": ["http", "https"], |
| 2 | + "schemes": ["https"], |
3 | 3 | "swagger": "2.0", |
4 | 4 | "info": { |
5 | 5 | "description": "API to send SMS messages using android [SmsManager](https://developer.android.com/reference/android/telephony/SmsManager) via HTTP", |
|
1187 | 1187 | } |
1188 | 1188 | } |
1189 | 1189 | }, |
| 1190 | + "/messages/search": { |
| 1191 | + "get": { |
| 1192 | + "security": [ |
| 1193 | + { |
| 1194 | + "ApiKeyAuth": [] |
| 1195 | + } |
| 1196 | + ], |
| 1197 | + "description": "This returns the list of all messages based on the filter criteria including missed calls", |
| 1198 | + "consumes": ["application/json"], |
| 1199 | + "produces": ["application/json"], |
| 1200 | + "tags": ["Messages"], |
| 1201 | + "summary": "Search all messages of a user", |
| 1202 | + "parameters": [ |
| 1203 | + { |
| 1204 | + "type": "string", |
| 1205 | + "default": "+18005550199,+18005550100", |
| 1206 | + "description": "the owner's phone numbers", |
| 1207 | + "name": "owners", |
| 1208 | + "in": "query", |
| 1209 | + "required": true |
| 1210 | + }, |
| 1211 | + { |
| 1212 | + "minimum": 0, |
| 1213 | + "type": "integer", |
| 1214 | + "description": "number of messages to skip", |
| 1215 | + "name": "skip", |
| 1216 | + "in": "query" |
| 1217 | + }, |
| 1218 | + { |
| 1219 | + "type": "string", |
| 1220 | + "description": "filter messages containing query", |
| 1221 | + "name": "query", |
| 1222 | + "in": "query" |
| 1223 | + }, |
| 1224 | + { |
| 1225 | + "maximum": 200, |
| 1226 | + "minimum": 1, |
| 1227 | + "type": "integer", |
| 1228 | + "description": "number of messages to return", |
| 1229 | + "name": "limit", |
| 1230 | + "in": "query" |
| 1231 | + } |
| 1232 | + ], |
| 1233 | + "responses": { |
| 1234 | + "200": { |
| 1235 | + "description": "OK", |
| 1236 | + "schema": { |
| 1237 | + "$ref": "#/definitions/responses.MessagesResponse" |
| 1238 | + } |
| 1239 | + }, |
| 1240 | + "400": { |
| 1241 | + "description": "Bad Request", |
| 1242 | + "schema": { |
| 1243 | + "$ref": "#/definitions/responses.BadRequest" |
| 1244 | + } |
| 1245 | + }, |
| 1246 | + "401": { |
| 1247 | + "description": "Unauthorized", |
| 1248 | + "schema": { |
| 1249 | + "$ref": "#/definitions/responses.Unauthorized" |
| 1250 | + } |
| 1251 | + }, |
| 1252 | + "422": { |
| 1253 | + "description": "Unprocessable Entity", |
| 1254 | + "schema": { |
| 1255 | + "$ref": "#/definitions/responses.UnprocessableEntity" |
| 1256 | + } |
| 1257 | + }, |
| 1258 | + "500": { |
| 1259 | + "description": "Internal Server Error", |
| 1260 | + "schema": { |
| 1261 | + "$ref": "#/definitions/responses.InternalServerError" |
| 1262 | + } |
| 1263 | + } |
| 1264 | + } |
| 1265 | + } |
| 1266 | + }, |
1190 | 1267 | "/messages/send": { |
1191 | 1268 | "post": { |
1192 | 1269 | "security": [ |
|
1748 | 1825 | } |
1749 | 1826 | } |
1750 | 1827 | }, |
| 1828 | + "/users/{userID}/api-keys": { |
| 1829 | + "delete": { |
| 1830 | + "security": [ |
| 1831 | + { |
| 1832 | + "ApiKeyAuth": [] |
| 1833 | + } |
| 1834 | + ], |
| 1835 | + "description": "Rotate the user's API key in case the current API Key is compromised", |
| 1836 | + "consumes": ["application/json"], |
| 1837 | + "produces": ["application/json"], |
| 1838 | + "tags": ["Users"], |
| 1839 | + "summary": "Rotate the user's API Key", |
| 1840 | + "parameters": [ |
| 1841 | + { |
| 1842 | + "type": "string", |
| 1843 | + "default": "32343a19-da5e-4b1b-a767-3298a73703ca", |
| 1844 | + "description": "ID of the user to update", |
| 1845 | + "name": "userID", |
| 1846 | + "in": "path", |
| 1847 | + "required": true |
| 1848 | + } |
| 1849 | + ], |
| 1850 | + "responses": { |
| 1851 | + "200": { |
| 1852 | + "description": "OK", |
| 1853 | + "schema": { |
| 1854 | + "$ref": "#/definitions/responses.UserResponse" |
| 1855 | + } |
| 1856 | + }, |
| 1857 | + "400": { |
| 1858 | + "description": "Bad Request", |
| 1859 | + "schema": { |
| 1860 | + "$ref": "#/definitions/responses.BadRequest" |
| 1861 | + } |
| 1862 | + }, |
| 1863 | + "401": { |
| 1864 | + "description": "Unauthorized", |
| 1865 | + "schema": { |
| 1866 | + "$ref": "#/definitions/responses.Unauthorized" |
| 1867 | + } |
| 1868 | + }, |
| 1869 | + "422": { |
| 1870 | + "description": "Unprocessable Entity", |
| 1871 | + "schema": { |
| 1872 | + "$ref": "#/definitions/responses.UnprocessableEntity" |
| 1873 | + } |
| 1874 | + }, |
| 1875 | + "500": { |
| 1876 | + "description": "Internal Server Error", |
| 1877 | + "schema": { |
| 1878 | + "$ref": "#/definitions/responses.InternalServerError" |
| 1879 | + } |
| 1880 | + } |
| 1881 | + } |
| 1882 | + } |
| 1883 | + }, |
1751 | 1884 | "/users/{userID}/notifications": { |
1752 | 1885 | "put": { |
1753 | 1886 | "security": [ |
|
2868 | 3001 | }, |
2869 | 3002 | "missed_call_auto_reply": { |
2870 | 3003 | "type": "string", |
2871 | | - "example": "e.g This phone cannot receive calls. Please send an SMS instead." |
| 3004 | + "example": "e.g. This phone cannot receive calls. Please send an SMS instead." |
2872 | 3005 | }, |
2873 | 3006 | "phone_number": { |
2874 | 3007 | "type": "string", |
|
0 commit comments