API

MailboxForward

A forwarding address: list, create, update or delete one.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /mailbox/forwards create Created
GET /mailbox/forwards list OK
DELETE /mailbox/forwards/{source} remove OK
PUT /mailbox/forwards/{source} update Created

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

mailbox_forwards, err := client.MailboxForward(nil).List(nil, nil)
if err != nil {
    panic(err)
}
fmt.Println(mailbox_forwards)
created, err := client.MailboxForward(nil).Create(map[string]any{"destinations": []any{}, "source": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.MailboxForward(nil).Update(map[string]any{"source": "example", "destinations": []any{}}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
removed, err := client.MailboxForward(nil).Remove(map[string]any{"source": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local mailbox_forwards, err = client:MailboxForward():list()
local created, err = client:MailboxForward():create({ destinations = {}, source = "example" })
local updated, err = client:MailboxForward():update({ source = "example", destinations = {} })
local removed, err = client:MailboxForward():remove({ source = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$mailbox_forwards = $client->MailboxForward()->list();
$created = $client->MailboxForward()->create(["destinations" => [], "source" => "example"]);
$updated = $client->MailboxForward()->update(["source" => "example", "destinations" => []]);
$client->MailboxForward()->remove(["source" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

mailbox_forwards = client.MailboxForward().list()
created = client.MailboxForward().create({ "destinations": [], "source": "example" })
updated = client.MailboxForward().update({"source": "example", "destinations": []})
client.MailboxForward().remove({"source": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

mailbox_forwards = client.MailboxForward.list()
created = client.MailboxForward.create({ "destinations" => [], "source" => "example" })
updated = client.MailboxForward.update({ "source" => "example", "destinations" => [] })
client.MailboxForward.remove({ "source" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const mailbox_forwards = await client.MailboxForward().list()
const created = await client.MailboxForward().create({ destinations: [], source: "example" })
const updated = await client.MailboxForward().update({ source: "example", destinations: [] })
await client.MailboxForward().remove({ source: "example" })

Fields

Field Type Required Description
destinations array Yes Destinations
message string Yes Message
source string Yes Source

create

POST /mailbox/forwards

Operation ID: postMailboxForwards.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
destinations array of string Yes
source string Yes

Responses

201: Created

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
404: Not Found

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
409: Conflict

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
422: Unprocessable Entity
429: Too Many Requests

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

list

GET /mailbox/forwards

Operation ID: getMailboxForwards.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
page query integer No
per_page query integer No
search query string No
sharing_id query string No
sort_by query enum: source, -source No

Responses

200: OK

application/json

Property Type Required Description
[].destinations string Yes
[].source string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

remove

DELETE /mailbox/forwards/{source}

Operation ID: deleteMailboxForwardsSource.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
source path string Yes

Responses

200: OK

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
404: Not Found

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
422: Unprocessable Entity

update

PUT /mailbox/forwards/{source}

Operation ID: putMailboxForwardsSource.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
source path string Yes

Request body

application/json

Property Type Required Description
destinations array of string Yes

Responses

201: Created

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
404: Not Found

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
409: Conflict

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
422: Unprocessable Entity
429: Too Many Requests

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes