Project Model

Create a Project

This method allows for the creation of new form projects by providing a name and a list of associated form components. If the id field is provided in the post route then a copy of that resource will be created if it exists. Note that a name must still be specified.

POST /projects HTTP/1.1
Host: example.com
Accept: application/json
Authorization: Bearer "eyCJhYCQ...

Request Body:

{
    "name": "test_project",
    "components": [
        {
            "key": "field0ShortText",
            "type": "Short Text",
            "label": "Question 1",
            "property": {
                "required": true
            }
        },
        {
            "key": "field1Paragraph",
            "type": "Paragraph",
            "label": "Question 2",
            "property": {
                "required": true
            }
        },
    ],
    "metadata": {"key", "value"},
}

Response:

{
    "id": 1,
    "object": "project",
    "name": "test_project",
    "active": true,
    "created": "2018-09-15T17:45:19.829947+00:00",
    "components": [
        {
            "key": "field0ShortText",
            "type": "Short Text",
            "label": "Question 1",
            "property": {
                "required": true
            }
        },
        {
            "key": "field1Paragraph",
            "type": "Paragraph",
            "label": "Question 2",
            "property": {
                "required": true
            }
        },
    ],
    "metadata": {"key", "value"},
    "links": {
        "self": "/projects/1",
        "shared": "/projects/shared/aZBS4Wa9Q0ox"
    }
}

Query Parameters

Request Attribute Type Description Required
name String The name given for the polling project. Yes
components List[Components] List of survey components provided via json in the request body. No