Update an Email Subscription

PATCH /email_subscriptions/{email_subscription_id}

Update an existing Email Subscription resource

Headers

  • Authorization string Required

    Authorize your API calls with an Arta API token

Path parameters

  • email_subscription_id integer Required

    email_subscription_id parameter

application/json

Body

  • email_subscription object Required
    Hide email_subscription attribute Show email_subscription attribute object
    • recipients array[string] Required

      The list of recipients for this Email Subscription.

Responses

  • 200 application/json

    The updated 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
  • 404 application/json

    Not Found

    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
PATCH /email_subscriptions/{email_subscription_id}
curl \
 --request PATCH 'https://api.arta.io/email_subscriptions/{email_subscription_id}' \
 --header "Content-Type: application/json" \
 --header "Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y" \
 --data '{"email_subscription":{"recipients":["destination","origin"]}}'
Request examples
# Headers
Authorization: ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y

# Payload
{
  "email_subscription": {
    "recipients": [
      "destination",
      "origin"
    ]
  }
}
Response examples (200)
{
  "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 (404)
# Headers
content-type: application/json
x-arta-request-id: FkBjuxbwLLTx4RoAARkx

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