Publish form
Description
The method allows you to forcibly publish a form at the time of the request execution (run_now). While form settings in the interface allow you to set a publication date, this method publishes the form immediately.
URL
Method: POST
https://example.com/api/v1.1/forms/activate
Request Parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| token | string | "a1b2c3d4e5f67890abcdef1234567890" | Yes | API token |
| id | int | 1 | Yes, if shortname is not specified | Form ID |
| shortname | string | "form_6Ven2v7O" | Yes, if id is not specified | Form short name |
Request Example
- JSON
- XML
{
"token": "a1b2c3d4e5f67890abcdef1234567890",
"id": 1
}
<xml>
<token>a1b2c3d4e5f67890abcdef1234567890</token>
<id>1</id>
</xml>
Response Example
- JSON
- XML
{
"data": {
"url": "https://forms.example.com/form?token=a1b2c3d4e5f67890abcdef1234567890"
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<url>https://forms.example.com/form?token=a1b2c3d4e5f67890abcdef1234567890</url>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| error | int | Error code |
| error_text | string | Error text |
| data | object | Response data object |
data Object
| Parameter | Type | Description |
|---|---|---|
| url | string | Link to the published form |