|
878 | 878 | ], |
879 | 879 | "type": "object" |
880 | 880 | }, |
| 881 | + "smsgateway.IncomingMessage": { |
| 882 | + "properties": { |
| 883 | + "contentPreview": { |
| 884 | + "description": "Message body preview or metadata", |
| 885 | + "type": "string" |
| 886 | + }, |
| 887 | + "createdAt": { |
| 888 | + "description": "Message received timestamp", |
| 889 | + "format": "date-time", |
| 890 | + "type": "string" |
| 891 | + }, |
| 892 | + "id": { |
| 893 | + "description": "Incoming message ID", |
| 894 | + "type": "string" |
| 895 | + }, |
| 896 | + "recipient": { |
| 897 | + "description": "Recipient phone number on the device", |
| 898 | + "nullable": true, |
| 899 | + "type": "string" |
| 900 | + }, |
| 901 | + "sender": { |
| 902 | + "description": "Incoming sender phone number", |
| 903 | + "type": "string" |
| 904 | + }, |
| 905 | + "simNumber": { |
| 906 | + "description": "SIM slot number", |
| 907 | + "nullable": true, |
| 908 | + "type": "integer" |
| 909 | + }, |
| 910 | + "subscriptionId": { |
| 911 | + "description": "Android subscription ID", |
| 912 | + "nullable": true, |
| 913 | + "type": "integer" |
| 914 | + }, |
| 915 | + "type": { |
| 916 | + "enum": [ |
| 917 | + "SMS", |
| 918 | + "DATA_SMS", |
| 919 | + "MMS", |
| 920 | + "MMS_DOWNLOADED" |
| 921 | + ], |
| 922 | + "type": "string" |
| 923 | + } |
| 924 | + }, |
| 925 | + "type": "object" |
| 926 | + }, |
881 | 927 | "smsgateway.TokenRequest": { |
882 | 928 | "properties": { |
883 | 929 | "scopes": { |
|
1954 | 2000 | ] |
1955 | 2001 | } |
1956 | 2002 | }, |
| 2003 | + "/messages/inbox": { |
| 2004 | + "get": { |
| 2005 | + "description": "Retrieves incoming messages with filtering and pagination.", |
| 2006 | + "parameters": [ |
| 2007 | + { |
| 2008 | + "description": "Filter incoming messages by type", |
| 2009 | + "in": "query", |
| 2010 | + "name": "type", |
| 2011 | + "schema": { |
| 2012 | + "enum": [ |
| 2013 | + "SMS", |
| 2014 | + "DATA_SMS", |
| 2015 | + "MMS", |
| 2016 | + "MMS_DOWNLOADED" |
| 2017 | + ], |
| 2018 | + "type": "string" |
| 2019 | + } |
| 2020 | + }, |
| 2021 | + { |
| 2022 | + "description": "Maximum number of messages to return", |
| 2023 | + "in": "query", |
| 2024 | + "name": "limit", |
| 2025 | + "schema": { |
| 2026 | + "default": 50, |
| 2027 | + "maximum": 500, |
| 2028 | + "minimum": 1, |
| 2029 | + "type": "integer" |
| 2030 | + } |
| 2031 | + }, |
| 2032 | + { |
| 2033 | + "description": "Number of messages to skip", |
| 2034 | + "in": "query", |
| 2035 | + "name": "offset", |
| 2036 | + "schema": { |
| 2037 | + "default": 0, |
| 2038 | + "minimum": 0, |
| 2039 | + "type": "integer" |
| 2040 | + } |
| 2041 | + }, |
| 2042 | + { |
| 2043 | + "description": "Start of date range (ISO 8601)", |
| 2044 | + "in": "query", |
| 2045 | + "name": "from", |
| 2046 | + "schema": { |
| 2047 | + "format": "date-time", |
| 2048 | + "type": "string" |
| 2049 | + } |
| 2050 | + }, |
| 2051 | + { |
| 2052 | + "description": "End of date range (ISO 8601)", |
| 2053 | + "in": "query", |
| 2054 | + "name": "to", |
| 2055 | + "schema": { |
| 2056 | + "format": "date-time", |
| 2057 | + "type": "string" |
| 2058 | + } |
| 2059 | + }, |
| 2060 | + { |
| 2061 | + "description": "Device ID", |
| 2062 | + "in": "query", |
| 2063 | + "name": "deviceId", |
| 2064 | + "schema": { |
| 2065 | + "type": "string" |
| 2066 | + } |
| 2067 | + } |
| 2068 | + ], |
| 2069 | + "responses": { |
| 2070 | + "200": { |
| 2071 | + "content": { |
| 2072 | + "application/json": { |
| 2073 | + "schema": { |
| 2074 | + "items": { |
| 2075 | + "$ref": "#/components/schemas/smsgateway.IncomingMessage" |
| 2076 | + }, |
| 2077 | + "type": "array" |
| 2078 | + } |
| 2079 | + } |
| 2080 | + }, |
| 2081 | + "description": "A list of incoming messages" |
| 2082 | + }, |
| 2083 | + "400": { |
| 2084 | + "content": { |
| 2085 | + "application/json": { |
| 2086 | + "schema": { |
| 2087 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2088 | + } |
| 2089 | + } |
| 2090 | + }, |
| 2091 | + "description": "Invalid request" |
| 2092 | + }, |
| 2093 | + "401": { |
| 2094 | + "content": { |
| 2095 | + "application/json": { |
| 2096 | + "schema": { |
| 2097 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2098 | + } |
| 2099 | + } |
| 2100 | + }, |
| 2101 | + "description": "Unauthorized" |
| 2102 | + }, |
| 2103 | + "403": { |
| 2104 | + "content": { |
| 2105 | + "application/json": { |
| 2106 | + "schema": { |
| 2107 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2108 | + } |
| 2109 | + } |
| 2110 | + }, |
| 2111 | + "description": "Forbidden" |
| 2112 | + }, |
| 2113 | + "500": { |
| 2114 | + "content": { |
| 2115 | + "application/json": { |
| 2116 | + "schema": { |
| 2117 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2118 | + } |
| 2119 | + } |
| 2120 | + }, |
| 2121 | + "description": "Internal server error" |
| 2122 | + } |
| 2123 | + }, |
| 2124 | + "security": [ |
| 2125 | + { |
| 2126 | + "ApiAuth": [] |
| 2127 | + }, |
| 2128 | + { |
| 2129 | + "JWTAuth": [] |
| 2130 | + } |
| 2131 | + ], |
| 2132 | + "summary": "Get incoming messages", |
| 2133 | + "tags": [ |
| 2134 | + "User", |
| 2135 | + "Messages" |
| 2136 | + ] |
| 2137 | + } |
| 2138 | + }, |
| 2139 | + "/messages/inbox/{id}": { |
| 2140 | + "get": { |
| 2141 | + "description": "Retrieves a single incoming message by id.", |
| 2142 | + "parameters": [ |
| 2143 | + { |
| 2144 | + "description": "Incoming message ID", |
| 2145 | + "in": "path", |
| 2146 | + "name": "id", |
| 2147 | + "required": true, |
| 2148 | + "schema": { |
| 2149 | + "type": "string" |
| 2150 | + } |
| 2151 | + } |
| 2152 | + ], |
| 2153 | + "responses": { |
| 2154 | + "200": { |
| 2155 | + "content": { |
| 2156 | + "application/json": { |
| 2157 | + "schema": { |
| 2158 | + "$ref": "#/components/schemas/smsgateway.IncomingMessage" |
| 2159 | + } |
| 2160 | + } |
| 2161 | + }, |
| 2162 | + "description": "Incoming message" |
| 2163 | + }, |
| 2164 | + "400": { |
| 2165 | + "content": { |
| 2166 | + "application/json": { |
| 2167 | + "schema": { |
| 2168 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2169 | + } |
| 2170 | + } |
| 2171 | + }, |
| 2172 | + "description": "Invalid request" |
| 2173 | + }, |
| 2174 | + "401": { |
| 2175 | + "content": { |
| 2176 | + "application/json": { |
| 2177 | + "schema": { |
| 2178 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2179 | + } |
| 2180 | + } |
| 2181 | + }, |
| 2182 | + "description": "Unauthorized" |
| 2183 | + }, |
| 2184 | + "403": { |
| 2185 | + "content": { |
| 2186 | + "application/json": { |
| 2187 | + "schema": { |
| 2188 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2189 | + } |
| 2190 | + } |
| 2191 | + }, |
| 2192 | + "description": "Forbidden" |
| 2193 | + }, |
| 2194 | + "404": { |
| 2195 | + "content": { |
| 2196 | + "application/json": { |
| 2197 | + "schema": { |
| 2198 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2199 | + } |
| 2200 | + } |
| 2201 | + }, |
| 2202 | + "description": "Not found" |
| 2203 | + }, |
| 2204 | + "500": { |
| 2205 | + "content": { |
| 2206 | + "application/json": { |
| 2207 | + "schema": { |
| 2208 | + "$ref": "#/components/schemas/smsgateway.ErrorResponse" |
| 2209 | + } |
| 2210 | + } |
| 2211 | + }, |
| 2212 | + "description": "Internal server error" |
| 2213 | + } |
| 2214 | + }, |
| 2215 | + "security": [ |
| 2216 | + { |
| 2217 | + "ApiAuth": [] |
| 2218 | + }, |
| 2219 | + { |
| 2220 | + "JWTAuth": [] |
| 2221 | + } |
| 2222 | + ], |
| 2223 | + "summary": "Get incoming message", |
| 2224 | + "tags": [ |
| 2225 | + "User", |
| 2226 | + "Messages" |
| 2227 | + ] |
| 2228 | + } |
| 2229 | + }, |
1957 | 2230 | "/messages/inbox/export": { |
1958 | 2231 | "post": { |
1959 | 2232 | "description": "Initiates process of inbox messages export via webhooks. For each message the `sms:received` webhook will be triggered. The webhooks will be triggered without specific order.", |
|
0 commit comments