|
| 1 | +# hostinger_api.MailAutorepliesApi |
| 2 | + |
| 3 | +All URIs are relative to *https://developers.hostinger.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**create_autoreply_v1**](MailAutorepliesApi.md#create_autoreply_v1) | **POST** /api/mail/v1/mailboxes/{mailboxId}/autoreplies | Create autoreply |
| 8 | +[**delete_autoreply_v1**](MailAutorepliesApi.md#delete_autoreply_v1) | **DELETE** /api/mail/v1/autoreplies/{autoreplyId} | Delete autoreply |
| 9 | +[**list_autoreplies_v1**](MailAutorepliesApi.md#list_autoreplies_v1) | **GET** /api/mail/v1/orders/{orderId}/autoreplies | List autoreplies |
| 10 | +[**update_autoreply_v1**](MailAutorepliesApi.md#update_autoreply_v1) | **PUT** /api/mail/v1/autoreplies/{autoreplyId} | Update autoreply |
| 11 | + |
| 12 | + |
| 13 | +# **create_autoreply_v1** |
| 14 | +> MailV1AutorepliesAutoreplyResource create_autoreply_v1(mailbox_id, mail_v1_schema_upsert_autoreply_request_schema) |
| 15 | +
|
| 16 | +Create autoreply |
| 17 | + |
| 18 | +Create an automatic reply for the given mailbox. A mailbox can have |
| 19 | +only one autoreply. Omit `starts_at` to activate the autoreply |
| 20 | +immediately and omit `ends_at` to keep it active indefinitely. |
| 21 | + |
| 22 | +### Example |
| 23 | + |
| 24 | +* Bearer Authentication (apiToken): |
| 25 | + |
| 26 | +```python |
| 27 | +import hostinger_api |
| 28 | +from hostinger_api.models.mail_v1_autoreplies_autoreply_resource import MailV1AutorepliesAutoreplyResource |
| 29 | +from hostinger_api.models.mail_v1_schema_upsert_autoreply_request_schema import MailV1SchemaUpsertAutoreplyRequestSchema |
| 30 | +from hostinger_api.rest import ApiException |
| 31 | +from pprint import pprint |
| 32 | + |
| 33 | + |
| 34 | +# Configure Bearer authorization: apiToken |
| 35 | +configuration = hostinger_api.Configuration( |
| 36 | + access_token = os.environ["BEARER_TOKEN"] |
| 37 | +) |
| 38 | + |
| 39 | +# Enter a context with an instance of the API client |
| 40 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 41 | + # Create an instance of the API class |
| 42 | + api_instance = hostinger_api.MailAutorepliesApi(api_client) |
| 43 | + mailbox_id = 'AC1a2b3c4d5e6f7g' # str | Mailbox resource ID |
| 44 | + mail_v1_schema_upsert_autoreply_request_schema = hostinger_api.MailV1SchemaUpsertAutoreplyRequestSchema() # MailV1SchemaUpsertAutoreplyRequestSchema | |
| 45 | + |
| 46 | + try: |
| 47 | + # Create autoreply |
| 48 | + api_response = api_instance.create_autoreply_v1(mailbox_id, mail_v1_schema_upsert_autoreply_request_schema) |
| 49 | + print("The response of MailAutorepliesApi->create_autoreply_v1:\n") |
| 50 | + pprint(api_response) |
| 51 | + except Exception as e: |
| 52 | + print("Exception when calling MailAutorepliesApi->create_autoreply_v1: %s\n" % e) |
| 53 | +``` |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +### Parameters |
| 58 | + |
| 59 | + |
| 60 | +Name | Type | Description | Notes |
| 61 | +------------- | ------------- | ------------- | ------------- |
| 62 | + **mailbox_id** | **str**| Mailbox resource ID | |
| 63 | + **mail_v1_schema_upsert_autoreply_request_schema** | [**MailV1SchemaUpsertAutoreplyRequestSchema**](MailV1SchemaUpsertAutoreplyRequestSchema.md)| | |
| 64 | + |
| 65 | +### Return type |
| 66 | + |
| 67 | +[**MailV1AutorepliesAutoreplyResource**](MailV1AutorepliesAutoreplyResource.md) |
| 68 | + |
| 69 | +### Authorization |
| 70 | + |
| 71 | +[apiToken](../README.md#apiToken) |
| 72 | + |
| 73 | +### HTTP request headers |
| 74 | + |
| 75 | + - **Content-Type**: application/json |
| 76 | + - **Accept**: application/json |
| 77 | + |
| 78 | +### HTTP response details |
| 79 | + |
| 80 | +| Status code | Description | Response headers | |
| 81 | +|-------------|-------------|------------------| |
| 82 | +**201** | Created response | - | |
| 83 | +**401** | Unauthenticated response | - | |
| 84 | +**404** | Error response | - | |
| 85 | +**409** | Error response | - | |
| 86 | +**422** | Error response | - | |
| 87 | +**500** | Error response | - | |
| 88 | + |
| 89 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 90 | + |
| 91 | +# **delete_autoreply_v1** |
| 92 | +> CommonSuccessEmptyResource delete_autoreply_v1(autoreply_id) |
| 93 | +
|
| 94 | +Delete autoreply |
| 95 | + |
| 96 | +Delete the autoreply of a mailbox. The mailbox stops sending |
| 97 | +automatic replies immediately. |
| 98 | + |
| 99 | +### Example |
| 100 | + |
| 101 | +* Bearer Authentication (apiToken): |
| 102 | + |
| 103 | +```python |
| 104 | +import hostinger_api |
| 105 | +from hostinger_api.models.common_success_empty_resource import CommonSuccessEmptyResource |
| 106 | +from hostinger_api.rest import ApiException |
| 107 | +from pprint import pprint |
| 108 | + |
| 109 | + |
| 110 | +# Configure Bearer authorization: apiToken |
| 111 | +configuration = hostinger_api.Configuration( |
| 112 | + access_token = os.environ["BEARER_TOKEN"] |
| 113 | +) |
| 114 | + |
| 115 | +# Enter a context with an instance of the API client |
| 116 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 117 | + # Create an instance of the API class |
| 118 | + api_instance = hostinger_api.MailAutorepliesApi(api_client) |
| 119 | + autoreply_id = 'AR1a2b3c4d5e6f7g' # str | Autoreply resource ID |
| 120 | + |
| 121 | + try: |
| 122 | + # Delete autoreply |
| 123 | + api_response = api_instance.delete_autoreply_v1(autoreply_id) |
| 124 | + print("The response of MailAutorepliesApi->delete_autoreply_v1:\n") |
| 125 | + pprint(api_response) |
| 126 | + except Exception as e: |
| 127 | + print("Exception when calling MailAutorepliesApi->delete_autoreply_v1: %s\n" % e) |
| 128 | +``` |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | +### Parameters |
| 133 | + |
| 134 | + |
| 135 | +Name | Type | Description | Notes |
| 136 | +------------- | ------------- | ------------- | ------------- |
| 137 | + **autoreply_id** | **str**| Autoreply resource ID | |
| 138 | + |
| 139 | +### Return type |
| 140 | + |
| 141 | +[**CommonSuccessEmptyResource**](CommonSuccessEmptyResource.md) |
| 142 | + |
| 143 | +### Authorization |
| 144 | + |
| 145 | +[apiToken](../README.md#apiToken) |
| 146 | + |
| 147 | +### HTTP request headers |
| 148 | + |
| 149 | + - **Content-Type**: Not defined |
| 150 | + - **Accept**: application/json |
| 151 | + |
| 152 | +### HTTP response details |
| 153 | + |
| 154 | +| Status code | Description | Response headers | |
| 155 | +|-------------|-------------|------------------| |
| 156 | +**200** | Success response | - | |
| 157 | +**401** | Unauthenticated response | - | |
| 158 | +**404** | Error response | - | |
| 159 | +**422** | Error response | - | |
| 160 | +**500** | Error response | - | |
| 161 | + |
| 162 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 163 | + |
| 164 | +# **list_autoreplies_v1** |
| 165 | +> MailListAutorepliesV1200Response list_autoreplies_v1(order_id, page=page, per_page=per_page) |
| 166 | +
|
| 167 | +List autoreplies |
| 168 | + |
| 169 | +Retrieve a paginated list of autoreplies across all mailboxes of a |
| 170 | +mail order. |
| 171 | + |
| 172 | +### Example |
| 173 | + |
| 174 | +* Bearer Authentication (apiToken): |
| 175 | + |
| 176 | +```python |
| 177 | +import hostinger_api |
| 178 | +from hostinger_api.models.mail_list_autoreplies_v1200_response import MailListAutorepliesV1200Response |
| 179 | +from hostinger_api.rest import ApiException |
| 180 | +from pprint import pprint |
| 181 | + |
| 182 | + |
| 183 | +# Configure Bearer authorization: apiToken |
| 184 | +configuration = hostinger_api.Configuration( |
| 185 | + access_token = os.environ["BEARER_TOKEN"] |
| 186 | +) |
| 187 | + |
| 188 | +# Enter a context with an instance of the API client |
| 189 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 190 | + # Create an instance of the API class |
| 191 | + api_instance = hostinger_api.MailAutorepliesApi(api_client) |
| 192 | + order_id = 'OR1a2b3c4d5e6f7g' # str | Order resource ID |
| 193 | + page = 1 # int | Page number (optional) |
| 194 | + per_page = 25 # int | Number of items per page (optional) (default to 25) |
| 195 | + |
| 196 | + try: |
| 197 | + # List autoreplies |
| 198 | + api_response = api_instance.list_autoreplies_v1(order_id, page=page, per_page=per_page) |
| 199 | + print("The response of MailAutorepliesApi->list_autoreplies_v1:\n") |
| 200 | + pprint(api_response) |
| 201 | + except Exception as e: |
| 202 | + print("Exception when calling MailAutorepliesApi->list_autoreplies_v1: %s\n" % e) |
| 203 | +``` |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | +### Parameters |
| 208 | + |
| 209 | + |
| 210 | +Name | Type | Description | Notes |
| 211 | +------------- | ------------- | ------------- | ------------- |
| 212 | + **order_id** | **str**| Order resource ID | |
| 213 | + **page** | **int**| Page number | [optional] |
| 214 | + **per_page** | **int**| Number of items per page | [optional] [default to 25] |
| 215 | + |
| 216 | +### Return type |
| 217 | + |
| 218 | +[**MailListAutorepliesV1200Response**](MailListAutorepliesV1200Response.md) |
| 219 | + |
| 220 | +### Authorization |
| 221 | + |
| 222 | +[apiToken](../README.md#apiToken) |
| 223 | + |
| 224 | +### HTTP request headers |
| 225 | + |
| 226 | + - **Content-Type**: Not defined |
| 227 | + - **Accept**: application/json |
| 228 | + |
| 229 | +### HTTP response details |
| 230 | + |
| 231 | +| Status code | Description | Response headers | |
| 232 | +|-------------|-------------|------------------| |
| 233 | +**200** | Success response | - | |
| 234 | +**401** | Unauthenticated response | - | |
| 235 | +**404** | Error response | - | |
| 236 | +**422** | Error response | - | |
| 237 | +**500** | Error response | - | |
| 238 | + |
| 239 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 240 | + |
| 241 | +# **update_autoreply_v1** |
| 242 | +> MailV1AutorepliesAutoreplyResource update_autoreply_v1(autoreply_id, mail_v1_schema_upsert_autoreply_request_schema) |
| 243 | +
|
| 244 | +Update autoreply |
| 245 | + |
| 246 | +Replace the autoreply with the given content and schedule. Omitted |
| 247 | +optional fields are cleared: omit `starts_at` to activate the |
| 248 | +autoreply immediately and omit `ends_at` to keep it active |
| 249 | +indefinitely. |
| 250 | + |
| 251 | +### Example |
| 252 | + |
| 253 | +* Bearer Authentication (apiToken): |
| 254 | + |
| 255 | +```python |
| 256 | +import hostinger_api |
| 257 | +from hostinger_api.models.mail_v1_autoreplies_autoreply_resource import MailV1AutorepliesAutoreplyResource |
| 258 | +from hostinger_api.models.mail_v1_schema_upsert_autoreply_request_schema import MailV1SchemaUpsertAutoreplyRequestSchema |
| 259 | +from hostinger_api.rest import ApiException |
| 260 | +from pprint import pprint |
| 261 | + |
| 262 | + |
| 263 | +# Configure Bearer authorization: apiToken |
| 264 | +configuration = hostinger_api.Configuration( |
| 265 | + access_token = os.environ["BEARER_TOKEN"] |
| 266 | +) |
| 267 | + |
| 268 | +# Enter a context with an instance of the API client |
| 269 | +with hostinger_api.ApiClient(configuration) as api_client: |
| 270 | + # Create an instance of the API class |
| 271 | + api_instance = hostinger_api.MailAutorepliesApi(api_client) |
| 272 | + autoreply_id = 'AR1a2b3c4d5e6f7g' # str | Autoreply resource ID |
| 273 | + mail_v1_schema_upsert_autoreply_request_schema = hostinger_api.MailV1SchemaUpsertAutoreplyRequestSchema() # MailV1SchemaUpsertAutoreplyRequestSchema | |
| 274 | + |
| 275 | + try: |
| 276 | + # Update autoreply |
| 277 | + api_response = api_instance.update_autoreply_v1(autoreply_id, mail_v1_schema_upsert_autoreply_request_schema) |
| 278 | + print("The response of MailAutorepliesApi->update_autoreply_v1:\n") |
| 279 | + pprint(api_response) |
| 280 | + except Exception as e: |
| 281 | + print("Exception when calling MailAutorepliesApi->update_autoreply_v1: %s\n" % e) |
| 282 | +``` |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | +### Parameters |
| 287 | + |
| 288 | + |
| 289 | +Name | Type | Description | Notes |
| 290 | +------------- | ------------- | ------------- | ------------- |
| 291 | + **autoreply_id** | **str**| Autoreply resource ID | |
| 292 | + **mail_v1_schema_upsert_autoreply_request_schema** | [**MailV1SchemaUpsertAutoreplyRequestSchema**](MailV1SchemaUpsertAutoreplyRequestSchema.md)| | |
| 293 | + |
| 294 | +### Return type |
| 295 | + |
| 296 | +[**MailV1AutorepliesAutoreplyResource**](MailV1AutorepliesAutoreplyResource.md) |
| 297 | + |
| 298 | +### Authorization |
| 299 | + |
| 300 | +[apiToken](../README.md#apiToken) |
| 301 | + |
| 302 | +### HTTP request headers |
| 303 | + |
| 304 | + - **Content-Type**: application/json |
| 305 | + - **Accept**: application/json |
| 306 | + |
| 307 | +### HTTP response details |
| 308 | + |
| 309 | +| Status code | Description | Response headers | |
| 310 | +|-------------|-------------|------------------| |
| 311 | +**200** | Success response | - | |
| 312 | +**401** | Unauthenticated response | - | |
| 313 | +**404** | Error response | - | |
| 314 | +**422** | Error response | - | |
| 315 | +**500** | Error response | - | |
| 316 | + |
| 317 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) |
| 318 | + |
0 commit comments