All URIs are relative to https://api.elasticemail.com/v4
| Method | HTTP request | Description |
|---|---|---|
| SecurityApikeysByNameDelete | Delete /security/apikeys/{name} | Delete ApiKey |
| SecurityApikeysByNameGet | Get /security/apikeys/{name} | Load ApiKey |
| SecurityApikeysByNamePut | Put /security/apikeys/{name} | Update ApiKey |
| SecurityApikeysGet | Get /security/apikeys | List ApiKeys |
| SecurityApikeysPost | Post /security/apikeys | Add ApiKey |
| SecuritySmtpByNameDelete | Delete /security/smtp/{name} | Delete SMTP Credential |
| SecuritySmtpByNameGet | Get /security/smtp/{name} | Load SMTP Credential |
| SecuritySmtpByNamePut | Put /security/smtp/{name} | Update SMTP Credential |
| SecuritySmtpGet | Get /security/smtp | List SMTP Credentials |
| SecuritySmtpPost | Post /security/smtp | Add SMTP Credential |
SecurityApikeysByNameDelete(ctx, name).Subaccount(subaccount).Execute()
Delete ApiKey
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | Name of the ApiKey
subaccount := "subaccount_example" // string | Email of the subaccount of which ApiKey should be deleted (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SecurityAPI.SecurityApikeysByNameDelete(context.Background(), name).Subaccount(subaccount).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecurityApikeysByNameDelete``: %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. | |
| name | string | Name of the ApiKey |
Other parameters are passed through a pointer to a apiSecurityApikeysByNameDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
subaccount | string | Email of the subaccount of which ApiKey should be deleted |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiKey SecurityApikeysByNameGet(ctx, name).Subaccount(subaccount).Execute()
Load ApiKey
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | Name of the ApiKey
subaccount := "subaccount_example" // string | Email of the subaccount of which ApiKey should be loaded (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecurityApikeysByNameGet(context.Background(), name).Subaccount(subaccount).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecurityApikeysByNameGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecurityApikeysByNameGet`: ApiKey
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecurityApikeysByNameGet`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| name | string | Name of the ApiKey |
Other parameters are passed through a pointer to a apiSecurityApikeysByNameGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
subaccount | string | Email of the subaccount of which ApiKey should be loaded |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiKey SecurityApikeysByNamePut(ctx, name).ApiKeyPayload(apiKeyPayload).Execute()
Update ApiKey
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | Name of the ApiKey
apiKeyPayload := *openapiclient.NewApiKeyPayload("Name_example", []openapiclient.AccessLevel{openapiclient.AccessLevel("None")}) // ApiKeyPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecurityApikeysByNamePut(context.Background(), name).ApiKeyPayload(apiKeyPayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecurityApikeysByNamePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecurityApikeysByNamePut`: ApiKey
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecurityApikeysByNamePut`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| name | string | Name of the ApiKey |
Other parameters are passed through a pointer to a apiSecurityApikeysByNamePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
apiKeyPayload | ApiKeyPayload | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ApiKey SecurityApikeysGet(ctx).Subaccount(subaccount).Execute()
List ApiKeys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
subaccount := "subaccount_example" // string | Email of the subaccount of which ApiKeys should be loaded (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecurityApikeysGet(context.Background()).Subaccount(subaccount).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecurityApikeysGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecurityApikeysGet`: []ApiKey
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecurityApikeysGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSecurityApikeysGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| subaccount | string | Email of the subaccount of which ApiKeys should be loaded |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NewApiKey SecurityApikeysPost(ctx).ApiKeyPayload(apiKeyPayload).Execute()
Add ApiKey
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
apiKeyPayload := *openapiclient.NewApiKeyPayload("Name_example", []openapiclient.AccessLevel{openapiclient.AccessLevel("None")}) // ApiKeyPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecurityApikeysPost(context.Background()).ApiKeyPayload(apiKeyPayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecurityApikeysPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecurityApikeysPost`: NewApiKey
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecurityApikeysPost`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSecurityApikeysPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| apiKeyPayload | ApiKeyPayload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SecuritySmtpByNameDelete(ctx, name).Subaccount(subaccount).Execute()
Delete SMTP Credential
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | Name of the SMTP Credential
subaccount := "subaccount_example" // string | Email of the subaccount of which credential should be deleted (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.SecurityAPI.SecuritySmtpByNameDelete(context.Background(), name).Subaccount(subaccount).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecuritySmtpByNameDelete``: %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. | |
| name | string | Name of the SMTP Credential |
Other parameters are passed through a pointer to a apiSecuritySmtpByNameDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
subaccount | string | Email of the subaccount of which credential should be deleted |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmtpCredentials SecuritySmtpByNameGet(ctx, name).Subaccount(subaccount).Execute()
Load SMTP Credential
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | Name of the SMTP Credential
subaccount := "subaccount_example" // string | Email of the subaccount of which credential should be loaded (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecuritySmtpByNameGet(context.Background(), name).Subaccount(subaccount).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecuritySmtpByNameGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecuritySmtpByNameGet`: SmtpCredentials
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecuritySmtpByNameGet`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| name | string | Name of the SMTP Credential |
Other parameters are passed through a pointer to a apiSecuritySmtpByNameGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
subaccount | string | Email of the subaccount of which credential should be loaded |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmtpCredentials SecuritySmtpByNamePut(ctx, name).SmtpCredentialsPayload(smtpCredentialsPayload).Execute()
Update SMTP Credential
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
name := "name_example" // string | Name of the SMTP Credential
smtpCredentialsPayload := *openapiclient.NewSmtpCredentialsPayload("Name_example") // SmtpCredentialsPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecuritySmtpByNamePut(context.Background(), name).SmtpCredentialsPayload(smtpCredentialsPayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecuritySmtpByNamePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecuritySmtpByNamePut`: SmtpCredentials
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecuritySmtpByNamePut`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| name | string | Name of the SMTP Credential |
Other parameters are passed through a pointer to a apiSecuritySmtpByNamePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
smtpCredentialsPayload | SmtpCredentialsPayload | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]SmtpCredentials SecuritySmtpGet(ctx).Subaccount(subaccount).Execute()
List SMTP Credentials
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
subaccount := "subaccount_example" // string | Email of the subaccount of which credentials should be listed (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecuritySmtpGet(context.Background()).Subaccount(subaccount).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecuritySmtpGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecuritySmtpGet`: []SmtpCredentials
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecuritySmtpGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSecuritySmtpGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| subaccount | string | Email of the subaccount of which credentials should be listed |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NewSmtpCredentials SecuritySmtpPost(ctx).SmtpCredentialsPayload(smtpCredentialsPayload).Execute()
Add SMTP Credential
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
smtpCredentialsPayload := *openapiclient.NewSmtpCredentialsPayload("Name_example") // SmtpCredentialsPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SecurityAPI.SecuritySmtpPost(context.Background()).SmtpCredentialsPayload(smtpCredentialsPayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecurityAPI.SecuritySmtpPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SecuritySmtpPost`: NewSmtpCredentials
fmt.Fprintf(os.Stdout, "Response from `SecurityAPI.SecuritySmtpPost`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSecuritySmtpPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| smtpCredentialsPayload | SmtpCredentialsPayload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]