Create Webform
POST {{baseUrl}}/webform
- This API will create Webform.
Payload
Key | Value | Example | Required |
---|---|---|---|
owner_id | String | 6284813de5b66bb4f729278b | true |
name | String | Test | true |
is_cname | Boolean | true | false |
host_name | String | test.com | false |
tags | Object | { check: c1, env: test } | false |
formownerid | String | 633ec763162db20d7b789cb6 | true |
formownertype | String | squad | true |
services | Array of Object | [{ service_id: 631ed43534192488d5871581, alias: test }] | true |
input_field | Array of Object (max 10 labels and 10 options each) | [{ label: severity, options: [ p1, p2, p3]}, { label: country, options: [ IND, US, Uk]}], | false |
header | String | Test support | true |
title | String | Test | true |
description | String | Create incidents | false |
footer_text | String | visit our webpage | false |
footer_link | String | https://squadcast.com | false |
email_on | Array 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
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | null | ||
Content-Type | string |
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"]}}}