Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Webform REST

Security covered Under active development 7,867 sites

Part of the Webform ecosystem · 216 projects

This module provides REST API endpoints for interacting with Drupal webforms. It allows you to submit new webform entries, retrieve webform elements and fields, and get or update existing webform submissions.

Overview

Retrieve and submit webforms via REST.

  1. Enable module
  2. Enable REST resource "Webform Submit"
  3. Enable REST resource "Webform Elements"
  4. Enable REST resource "Webform Submission"

There may be 2 Webform Submission resources. The one provided by this module has the path: /webform_rest/{webform_id}/submission/{sid}

Submit Webform

POST /webform_rest/submit

Example POST data:

{
  "webform_id": "my_webform",
  "checkboxes_field": [
    "Option 3",
    "Option 5"
   ],
   "integer_field": 3,
   "radio_field": "Mail",
   "email": "[email protected]"
}

Update Webform Submission

PATCH /webform_rest/{webform_id}/submission/{sid}?_format=json

Example PATCH data:

{
  "checkboxes_field": [
    "Option 3",
    "Option 5"
   ],
   "integer_field": 3,
   "radio_field": "Mail",
   "email": "[email protected]"
}

Retrieve Webform Elements

Returns all form elements including render array.

GET /webform_rest/{webform_id}/elements?_format=json

Retrieve Webform Fields

Returns form fields.

GET /webform_rest/{webform_id}/fields?_format=json

Retrieve Webform Submission

GET /webform_rest/{webform_id}/submission/{sid}?_format=json

Example response:

{
  "entity": {
    "serial": [
      {
        "value": 1
      }
    ],
    "sid": [
      {
        "value": 1
      }
    ],
    "uuid": [
      {
        "value": "f796859a-7d65-471a-b794-d6c4ea83ab49"
      }
    ]
  // More entity fields including token, completed, in_draft etc.
  },
  "data": {
    "checkboxes_field": [
      "Option 3",
      "Option 5"
     ],
     "integer_field": 3,
     "radio_field": "Mail",
     "email": "[email protected]"
  }
}
Drupal 10–11

Ask your assistant about Webform REST

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Feb 2023
Latest release
2 weeks ago
Releases (12 mo)
1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
4.2.1 Stable 10–11 Sep 23, 2026
4.2.0 Stable 10–11 Jan 7, 2025
4.1.0 Stable 8–10 Dec 17, 2023
4.0.3 Stable 8–10 May 15, 2023
4.0.2 Stable 8–10 Feb 16, 2023