Skip to main content

Get a form content type

Log in to add to favourites
This endpoint retrieves the content type definition of a form within a specified project for a given language.
GET/api/forms/projects/{projectId}/contenttypes/{contentTypeId}/languages/{language}

Parameters

NameParameter typeTypeFormatDescription
projectId(required)pathstring-The project identifier found in the project overview screen of the management console.
contentTypeId(required)pathstring-The content type identifier.
language(required)pathstringlanguageThe language property specifies the language variation of the form, or use `default` for the default language.

Responses

HTTP status codeReasonModel
200SuccessContent type
404Project not foundError
404Content type not foundError
422Language is invalidError
500Internal server errorError

Examples

Example content type for an enquiry form returned from the Forms API

JSON
{
    "id": "enquiryForm",
    "projectId": "website",
    "name": "Enquiry Form",
    "description": null,
    "entryTitleField": "reference",
    "fields": [
        {
            "id": "name",
            "name": "Name",
            "dataType": "string",
            "dataFormat": null,
            "description": null,
            "default": null,
            "validations": {},
            "editor": {
                "id": null,
                "instructions": null,
                "label": "Name",
                "properties": {
                    "placeholderText": "Name placeholder"
                }
            },
            "groupId": "main"
        },
        {
            "id": "mobileNumber",
            "name": "Mobile Number",
            "dataType": "string",
            "dataFormat": "phone",
            "description": null,
            "default": null,
            "validations": {},
            "editor": {
                "id": null,
                "instructions": null,
                "label": "Mobile Number",
                "properties": {}
            },
            "groupId": "main"
        },
        {
            "id": "emailAddress",
            "name": "Email address",
            "dataType": "string",
            "dataFormat": "email",
            "description": null,
            "default": null,
            "validations": {},
            "editor": {
                "id": null,
                "instructions": null,
                "label": "Email address",
                "properties": {}
            },
            "groupId": "main"
        },
        {
            "id": "typeOfEnquiry",
            "name": "Type of enquiry",
            "dataType": "string",
            "dataFormat": null,
            "description": null,
            "default": null,
            "validations": {
                "allowedValues": {
                    "labeledValues": [
                        {
                            "value": "general-enquiry",
                            "label": "General enquiry"
                        },
                        {
                            "value": "complaint",
                            "label": "Complaint"
                        },
                        {
                            "value": "request-for-information",
                            "label": "Request for information"
                        }
                    ],
                    "message": null
                }
            },
            "editor": {
                "id": "list-dropdown",
                "instructions": null,
                "label": "Type of enquiry",
                "properties": {}
            },
            "groupId": "enquiryDetails"
        },
        {
            "id": "enquiry",
            "name": "Enquiry",
            "dataType": "string",
            "dataFormat": null,
            "description": null,
            "default": null,
            "validations": {},
            "editor": {
                "id": "multiline",
                "instructions": null,
                "label": "Enquiry",
                "properties": {
                    "rows": 4
                }
            },
            "groupId": "enquiryDetails"
        },
        {
            "id": "reference",
            "name": "Reference",
            "dataType": "string",
            "dataFormat": "reference",
            "description": null,
            "default": null,
            "validations": {},
            "editor": {
                "id": null,
                "instructions": null,
                "label": null,
                "properties": {
                    "prefix": "EF"
                }
            },
            "groupId": "main"
        }
    ],
    "defaultLanguage": "en-GB",
    "supportedLanguages": [
        "en-GB"
    ],
    "workflowId": "contensisFormBasic",
    "dataFormat": "form",
    "groups": [
        {
            "id": "main",
            "name": "Your details",
            "description": null
        },
        {
            "id": "enquiryDetails",
            "name": "Enquiry details",
            "description": null
        }
    ],
    "includeInDelivery": false,
    "enabled": true,
    "properties": {
        "autoCloseForm": true,
        "autoCloseDateTime": "2045-11-02T00:00:00",
        "autoSaveProgress": true,
        "captcha": {
            "enabled": true
        },
        "localizations": {
            "errorSummaryTitle": "There has been an error submitting the form, please try again.",
            "closedReasonMessage": "We are no longer accepting enquiries"
        }
    },
    "language": "en-GB",
    "version": {
        "versionNo": "17.0"
    }
}

Remarks

Certain properties have been removed from the form content type definition in the delivery API to protect sensitive information. The removed properties include:

  • Properties:

    • properties.autoResponderRules
    • properties.confirmationRules
    • properties.notificationRules
    • properties.requirePermissionToPost
  • Version Metadata:

    • version.createdBy
    • version.created
    • version.modifiedBy
    • version.modified
    • version.publishedBy
    • version.published
    • version.deletedBy
    • version.deleted
    • version.archivedBy
    • version.archived
    • version.permanentDeletion

These properties are excluded as they could contain internal information, such as email addresses and business rules, that could reveal internal processes and potentially compromise security.

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request