Publish a form
Needs: Forms, Read-write
Publishes a form live (public) or internally, or turns its link off, and returns the link. A live form cannot contain staff or client select fields. Incident and prospect forms must be ready. Turning a form off disables the old link, and publishing again creates a new link.
Note: With
off,publishedisoffand anoteexplains that the old link no longer works. Theurlshown is an example.
curl -X POST "https://app.imploy.com.au/api/integrations/v1/forms/123/publish" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"mode": "public",
"collect_submitter_id": "optional"
}'
import requests
import json
url = "https://app.imploy.com.au/api/integrations/v1/forms/123/publish"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"mode": "public",
"collect_submitter_id": "optional"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.imploy.com.au/api/integrations/v1/forms/123/publish", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"mode": "public",
"collect_submitter_id": "optional"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"mode": "public",
"collect_submitter_id": "optional"
}`)
req, err := http.NewRequest("POST", "https://app.imploy.com.au/api/integrations/v1/forms/123/publish", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.imploy.com.au/api/integrations/v1/forms/123/publish')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"mode": "public",
"collect_submitter_id": "optional"
}'
response = http.request(request)
puts response.body
{
"form_id": 14,
"published": "public",
"url": "https://app.imploy.com.au/..."
}
{
"message": "Invalid or expired access token."
}
{
"message": "Access token does not permit this action."
}
{
"message": "Too many requests."
}
/forms/{id}/publishTarget server for requests. Edit to use your own host.
An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
imp_at_. Send it as Authorization: Bearer imp_at_XXXX.The form id.
The media type of the request body
public (anyone with the link), internal (an Imploy login is required and the submitter is captured) or off.
Public forms: ask for a name and email. true, false or the text optional.
Send submitters here after submitting. null to stop.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
Path Parameters
The form id.
Body
public (anyone with the link), internal (an Imploy login is required and the submitter is captured) or off.
Public forms: ask for a name and email. true, false or the text optional.
Send submitters here after submitting. null to stop.
Responses
OK