Easymailing
Subscription forms

Create a popup form

POST /audiences/{audienceUuid}/suscription_forms/popup

POST/audiences/{audienceUuid}/suscription_forms/popup

Creates a sign-up form that opens as a modal over a web page, in the audience, with optional rules for when and where it appears. It is created unpublished and with the default design of its type, if there is one.

When to use: To capture sign-ups with a modal that appears after some seconds, on scroll or when the visitor is about to leave. It does nothing on the website until you publish it with publish_form.

When not to use: For a form that sits inside the page use create_embedded_form. It creates a classic form, which the Customer App can only read until it is converted. For a form that can be edited, published and measured with the subscription_form operations, use create_subscription_form.

Permissions: Requires the manager role or higher, or the marketing.forms_landings.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

audienceUuid*string

UUID of the audience the form belongs to. Get it with list_audiences.

Request Body

The new SuscriptionForm resource

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/suscription_forms/popup" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "behavior": {      "triggers": {},      "schedule": {},      "frequency": {},      "visibility": {}    },    "title": "string",    "locale": "string",    "double_opt_in": true,    "enable_welcome_email": true,    "groups": [      {}    ],    "channels": [      "string"    ],    "sms_double_opt_in": true  }'
{  "id": 0,  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "hash": "string",  "url": "http://example.com",  "domain": "string",  "title": "string",  "type": "popup",  "status": "form.status.draft",  "generation": "current",  "converted_at": "2019-08-24T14:15:22Z",  "double_opt_in": true,  "channels": [    "email"  ],  "sms_double_opt_in": true,  "enable_welcome_email": true,  "active": true,  "paused": true,  "audience": "string",  "groups": [    "/entity/1"  ],  "behavior": {    "triggers": {},    "schedule": {},    "frequency": {},    "visibility": {}  },  "stats": {    "impressions": 0,    "conversions": 0,    "conversion_rate": 0.1,    "last_subscription_at": "2019-08-24T14:15:22Z"  },  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}