All URIs are relative to https://api.elasticemail.com/v4
| Method | HTTP request | Description |
|---|---|---|
| InboundrouteByIdDelete | Delete /inboundroute/{id} | Delete Route |
| InboundrouteByIdGet | Get /inboundroute/{id} | Get Route |
| InboundrouteByIdPut | Put /inboundroute/{id} | Update Route |
| InboundrouteGet | Get /inboundroute | Get Routes |
| InboundrouteOrderPut | Put /inboundroute/order | Update Sorting |
| InboundroutePost | Post /inboundroute | Create Route |
InboundrouteByIdDelete(ctx, id).Execute()
Delete Route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
id := "id_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.InboundRouteAPI.InboundrouteByIdDelete(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InboundRouteAPI.InboundrouteByIdDelete``: %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 |
Other parameters are passed through a pointer to a apiInboundrouteByIdDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InboundRoute InboundrouteByIdGet(ctx, id).Execute()
Get Route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
id := "123456" // string | ID number of your attachment
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InboundRouteAPI.InboundrouteByIdGet(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InboundRouteAPI.InboundrouteByIdGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InboundrouteByIdGet`: InboundRoute
fmt.Fprintf(os.Stdout, "Response from `InboundRouteAPI.InboundrouteByIdGet`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | ID number of your attachment |
Other parameters are passed through a pointer to a apiInboundrouteByIdGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InboundRoute InboundrouteByIdPut(ctx, id).InboundPayload(inboundPayload).Execute()
Update Route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
id := "id_example" // string |
inboundPayload := *openapiclient.NewInboundPayload("Filter_example", "Name_example", openapiclient.InboundRouteFilterType("EmailAddress"), openapiclient.InboundRouteActionType("ForwardToEmail")) // InboundPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InboundRouteAPI.InboundrouteByIdPut(context.Background(), id).InboundPayload(inboundPayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InboundRouteAPI.InboundrouteByIdPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InboundrouteByIdPut`: InboundRoute
fmt.Fprintf(os.Stdout, "Response from `InboundRouteAPI.InboundrouteByIdPut`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string |
Other parameters are passed through a pointer to a apiInboundrouteByIdPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
inboundPayload | InboundPayload | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]InboundRoute InboundrouteGet(ctx).Execute()
Get Routes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InboundRouteAPI.InboundrouteGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InboundRouteAPI.InboundrouteGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InboundrouteGet`: []InboundRoute
fmt.Fprintf(os.Stdout, "Response from `InboundRouteAPI.InboundrouteGet`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiInboundrouteGetRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]InboundRoute InboundrouteOrderPut(ctx).SortOrderItem(sortOrderItem).Execute()
Update Sorting
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
sortOrderItem := []openapiclient.SortOrderItem{*openapiclient.NewSortOrderItem("PublicInboundId_example", int32(123))} // []SortOrderItem | Change the ordering of inbound routes for when matching the inbound
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InboundRouteAPI.InboundrouteOrderPut(context.Background()).SortOrderItem(sortOrderItem).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InboundRouteAPI.InboundrouteOrderPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InboundrouteOrderPut`: []InboundRoute
fmt.Fprintf(os.Stdout, "Response from `InboundRouteAPI.InboundrouteOrderPut`: %v\n", resp)
}Other parameters are passed through a pointer to a apiInboundrouteOrderPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| sortOrderItem | []SortOrderItem | Change the ordering of inbound routes for when matching the inbound |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InboundRoute InboundroutePost(ctx).InboundPayload(inboundPayload).Execute()
Create Route
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/elasticemail/elasticemail-go"
)
func main() {
inboundPayload := *openapiclient.NewInboundPayload("Filter_example", "Name_example", openapiclient.InboundRouteFilterType("EmailAddress"), openapiclient.InboundRouteActionType("ForwardToEmail")) // InboundPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InboundRouteAPI.InboundroutePost(context.Background()).InboundPayload(inboundPayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InboundRouteAPI.InboundroutePost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InboundroutePost`: InboundRoute
fmt.Fprintf(os.Stdout, "Response from `InboundRouteAPI.InboundroutePost`: %v\n", resp)
}Other parameters are passed through a pointer to a apiInboundroutePostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| inboundPayload | InboundPayload |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]