Galon Cloud
Galon API v1

/receiving-domains/{domain_id}/rules

Base URL https://api.galon.ai/v1 · export GALON_API_BASE="https://api.galon.ai/v1"

GET /receiving-domains/{domain_id}/rules

List a domain's forwarding rules

Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).

API key (Bearer), on the public API endpoint.

Parameters

NameInTypeDescription
domain_idpathstring · requiredinbound domain identifier

Responses

StatusDescriptionBody
200Rulesobject
404Not foundError
401Key missing or invalidError

Examples

curl

curl -X GET "$GALON_API_BASE/receiving-domains/<domain_id>/rules" \
  -H "Authorization: Bearer $GALON_API_KEY"

Node.js (SDK)

import { Galon } from "galon";

const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.receivingDomains.rules("<id>");

Python (SDK)

from galon import Galon

galon = Galon()  # reads GALON_API_KEY
result = galon.receiving_domains.rules("<id>")

POST /receiving-domains/{domain_id}/rules

Create a forwarding rule

Key carrying mail:send AND job:read. Served only when inbound is open to the account (404 not_found otherwise).

API key (Bearer), on the public API endpoint.

Parameters

NameInTypeDescription
domain_idpathstring · requiredinbound domain identifier

Request body

application/json

FieldTypeDescription
addressstring · required
forward_tostring · required
fromstring

Responses

StatusDescriptionBody
201Rule createdobject
404Not foundError
422Invalid bodyError
401Key missing or invalidError

Examples

curl

curl -X POST "$GALON_API_BASE/receiving-domains/<domain_id>/rules" \
  -H "Authorization: Bearer $GALON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address": "string", "forward_to": "string"}'

Node.js (SDK)

import { Galon } from "galon";

const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.receivingDomains.createRule("<id>", {"address": "string", "forward_to": "string"});

Python (SDK)

from galon import Galon

galon = Galon()  # reads GALON_API_KEY
result = galon.receiving_domains.create_rule("<id>", {"address": "string", "forward_to": "string"})