Skip to main content
POST/form/

Create a pop-up

You can create customized pop-ups.

AttributesTypeRequiredDescription
contentstringyesA content of your pop-up (HTML can be used inside).
namestringyesA pop-up name.
descriptionstringnoA description of your pop-up.
authorintegernoA unique identifier for an agent which is given by User automatically.
categoryintegernoA unique identifier for a pop-up category automatically generated by User

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/form/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"name": "Spring sale banner",
"content": "<p>Spring sale: 20% off everything this week.</p>",
"description": "Shown on the home page."
}'

Response examples​

{
"key": "g7lvoickax9e",
"name": "Spring sale banner",
"description": "Shown on the home page.",
"content": "<p>Spring sale: 20% off everything this week.</p>",
"author": 1,
"category": null,
"folder": null
}

Response fields​

Fields returned in the 201 Created response body.

FieldTypeDescription
key
string
stringUnique key of the pop-up.
name
string
stringA pop-up name.
description
string
stringA description of your pop-up.
content
string
stringA content of your pop-up (HTML can be used inside).
author
integer
integerAgent group ID of the agent who created the pop-up.
category
integernullable
integernullableA unique identifier for a pop-up category automatically generated by User
folder
integernullable
integernullableID of the folder the pop-up is in, or null.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.