Create an Email Rule

POST /email_rules

response

Headers

  • Authorization string Required

    Authorize your API calls with an Arta API token

application/json

Body

  • Hide email_rule attributes Show email_rule attributes
    • email_notification_id string Required

      The ID belonging to the Email Notification for this Email Rule.

    • recipients array[string] Required

      The list of recipients for this Email Rule.

Responses

POST /email_rules
curl \
 -X POST https://api.arta.io/email_rules \
 -H "Content-Type: application/json" \
 -H "Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y" \
 -d '{"email_rule":{"email_notification_id":"booking","recipients":["destination","origin"]}}'
Request example
# Headers
Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y

# Payload
{
  "email_rule": {
    "email_notification_id": "booking",
    "recipients": [
      "destination",
      "origin"
    ]
  }
}
Response examples (201)
# Headers
content-type: application/json
x-arta-request-id: FkBjuxbwLLTx4RoAARkx

# Payload
{
  "email_notification_id": "complete",
  "id": 7,
  "created_at": "2020-10-14T15:29:06.263371",
  "recipients": [
    "destination"
  ],
  "updated_at": "2020-10-14T15:29:06.263371"
}
Response examples (400)
{
  "errors": {
    "detail": "string"
  }
}