Create Webform

POST {{baseUrl}}/webform

  • This API will create Webform.

Payload

KeyValueExampleRequired
owner_idString6284813de5b66bb4f729278btrue
nameStringTesttrue
is_cnameBooleantruefalse
host_nameStringtest.comfalse
tagsObject{
check: c1, env:test
}
false
formowneridString633ec763162db20d7b789cb6true
formownertypeStringsquadtrue
servicesArray of Object[{ service_id: 631ed43534192488d5871581, alias: test
}]
true
input_fieldArray of Object (max 10 labels and 10 options each)[{ label: severity, options: [ p1, p2, p3 ]},
{
label: country,
options: [
IND,
US,
Uk]}],
false
headerStringTest supporttrue
titleStringTesttrue
descriptionStringCreate incidentsfalse
footer_textStringvisit our webpagefalse
footer_linkStringhttps://squadcast.comfalse
email_onArray of String[ triggered,acknowledged,resolved
]
false

Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Request Body

{"owner_id"=>"63065e992a5f9a1d5792b6c5", "name"=>"Test", "is_cname"=>true, "host_name"=>"test.com", "tags"=>{"check"=>"c1", "env"=>"test"}, "form_owner_id"=>"633ec763162db20d7b789cb6", "form_owner_type"=>"squad", "services"=>[{"service_id"=>"631ed43534192488d5871581", "alias"=>"test"}], "input_field"=>[{"label"=>"severity", "options"=>["p1", "p2", "p3"]}, {"label"=>"country", "options"=>["IND", "US", "UK"]}], "header"=>"Test support", "title"=>"Test", "description"=>"Create incidents", "footer_text"=>"visit our webpage", "footer_link"=>"https://squadcast.com", "email_on"=>["triggered", "acknowledged", "resolved"]}

HEADERS

KeyDatatypeRequiredDescription
Authorizationnull
Content-Typestring

RESPONSES

status: Created

{"data":{"webform":{"created_at":"2022-12-05T16:40:51.183000947Z","updated_at":"2022-12-05T16:40:51.183000947Z","deleted_at":null,"id":33,"owner_type":"","owner_id":"63065e992a5f9a1d5792b6c5","org_id":"5e1c2309342445001180f9c3","name":"Test","is_cname":true,"public_url":"webforms.squadcast.tech/staging-test/Test","host_name":"test.com","form_owner_type":"squad","form_owner_id":"633ec763162db20d7b789cb6","form_owner_name":"Test squad","tags":{"check":"c1","env":"test"},"is_all_services":false,"services":[{"id":204,"service_id":"631ed43534192488d5871581","name":"Test","alias":"test","webform_id":33,"created_at":"2022-12-05T16:40:51.185750117Z"}],"input_field":[{"label":"severity","options":["p1","p2","p3"]},{"label":"country","options":["IND","US","Uk"]}],"header":"Test support","title":"Test","description":"create incidents","footer_text":"visit our webpage","footer_link":"squadcast.com","email_on":["triggered","acknowledged","resolved"]}}}