All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateMailbox | Post /api/v1/add/mailbox | Create mailbox |
DeleteMailbox | Post /api/v1/delete/mailbox | Delete mailbox |
DeleteMailboxTags | Post /api/v1/delete/mailbox/tag/{mailbox} | Delete mailbox tags |
EditMailboxSpamFilterScore | Post /api/v1/edit/spam-score/ | Edit mailbox spam filter score |
GetMailboxes | Get /api/v1/get/mailbox/{id} | Get mailboxes |
GetMailboxesOfADomain | Get /api/v1/get/mailbox/all/{domain} | Get mailboxes of a domain |
QuarantineNotifications | Post /api/v1/edit/quarantine_notification | Quarantine Notifications |
UpdateMailbox | Post /api/v1/edit/mailbox | Update mailbox |
UpdateMailboxACL | Post /api/v1/edit/user-acl | Update mailbox ACL |
UpdatePushoverSettings | Post /api/v1/edit/pushover | Update Pushover settings |
CreateAlias200Response CreateMailbox(ctx).CreateMailboxRequest(createMailboxRequest).Execute()
Create mailbox
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
createMailboxRequest := *openapiclient.NewCreateMailboxRequest() // CreateMailboxRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxesApi.CreateMailbox(context.Background()).CreateMailboxRequest(createMailboxRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.CreateMailbox``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateMailbox`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `MailboxesApi.CreateMailbox`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateMailboxRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createMailboxRequest | CreateMailboxRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response DeleteMailbox(ctx).DeleteMailboxRequest(deleteMailboxRequest).Execute()
Delete mailbox
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
deleteMailboxRequest := *openapiclient.NewDeleteMailboxRequest() // DeleteMailboxRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxesApi.DeleteMailbox(context.Background()).DeleteMailboxRequest(deleteMailboxRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.DeleteMailbox``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteMailbox`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `MailboxesApi.DeleteMailbox`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiDeleteMailboxRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
deleteMailboxRequest | DeleteMailboxRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response DeleteMailboxTags(ctx, mailbox).DeleteMailboxTagsRequest(deleteMailboxTagsRequest).Execute()
Delete mailbox tags
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
mailbox := "[email protected]" // string | name of mailbox
deleteMailboxTagsRequest := *openapiclient.NewDeleteMailboxTagsRequest() // DeleteMailboxTagsRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxesApi.DeleteMailboxTags(context.Background(), mailbox).DeleteMailboxTagsRequest(deleteMailboxTagsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.DeleteMailboxTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteMailboxTags`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `MailboxesApi.DeleteMailboxTags`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
mailbox | string | name of mailbox |
Other parameters are passed through a pointer to a apiDeleteMailboxTagsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
deleteMailboxTagsRequest | DeleteMailboxTagsRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response EditMailboxSpamFilterScore(ctx).Body(body).Execute()
Edit mailbox spam filter score
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
body := interface{}(987) // interface{} | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxesApi.EditMailboxSpamFilterScore(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.EditMailboxSpamFilterScore``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EditMailboxSpamFilterScore`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `MailboxesApi.EditMailboxSpamFilterScore`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiEditMailboxSpamFilterScoreRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
body | interface{} |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMailboxes(ctx, id).Tags(tags).XAPIKey(xAPIKey).Execute()
Get mailboxes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
id := "all" // string | id of entry you want to get
tags := "tag1,tag2" // string | comma seperated list of tags to filter by (optional)
xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MailboxesApi.GetMailboxes(context.Background(), id).Tags(tags).XAPIKey(xAPIKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.GetMailboxes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | id of entry you want to get |
Other parameters are passed through a pointer to a apiGetMailboxesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
tags | string | comma seperated list of tags to filter by | xAPIKey | string | e.g. api-key-string |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMailboxesOfADomain(ctx, domain).XAPIKey(xAPIKey).Execute()
Get mailboxes of a domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
domain := "domain_example" // string | name of domain
xAPIKey := "api-key-string" // string | e.g. api-key-string (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MailboxesApi.GetMailboxesOfADomain(context.Background(), domain).XAPIKey(xAPIKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.GetMailboxesOfADomain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domain | string | name of domain |
Other parameters are passed through a pointer to a apiGetMailboxesOfADomainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xAPIKey | string | e.g. api-key-string |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
QuarantineNotifications(ctx).QuarantineNotificationsRequest(quarantineNotificationsRequest).Execute()
Quarantine Notifications
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
quarantineNotificationsRequest := *openapiclient.NewQuarantineNotificationsRequest() // QuarantineNotificationsRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MailboxesApi.QuarantineNotifications(context.Background()).QuarantineNotificationsRequest(quarantineNotificationsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.QuarantineNotifications``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiQuarantineNotificationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
quarantineNotificationsRequest | QuarantineNotificationsRequest |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response UpdateMailbox(ctx).UpdateMailboxRequest(updateMailboxRequest).Execute()
Update mailbox
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
updateMailboxRequest := *openapiclient.NewUpdateMailboxRequest() // UpdateMailboxRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxesApi.UpdateMailbox(context.Background()).UpdateMailboxRequest(updateMailboxRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.UpdateMailbox``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateMailbox`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `MailboxesApi.UpdateMailbox`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdateMailboxRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
updateMailboxRequest | UpdateMailboxRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response UpdateMailboxACL(ctx).UpdateMailboxACLRequest(updateMailboxACLRequest).Execute()
Update mailbox ACL
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
updateMailboxACLRequest := *openapiclient.NewUpdateMailboxACLRequest() // UpdateMailboxACLRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxesApi.UpdateMailboxACL(context.Background()).UpdateMailboxACLRequest(updateMailboxACLRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.UpdateMailboxACL``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateMailboxACL`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `MailboxesApi.UpdateMailboxACL`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdateMailboxACLRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
updateMailboxACLRequest | UpdateMailboxACLRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateAlias200Response UpdatePushoverSettings(ctx).UpdatePushoverSettingsRequest(updatePushoverSettingsRequest).Execute()
Update Pushover settings
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/shoopea/mailcow-go"
)
func main() {
updatePushoverSettingsRequest := *openapiclient.NewUpdatePushoverSettingsRequest() // UpdatePushoverSettingsRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MailboxesApi.UpdatePushoverSettings(context.Background()).UpdatePushoverSettingsRequest(updatePushoverSettingsRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MailboxesApi.UpdatePushoverSettings``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdatePushoverSettings`: CreateAlias200Response
fmt.Fprintf(os.Stdout, "Response from `MailboxesApi.UpdatePushoverSettings`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUpdatePushoverSettingsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
updatePushoverSettingsRequest | UpdatePushoverSettingsRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]