# Create a pop-up

You can create customized pop-ups.

POST /form/

Attributes Type Required Description
content string yes A content of your pop-up (HTML can be used inside).
name string yes A pop-up name.
description string no A description of your pop-up.
author integer no A unique identifier for an agent which is given by User.com automatically.
category integer no A unique identifier for a pop-up category automatically generated by User.com

# Request

  • CURL
  • JavaScript
  • PHP
  • Python
 curl -X POST -H "Authorization: Token <your_64_char_api_key>"
     -H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
      "name":"Test pop-up",
      "content":"<body><p>My new pop-up</p></body>",
      "description":"<body><p>My new pop-up</p></body>"
    }' "https://<your_app_subdomain>.user.com/api/public/form/"

# Response

{
 "key": "5afbc0dd-ce7a-4f9c-9ec2-37539ac4c001",
 "name": "Test pop-up",
 "description": "Pop-up created with API",
 "content": "<body><p>My new pop-up</p></body>",
 "author": 1,
 "category": null
}