Subscriptions

Retrieve subscription form schema

get

Returns the current subscription form schema configuration. This schema defines the available fields, their types, validation rules, and whether they are required for subscription creation.

The schema is dynamically configured and can be updated through the administration interface without requiring code deployment.

Responses
200

Successfully retrieved the subscription form schema

application/json
get
/subscriptions/
GET /subscriptions/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
{
  "attributes": {
    "name": {
      "label": "Full Name",
      "data_type": "text",
      "is_required": true,
      "multi": false,
      "is_localizable": false
    },
    "phone": {
      "label": "Phone Number",
      "data_type": "text",
      "is_required": false,
      "multi": false,
      "is_localizable": false
    },
    "preferences": {
      "label": "Preferences",
      "data_type": "dropdown",
      "is_required": false,
      "multi": false,
      "choices": [
        {
          "value": "newsletter",
          "label": "Newsletter"
        },
        {
          "value": "promotions",
          "label": "Promotions"
        }
      ]
    }
  }
}

Create a new subscription

post

Creates a new email subscription with the provided email address and optional additional attributes defined by the subscription form schema.

The email address must be unique. If a subscription with the same email already exists, the request will be rejected.

All required attributes as defined in the subscription form schema must be provided. The system validates that all mandatory fields are present before creating the subscription.

Body

Request payload for creating a new subscription

emailstring · emailRequired

The email address for the subscription. Must be unique across all subscriptions.

Example: [email protected]
Responses
post
/subscriptions/
POST /subscriptions/ HTTP/1.1
Host: sandbox.akinon.com
Content-Type: application/json
Accept: */*
Content-Length: 107

{
  "email": "[email protected]",
  "attributes": {
    "name": "John Doe",
    "phone": 1234567890,
    "preferences": "newsletter"
  }
}
{}

Last updated

Was this helpful?