# Kiteworks API — webForms Operations

**2 endpoints** | [Browse interactive reference](https://developer.kiteworks.com/api-reference/webForms.html) | [Download spec slice](https://developer.kiteworks.com/assets/specs/webForms.json)

> **Authentication required.** All requests must include a Bearer access token in the
> `Authorization` header. See [Authentication](https://developer.kiteworks.com/authentication.md) for how to
> obtain a token using OAuth 2.0 Authorization Code (PKCE) or JWT Bearer flow.

---

## GET /rest/webForms

**Summary:** List web forms

Returns a list of web forms available to the authenticated user's profile, including each form's name, URL, authentication requirement, and enabled state.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `name` | query | no | Web form name |
| `name:contains` | query | no | Web form name. Search for results that contain the specified characters in this parameter. |
| `orderBy` | query | no | Sorting options |
| `with` | query | no | With parameters |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | List of web forms retrieved successfully. |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (WebFormList):**

```json
{
  "data": [
    {
      "id": "wf-001",
      "name": "Contact Form",
      "description": "General contact form",
      "url": "https://example.com/forms/contact",
      "authRequired": false,
      "enabled": true,
      "embedded": false,
      "standalone": true,
      "lastModified": "2024-03-01T10:00:00+00:00"
    }
  ]
}
```

**Code Samples:**

**cURL:**

```shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/webForms" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

url = "https://{instance}.kiteworks.com/rest/webForms"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
```

---

## GET /rest/webForms/{id}

**Summary:** Get a web form

Returns the details of the specified web form, including its name, URL, authentication requirement, enabled state, and associated fields. Accessible by both authenticated and unauthenticated users, subject to the form's access rules.

**Parameters:**

| Name | In | Required | Description |
|------|----|----------|-------------|
| `id` | path | yes | ID of the web form to be retrieved |
| `with` | query | no | With parameters |
| `mode` | query | no | Determines the detail level of the response body. |

**Responses:**

| Code | Description |
|------|-------------|
| 200 | Web form details retrieved successfully. |
| 403 | Forbidden  <i>Possible error codes: </i>ERR_ACCESS_USER |
| 490 | Request blocked by WAF |

**Response Examples:**

**200 (WebFormInfo):**

```json
{
  "id": "wf-001",
  "name": "Contact Form",
  "description": "General contact form",
  "url": "https://example.com/forms/contact",
  "authRequired": false,
  "enabled": true,
  "embedded": false,
  "standalone": true,
  "lastModified": "2024-03-01T10:00:00+00:00"
}
```

**403 (ERR_ACCESS_USER):**

```json
{
  "errors": {
    "code": "ERR_ACCESS_USER",
    "message": "Insufficient access permissions"
  }
}
```

**Code Samples:**

**cURL:**

```shell
curl -X GET \
  "https://{instance}.kiteworks.com/rest/webForms/:id" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Python:**

```python
import requests

id = "VALUE"  # ID of the web form to be retrieved

url = f"https://{{instance}}.kiteworks.com/rest/webForms/{id}"
headers = {
    "Authorization": "Bearer YOUR_TOKEN",
}
response = requests.get(url, headers=headers)
print(response.json())
```

---
