Update a form

put

/api/REST/1.0/assets/form/{id}

Updates the form specified by the id parameter. All properties should be included in PUT requests, as some properties will be considered blank if not included.

Request

Supported Media Types
Path Parameters
Body ()
The request body defines the details of the form to be updated.
Root Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : processingSteps
Type: array
A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, and FormStepWebTracking.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : processingSteps
Type: array
A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, and FormStepWebTracking.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

Update the name and processing type of the form with id#21:


PUT /api/REST/1.0/assets/form/21
Content-Type: application/json 
			

Request body:


{    
    "id":"21",
    "name":"A form is but a riddle",
    "processingType":"externalWebsite",
}
			

Response:


{
    "type":"Form",
    "currentStatus":"Draft",
    "id":"21",
    "initialId":"21",
    "createdAt":"1435585072",
    "createdBy":"19",
    "depth":"complete",
    "folderId":"7",
    "name":"A form is but a riddle",
    "permissions":"fullControl",
    "updatedAt":"1435585248",
    "updatedBy":"19",
    "elements":[
        {
            "type":"FormField",
            "id":"181",
            "name":"Favorite color.",
            "style":"{",
            "dataType":"text",
            "displayType":"text",
            "htmlName":"favCol",
            "validations":[

            ]
        }
    ],
    "emailAddressFormFieldId":"181",
    "processingSteps":[

    ],
    "processingType":"externalWebsite"
}
			
Back to Top