{"_id":"5d3f0399b37ad70019f0d5dd","project":"543469460ef9c00800164f0e","version":{"_id":"54346a2a0ef9c00800164f28","forked_from":"543469460ef9c00800164f11","project":"543469460ef9c00800164f0e","__v":8,"createdAt":"2014-10-07T22:33:14.982Z","releaseDate":"2014-10-07T22:33:14.982Z","categories":["54346a2b0ef9c00800164f29","543473445b10711400c6c21a","543473500ef9c00800164fde","54347c625b10711400c6c301","5434918d0ef9c008001651ff","5434b72c008ec22200d86ae7","5435990c495d5d0800f3a510","5b6af3dffc81e4000383db74"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"category":{"_id":"5434918d0ef9c008001651ff","pages":["5435626c5ff8a51a006e4110","543553953513400800a14736","543555cc3513400800a14752","54355bcc35740020002a1b3b","5434928b0ef9c0080016520e","54347c8e5b10711400c6c30a","54346f750ef9c00800164fa0","543470f45b10711400c6c1e5","543477b70ef9c0080016505b","543478fb5b10711400c6c29f","54347d105b10711400c6c318","54347df00ef9c008001650d2","54347edf5b10711400c6c336","54357a175e1b2020004380dc","543483520ef9c0080016512a","543484820ef9c0080016513a","5434887e5b10711400c6c3cd","543488c05b10711400c6c3d2","54348ac85b10711400c6c401","5434959c0ef9c0080016522d","543497030ef9c00800165244","543498ae5b10711400c6c4f6","54349b7f0ef9c00800165293","54349c070ef9c00800165298","54349dbf0ef9c008001652ad","5434ab8e0ef9c00800165384","5434abbb0ef9c0080016538f","5434ac495b10711400c6c626","5434ada40ef9c008001653a8","5434af0a0ef9c008001653bc","5434af5f0ef9c008001653c8","5434b00a5b10711400c6c66b","5434b0d15b10711400c6c68c","5434b1ee0ef9c00800165406","5434b26d0ef9c0080016541c","5434b3560ef9c00800165427","5434b3b40ef9c0080016545a","5434b49f008ec22200d86ab9","5434b51f008ec22200d86aca","5434b5a80ef9c0080016546f","5434b5f4008ec22200d86ad8","5434b676008ec22200d86add","5434b6e6008ec22200d86ae5"],"version":"54346a2a0ef9c00800164f28","__v":30,"project":"543469460ef9c00800164f0e","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-08T01:21:17.804Z","from_sync":false,"order":1,"slug":"rest-api","title":"REST API"},"user":"5d038ca81e85e00027d975a8","__v":13,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-07-29T14:32:57.359Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"5d24a85d679189012c4d5dff","results":{"codes":[{"name":null,"code":"{\n  \"id\": 2,\n  \"name\": \"test form\",\n  \"deadline\": null,\n  \"completedUserCount\": 0,\n  \"description\": null,\n  \"formUrl\": \"https://formstack.com/form-url\",\n  \"formId\": 1,\n  \"usersPerformance\": []\n}","language":"json","status":200},{"code":"","language":"text","status":404}]},"examples":{"codes":[{"code":"","language":"text"}]},"method":"post","auth":"required","params":[{"_id":"5d3efbb94df70a00124ff0ec","ref":"","in":"path","required":true,"desc":"","default":"","type":"int","name":"id"},{"_id":"5d3f03630415da01211f37a4","ref":"","in":"body","required":true,"desc":"","default":"","type":"string","name":"name"},{"_id":"5d3f044a2d175000205936d8","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"formId"},{"_id":"5d3f044a2d175000205936d7","ref":"","in":"body","required":false,"desc":"see deadline definition: https://developers.formstack.com/v2.0/docs/portals#section-portalform","default":"","type":"mixed","name":"deadline"},{"_id":"5d3f044a2d175000205936d6","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"description"},{"_id":"5d3f044a2d175000205936d5","ref":"","in":"body","required":false,"desc":"Set this to `true` to send email notifications to participants","default":"","type":"boolean","name":"notifyUsers"}],"url":"/v2/portal/:id/form"},"isReference":false,"order":67,"body":"See model definition: https://developers.formstack.com/v2.0/docs/portals#section-portalform\n\n#### Control deadline reminder\npass in `earlyReminderHours` or `earlyReminderDays`  under deadline model. (depends on your chosen deadline type - see definition at https://developers.formstack.com/v2.0/docs/portals#section-deadlines)\n\nFor example, for [PortalFormDeadlineWeekly](https://developers.formstack.com/v2.0/docs/portals#section-portalformdeadlineweekly) , pass in the following object to set up weekly deadline every Friday at 8pm, with a reminder 2 hours before deadline:\n```json\n\"deadline\": {\n  \"frequency\": \"weekly\",\n  \"dueDay\": \"Fri\",\n  \"dueTime\": \"20:00:00\",\n  \"earlyReminderHours\": 2\n} \n```\nTo disable reminders, pass in `earlyReminderHours` and `earlyReminderDays` as `null`\n\nOn success - returns newly added portal form representation.","excerpt":"Adds form to specified portal","slug":"portal-add-form","type":"endpoint","title":"/portal/:id/form"}

post/portal/:id/form

Adds form to specified portal

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
integer

Body Params

name:
required
string
formId:
required
integer
deadline:
mixed
see deadline definition: https://developers.formstack.com/v2.0/docs/portals#section-portalform
description:
string
notifyUsers:
boolean
Set this to `true` to send email notifications to participants

Result Format


Documentation

See model definition: https://developers.formstack.com/v2.0/docs/portals#section-portalform #### Control deadline reminder pass in `earlyReminderHours` or `earlyReminderDays` under deadline model. (depends on your chosen deadline type - see definition at https://developers.formstack.com/v2.0/docs/portals#section-deadlines) For example, for [PortalFormDeadlineWeekly](https://developers.formstack.com/v2.0/docs/portals#section-portalformdeadlineweekly) , pass in the following object to set up weekly deadline every Friday at 8pm, with a reminder 2 hours before deadline: ```json "deadline": { "frequency": "weekly", "dueDay": "Fri", "dueTime": "20:00:00", "earlyReminderHours": 2 } ``` To disable reminders, pass in `earlyReminderHours` and `earlyReminderDays` as `null` On success - returns newly added portal form representation.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}