Skip to content

Latest commit

 

History

History
692 lines (435 loc) · 18.7 KB

MailboxesApi.md

File metadata and controls

692 lines (435 loc) · 18.7 KB

\MailboxesApi

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

CreateMailbox

CreateAlias200Response CreateMailbox(ctx).CreateMailboxRequest(createMailboxRequest).Execute()

Create mailbox

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateMailboxRequest struct via the builder pattern

Name Type Description Notes
createMailboxRequest CreateMailboxRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteMailbox

CreateAlias200Response DeleteMailbox(ctx).DeleteMailboxRequest(deleteMailboxRequest).Execute()

Delete mailbox

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDeleteMailboxRequest struct via the builder pattern

Name Type Description Notes
deleteMailboxRequest DeleteMailboxRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteMailboxTags

CreateAlias200Response DeleteMailboxTags(ctx, mailbox).DeleteMailboxTagsRequest(deleteMailboxTagsRequest).Execute()

Delete mailbox tags

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
mailbox string name of mailbox

Other Parameters

Other parameters are passed through a pointer to a apiDeleteMailboxTagsRequest struct via the builder pattern

Name Type Description Notes

deleteMailboxTagsRequest | DeleteMailboxTagsRequest | |

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

EditMailboxSpamFilterScore

CreateAlias200Response EditMailboxSpamFilterScore(ctx).Body(body).Execute()

Edit mailbox spam filter score

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiEditMailboxSpamFilterScoreRequest struct via the builder pattern

Name Type Description Notes
body interface{}

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMailboxes

GetMailboxes(ctx, id).Tags(tags).XAPIKey(xAPIKey).Execute()

Get mailboxes

Example

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)
    }
}

Path Parameters

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

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 |

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetMailboxesOfADomain

GetMailboxesOfADomain(ctx, domain).XAPIKey(xAPIKey).Execute()

Get mailboxes of a domain

Example

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)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
domain string name of domain

Other Parameters

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 |

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

QuarantineNotifications

QuarantineNotifications(ctx).QuarantineNotificationsRequest(quarantineNotificationsRequest).Execute()

Quarantine Notifications

Example

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)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiQuarantineNotificationsRequest struct via the builder pattern

Name Type Description Notes
quarantineNotificationsRequest QuarantineNotificationsRequest

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateMailbox

CreateAlias200Response UpdateMailbox(ctx).UpdateMailboxRequest(updateMailboxRequest).Execute()

Update mailbox

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiUpdateMailboxRequest struct via the builder pattern

Name Type Description Notes
updateMailboxRequest UpdateMailboxRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateMailboxACL

CreateAlias200Response UpdateMailboxACL(ctx).UpdateMailboxACLRequest(updateMailboxACLRequest).Execute()

Update mailbox ACL

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiUpdateMailboxACLRequest struct via the builder pattern

Name Type Description Notes
updateMailboxACLRequest UpdateMailboxACLRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdatePushoverSettings

CreateAlias200Response UpdatePushoverSettings(ctx).UpdatePushoverSettingsRequest(updatePushoverSettingsRequest).Execute()

Update Pushover settings

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiUpdatePushoverSettingsRequest struct via the builder pattern

Name Type Description Notes
updatePushoverSettingsRequest UpdatePushoverSettingsRequest

Return type

CreateAlias200Response

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]