View .md

Mail Hosts endpoints (Admin API)

6 FeatherPanel Admin API endpoints from admin/mail-hosts.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Last synced from FeatherPanel 15b94e9 on .

On this page

Defined in backend/app/routes/admin/mail-hosts.php. Authentication used here: Admin. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

Endpoints

GET/api/admin/mail-hosts

Auth: AdminPermission: admin.webspaces.viewRoute name: admin-mail-hostsController: MailHostsController::indexroute source

List mail hosts

curl -X GET "$PANEL_URL/api/admin/mail-hosts" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

GET/api/admin/mail-hosts/{id}

Auth: AdminPermission: admin.webspaces.viewRoute name: admin-mail-hosts-showController: MailHostsController::showroute source

Show mail host

ParameterInTypeRequiredDescription
idpath-yes
curl -X GET "$PANEL_URL/api/admin/mail-hosts/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

POST/api/admin/mail-hosts/ensure-node/{webNodeId}

Auth: AdminPermission: admin.webspaces.editRoute name: admin-mail-hosts-ensure-nodeController: MailHostsController::ensureNoderoute source

Ensure node mail host exists

ParameterInTypeRequiredDescription
webNodeIdpath-yes
curl -X POST "$PANEL_URL/api/admin/mail-hosts/ensure-node/$WEB_NODE_ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

PUT/api/admin/mail-hosts

Auth: AdminPermission: admin.webspaces.createRoute name: admin-mail-hosts-createController: MailHostsController::createroute source

Create mail host

curl -X PUT "$PANEL_URL/api/admin/mail-hosts" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:mail_hosts:host:created

PATCH/api/admin/mail-hosts/{id}

Auth: AdminPermission: admin.webspaces.editRoute name: admin-mail-hosts-updateController: MailHostsController::updateroute source

Update mail host

ParameterInTypeRequiredDescription
idpath-yes
curl -X PATCH "$PANEL_URL/api/admin/mail-hosts/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:mail_hosts:host:updated

DELETE/api/admin/mail-hosts/{id}

Auth: AdminPermission: admin.webspaces.deleteRoute name: admin-mail-hosts-deleteController: MailHostsController::deleteroute source

Delete mail host

ParameterInTypeRequiredDescription
idpath-yes
curl -X DELETE "$PANEL_URL/api/admin/mail-hosts/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:mail_hosts:host:deleted