Create an Email Subscription

POST /email_subscriptions

Create an email subscription to configure email notifications for your organization.

Headers

  • Authorization string Required

    Authorize your API calls with an Arta API token

application/json

Body

  • email_subscription object Required
    Hide email_subscription attributes Show email_subscription attributes object
    • email_address string

      The email_address for this Email Subscription.

    • email_notification_ids array[string]

      The list of Email Notification IDs for this Email Subscription.

    • name string

      The name for this Email Subscription. This name will be used in conjunction with the email address field to build the recipient when delivering email notifications.

Responses

  • 201 application/json

    The created email subscription

    Hide headers attributes Show headers attributes
    • content-type string
    • x-arta-request-id string

      A unique identifier for the Arta API call

    Hide response attributes Show response attributes object
    • created_at string
    • email_address string
    • email_notification_ids array[string]
    • id integer(int64)
    • name string
    • updated_at string
  • 400 application/json

    Bad Request

    Hide headers attributes Show headers attributes
    • content-type string
    • x-arta-request-id string

      A unique identifier for the Arta API call

    Hide response attribute Show response attribute object
    • errors object
      Hide errors attribute Show errors attribute object
      • detail string
POST /email_subscriptions
curl \
 --request POST 'https://api.arta.io/email_subscriptions' \
 --header "Content-Type: application/json" \
 --header "Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y" \
 --data '{"email_subscription":{"email_address":"hello@shiparta.com","email_notification_ids":["booking","scheduling"],"name":"Arta"}}'
Request examples
# Headers
Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y

# Payload
{
  "email_subscription": {
    "email_address": "hello@shiparta.com",
    "email_notification_ids": [
      "booking",
      "scheduling"
    ],
    "name": "Arta"
  }
}
Response examples (201)
{
  "id": 6,
  "name": "Arta Notifications",
  "created_at": "2020-10-14T15:25:48.298369",
  "updated_at": "2020-10-14T15:25:48.298369",
  "email_address": "notifications@shiparta.com",
  "email_notification_ids": [
    "booking",
    "complete",
    "scheduling"
  ]
}
Response examples (400)
# Headers
content-type: application/json
x-arta-request-id: FkBjuxbwLLTx4RoAARkx

# Payload
{
  "errors": {
    "detail": "string"
  }
}