Publish Form

Publish a Nintex form that has been saved to a SharePoint list. You can use the end point and the list ID, or the list ID and the content type ID.

Note: This API supports forms designed using the Classic Forms and Responsive Forms designers. Forms designed using the New Responsive Forms designer are not supported.

Request

Method Request URI HTTP Version
POST

{baseURL}/api/v1/forms/{listId},{contentTypeId}/publish

HTTP/1.1

Request Parameters

Request Parameter Description
endpointURL Required. The endpoint URL for the REST API. For more information about the endpoint URL, see "Endpoint URL" above.

Request Headers

The following table describes required and optional request headers.

Request Header Description

Content-Type

Required. application/json

Authorization Required. SharePoint form digest value, used to authenticate the request.

Request Body

None.

Response

The response includes an HTTP status code, response headers, and a response body.

Response Codes

Code Description
200 The specified form was published.
400 An invalid operation has occurred.
401 An invalid request body was specified.
404 The specified list could not be found.
500 Internal error.

Response Headers

The following table describes response headers returned by a successful response. Other header values may also be returned, depending on SharePoint and ASP.NET configurations.

Request Header Description
Content-Type application/xml; charset=utf-8
Content-Type The length, in characters, of the response body.
Cache-Control private

Response Body

If the method was successful, a JSON-serialized object is returned that contains the following properties:

Property Data type Description
PublishFormResult string If the form was successfully published, the relative URL of the default view for the specified SharePoint list, relative to the SharePoint site; otherwise, an empty string ("")

Otherwise, depending on the error, the method returns additional information about the error. For example, if the value of the listId property in the request body is set to a name or identifier that cannot be found on the SharePoint site, the response returns an HTTP 400 status code and a Request Error web page in which the error indicates that a list with the specified name does not exist.

Example

The following example demonstrates how to use this operation to publish a Nintex form for a SharePoint list.

Request

The following POST request attempts to publish a Nintex form.

https://crestan.nintexo365.com/api/v1/forms/DB0ECEE6-117D-4519-986E-020A9BE6A7E3,0x010100D5C2F139516B419D801AC6C18942554D/publish

Response

An HTTP 200 response code is returned, indicating that the form was successfully published, and a response body containing the default view URL for the specified SharePoint list.

Response Body

The following response body contains the default view URL for the specified SharePoint list.

{

       "Publishform": "/Lists/Test List/AllItems.aspx"

}

Related information

Assigned use for Forms

Get Form

Import Form

Save Form

Delete Form