Skip to content

Commit 6541195

Browse files
chore: sdk update
1 parent e9b1b91 commit 6541195

788 files changed

Lines changed: 2399 additions & 764 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ Class | Method | HTTP request | Description
181181
*HostingWebsitesApi* | [**createWebsiteV1**](docs/Api/HostingWebsitesApi.md#createwebsitev1) | **POST** /api/hosting/v1/websites | Create website
182182
*HostingWebsitesApi* | [**deleteWebsiteV1**](docs/Api/HostingWebsitesApi.md#deletewebsitev1) | **DELETE** /api/hosting/v1/websites/{domain} | Delete website
183183
*HostingWebsitesApi* | [**listWebsitesV1**](docs/Api/HostingWebsitesApi.md#listwebsitesv1) | **GET** /api/hosting/v1/websites | List websites
184+
*MailAPITokensApi* | [**createAPITokenV1**](docs/Api/MailAPITokensApi.md#createapitokenv1) | **POST** /api/mail/v1/orders/{orderId}/api-tokens | Create API token
185+
*MailAPITokensApi* | [**listAPITokensV1**](docs/Api/MailAPITokensApi.md#listapitokensv1) | **GET** /api/mail/v1/api-tokens | List API tokens
186+
*MailAPITokensApi* | [**revokeAPITokenV1**](docs/Api/MailAPITokensApi.md#revokeapitokenv1) | **DELETE** /api/mail/v1/api-tokens/{tokenId} | Revoke API token
184187
*MailLogsApi* | [**listAccessLogsV1**](docs/Api/MailLogsApi.md#listaccesslogsv1) | **GET** /api/mail/v1/orders/{orderId}/logs/access | List access logs
185188
*MailLogsApi* | [**listActionLogsV1**](docs/Api/MailLogsApi.md#listactionlogsv1) | **GET** /api/mail/v1/orders/{orderId}/logs/action | List action logs
186189
*MailLogsApi* | [**listInboundLogsV1**](docs/Api/MailLogsApi.md#listinboundlogsv1) | **GET** /api/mail/v1/orders/{orderId}/logs/inbound | List inbound logs
@@ -492,6 +495,7 @@ Class | Method | HTTP request | Description
492495
- [InlineObject1](docs/Model/InlineObject1.md)
493496
- [InlineObject2](docs/Model/InlineObject2.md)
494497
- [InlineObject2Errors](docs/Model/InlineObject2Errors.md)
498+
- [MailListAPITokensV1200Response](docs/Model/MailListAPITokensV1200Response.md)
495499
- [MailListAccessLogsV1200Response](docs/Model/MailListAccessLogsV1200Response.md)
496500
- [MailListActionLogsV1200Response](docs/Model/MailListActionLogsV1200Response.md)
497501
- [MailListInboundLogsV1200Response](docs/Model/MailListInboundLogsV1200Response.md)
@@ -500,6 +504,10 @@ Class | Method | HTTP request | Description
500504
- [MailListOrdersV1200Response](docs/Model/MailListOrdersV1200Response.md)
501505
- [MailListWebhookDeliveryLogsV1200Response](docs/Model/MailListWebhookDeliveryLogsV1200Response.md)
502506
- [MailListWebhooksV1200Response](docs/Model/MailListWebhooksV1200Response.md)
507+
- [MailV1ApiTokensApiTokenCreatedResource](docs/Model/MailV1ApiTokensApiTokenCreatedResource.md)
508+
- [MailV1ApiTokensApiTokenMailboxResource](docs/Model/MailV1ApiTokensApiTokenMailboxResource.md)
509+
- [MailV1ApiTokensApiTokenResource](docs/Model/MailV1ApiTokensApiTokenResource.md)
510+
- [MailV1ApiTokensApiTokenScopeResource](docs/Model/MailV1ApiTokensApiTokenScopeResource.md)
503511
- [MailV1LogsAccessAccessLogResource](docs/Model/MailV1LogsAccessAccessLogResource.md)
504512
- [MailV1LogsActionActionLogResource](docs/Model/MailV1LogsActionActionLogResource.md)
505513
- [MailV1LogsCommonDeliveryLogRelayEventResource](docs/Model/MailV1LogsCommonDeliveryLogRelayEventResource.md)
@@ -516,6 +524,8 @@ Class | Method | HTTP request | Description
516524
- [MailV1OrdersPlanMailboxResource](docs/Model/MailV1OrdersPlanMailboxResource.md)
517525
- [MailV1OrdersPlanResource](docs/Model/MailV1OrdersPlanResource.md)
518526
- [MailV1SchemaChangeMailboxPasswordRequestSchema](docs/Model/MailV1SchemaChangeMailboxPasswordRequestSchema.md)
527+
- [MailV1SchemaCreateApiTokenRequestSchema](docs/Model/MailV1SchemaCreateApiTokenRequestSchema.md)
528+
- [MailV1SchemaCreateApiTokenRequestSchemaScope](docs/Model/MailV1SchemaCreateApiTokenRequestSchemaScope.md)
519529
- [MailV1SchemaCreateMailboxRequestSchema](docs/Model/MailV1SchemaCreateMailboxRequestSchema.md)
520530
- [MailV1SchemaCreateWebhookRequestSchema](docs/Model/MailV1SchemaCreateWebhookRequestSchema.md)
521531
- [MailV1SchemaUpdateWebhookRequestSchema](docs/Model/MailV1SchemaUpdateWebhookRequestSchema.md)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hostinger/api-php-sdk",
3-
"version": "1.15.0",
3+
"version": "1.16.0",
44
"description": "Hostinger API PHP SDK",
55
"keywords": [
66
"hostinger",

docs/Api/MailAPITokensApi.md

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Hostinger\MailAPITokensApi
2+
3+
All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
4+
5+
| Method | HTTP request | Description |
6+
| ------------- | ------------- | ------------- |
7+
| [**createAPITokenV1()**](MailAPITokensApi.md#createAPITokenV1) | **POST** /api/mail/v1/orders/{orderId}/api-tokens | Create API token |
8+
| [**listAPITokensV1()**](MailAPITokensApi.md#listAPITokensV1) | **GET** /api/mail/v1/api-tokens | List API tokens |
9+
| [**revokeAPITokenV1()**](MailAPITokensApi.md#revokeAPITokenV1) | **DELETE** /api/mail/v1/api-tokens/{tokenId} | Revoke API token |
10+
11+
12+
## `createAPITokenV1()`
13+
14+
```php
15+
createAPITokenV1($orderId, $mailV1SchemaCreateApiTokenRequestSchema): \Hostinger\Model\MailV1ApiTokensApiTokenCreatedResource
16+
```
17+
18+
Create API token
19+
20+
Create an API token for the given mail order. The token grants access to the [Hostinger Email API](https://api.mail.hostinger.com/), where you can provision and manage the mailboxes it is scoped to. The plaintext token is returned only in this response, never again. A maximum of 10 tokens can exist per order. Use `scope.has_all_mailboxes` to cover all current and future mailboxes, or list specific mailboxes in `scope.mailbox_ids`.
21+
22+
### Example
23+
24+
```php
25+
<?php
26+
require_once(__DIR__ . '/vendor/autoload.php');
27+
28+
29+
// Configure Bearer authorization: apiToken
30+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
31+
32+
33+
$apiInstance = new Hostinger\Api\MailAPITokensApi(config: $config);
34+
$orderId = OR1a2b3c4d5e6f7g; // string | Order resource ID
35+
$mailV1SchemaCreateApiTokenRequestSchema = new \Hostinger\Model\MailV1SchemaCreateApiTokenRequestSchema(); // \Hostinger\Model\MailV1SchemaCreateApiTokenRequestSchema
36+
37+
try {
38+
$result = $apiInstance->createAPITokenV1($orderId, $mailV1SchemaCreateApiTokenRequestSchema);
39+
print_r($result);
40+
} catch (Exception $e) {
41+
echo 'Exception when calling MailAPITokensApi->createAPITokenV1: ', $e->getMessage(), PHP_EOL;
42+
}
43+
```
44+
45+
### Parameters
46+
47+
| Name | Type | Description | Notes |
48+
| ------------- | ------------- | ------------- | ------------- |
49+
| **orderId** | **string**| Order resource ID | |
50+
| **mailV1SchemaCreateApiTokenRequestSchema** | [**\Hostinger\Model\MailV1SchemaCreateApiTokenRequestSchema**](../Model/MailV1SchemaCreateApiTokenRequestSchema.md)| | |
51+
52+
### Return type
53+
54+
[**\Hostinger\Model\MailV1ApiTokensApiTokenCreatedResource**](../Model/MailV1ApiTokensApiTokenCreatedResource.md)
55+
56+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
57+
[[Back to Model list]](../../README.md#models)
58+
[[Back to README]](../../README.md)
59+
60+
## `listAPITokensV1()`
61+
62+
```php
63+
listAPITokensV1($orderId, $page, $perPage): \Hostinger\Model\MailListAPITokensV1200Response
64+
```
65+
66+
List API tokens
67+
68+
Retrieve a paginated list of [Hostinger Email API](https://api.mail.hostinger.com/) tokens across all your mail orders, optionally filtered by order. Plaintext tokens are never included; they are returned only when a token is created.
69+
70+
### Example
71+
72+
```php
73+
<?php
74+
require_once(__DIR__ . '/vendor/autoload.php');
75+
76+
77+
// Configure Bearer authorization: apiToken
78+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
79+
80+
81+
$apiInstance = new Hostinger\Api\MailAPITokensApi(config: $config);
82+
$orderId = OR1a2b3c4d5e6f7g,OR9z8y7x6w5v4u3t; // string | Filter tokens by order resource ID. Single value or comma-separated list.
83+
$page = 1; // int | Page number
84+
$perPage = 25; // int | Number of items per page
85+
86+
try {
87+
$result = $apiInstance->listAPITokensV1($orderId, $page, $perPage);
88+
print_r($result);
89+
} catch (Exception $e) {
90+
echo 'Exception when calling MailAPITokensApi->listAPITokensV1: ', $e->getMessage(), PHP_EOL;
91+
}
92+
```
93+
94+
### Parameters
95+
96+
| Name | Type | Description | Notes |
97+
| ------------- | ------------- | ------------- | ------------- |
98+
| **orderId** | **string**| Filter tokens by order resource ID. Single value or comma-separated list. | [optional] |
99+
| **page** | **int**| Page number | [optional] |
100+
| **perPage** | **int**| Number of items per page | [optional] [default to 25] |
101+
102+
### Return type
103+
104+
[**\Hostinger\Model\MailListAPITokensV1200Response**](../Model/MailListAPITokensV1200Response.md)
105+
106+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
107+
[[Back to Model list]](../../README.md#models)
108+
[[Back to README]](../../README.md)
109+
110+
## `revokeAPITokenV1()`
111+
112+
```php
113+
revokeAPITokenV1($tokenId): \Hostinger\Model\CommonSuccessEmptyResource
114+
```
115+
116+
Revoke API token
117+
118+
Revoke an API token. The token immediately loses access to the [Hostinger Email API](https://api.mail.hostinger.com/). This action cannot be undone.
119+
120+
### Example
121+
122+
```php
123+
<?php
124+
require_once(__DIR__ . '/vendor/autoload.php');
125+
126+
127+
// Configure Bearer authorization: apiToken
128+
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
129+
130+
131+
$apiInstance = new Hostinger\Api\MailAPITokensApi(config: $config);
132+
$tokenId = 019683f8-1234-7abc-8def-0123456789ab; // string | API token ID (returned when the token was created)
133+
134+
try {
135+
$result = $apiInstance->revokeAPITokenV1($tokenId);
136+
print_r($result);
137+
} catch (Exception $e) {
138+
echo 'Exception when calling MailAPITokensApi->revokeAPITokenV1: ', $e->getMessage(), PHP_EOL;
139+
}
140+
```
141+
142+
### Parameters
143+
144+
| Name | Type | Description | Notes |
145+
| ------------- | ------------- | ------------- | ------------- |
146+
| **tokenId** | **string**| API token ID (returned when the token was created) | |
147+
148+
### Return type
149+
150+
[**\Hostinger\Model\CommonSuccessEmptyResource**](../Model/CommonSuccessEmptyResource.md)
151+
152+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
153+
[[Back to Model list]](../../README.md#models)
154+
[[Back to README]](../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # MailListAPITokensV1200Response
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**data** | [**\Hostinger\Model\MailV1ApiTokensApiTokenResource[]**](MailV1ApiTokensApiTokenResource.md) | Array of [&#x60;Mail.V1.ApiTokens.ApiTokenResource&#x60;](#model/mailv1apitokensapitokenresource) |
8+
**meta** | [**\Hostinger\Model\CommonSchemaPaginationMetaSchema**](CommonSchemaPaginationMetaSchema.md) | |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# # MailV1ApiTokensApiTokenCreatedResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **string** | Unique API token identifier |
8+
**token** | **string** | Plaintext API token, returned only in this response. Grants access to the [Hostinger Email API](https://api.mail.hostinger.com/) for mailbox provisioning and management. |
9+
**name** | **string** | Human-readable label for this token |
10+
**scope** | [**\Hostinger\Model\MailV1ApiTokensApiTokenScopeResource**](MailV1ApiTokensApiTokenScopeResource.md) | |
11+
**createdAt** | **\DateTime** | |
12+
**type** | **string** | |
13+
14+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # MailV1ApiTokensApiTokenMailboxResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **string** | Mailbox resource ID |
8+
**address** | **string** | |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# # MailV1ApiTokensApiTokenResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **string** | Unique API token identifier |
8+
**orderId** | **string** | Resource ID of the owning mail order |
9+
**name** | **string** | Human-readable label for this token |
10+
**scope** | [**\Hostinger\Model\MailV1ApiTokensApiTokenScopeResource**](MailV1ApiTokensApiTokenScopeResource.md) | |
11+
**createdAt** | **\DateTime** | |
12+
**lastUsedAt** | **\DateTime** | Last successful authentication using this token |
13+
**type** | **string** | |
14+
15+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # MailV1ApiTokensApiTokenScopeResource
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**hasAllMailboxes** | **bool** | Whether the token covers all current and future mailboxes of the order |
8+
**mailboxes** | [**\Hostinger\Model\MailV1ApiTokensApiTokenMailboxResource[]**](MailV1ApiTokensApiTokenMailboxResource.md) | Mailboxes this token grants access to. Empty when &#x60;has_all_mailboxes&#x60; is true. |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # MailV1SchemaCreateApiTokenRequestSchema
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **string** | Human-readable label for this token |
8+
**scope** | [**\Hostinger\Model\MailV1SchemaCreateApiTokenRequestSchemaScope**](MailV1SchemaCreateApiTokenRequestSchemaScope.md) | |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# # MailV1SchemaCreateApiTokenRequestSchemaScope
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**hasAllMailboxes** | **bool** | Grant access to all current and future mailboxes of the order |
8+
**mailboxIds** | **string[]** | Required when &#x60;has_all_mailboxes&#x60; is false. Mailbox resource IDs of this order. |
9+
10+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

0 commit comments

Comments
 (0)