> For the complete documentation index, see [llms.txt](https://documentation.siteglide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.siteglide.com/developer-tools/site-api/forms.md).

# Forms

## GET /forms/{form}/cases

> Retrieve an overview list of all form cases from your website

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/forms/{form}/cases":{"get":{"tags":["Cases"],"summary":"Retrieve an overview list of all form cases from your website","parameters":[{"name":"form","in":"path","description":"The form ID which the cases are linked to.","required":true,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"Number of items to retrieve, maximum of 500","schema":{"type":"integer"}},{"name":"sort_type","in":"query","description":"Field by which to sort the results. Use `id`, `created_at`, or `updated_at` for system fields, or a custom field ID (e.g. `form_field_1_1`).","schema":{"type":"string"}},{"name":"sort_order","in":"query","description":"Order of results","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"page","in":"query","description":"Page to retrieve number, to be used with per_page","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## GET /forms/{form}/cases/{id}

> Retrieve all data about an individual form case

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/forms/{form}/cases/{id}":{"get":{"tags":["Cases"],"summary":"Retrieve all data about an individual form case","parameters":[{"name":"form","in":"path","required":true,"description":"The ID of your form","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The ID of the case","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"404":{"description":"Not Found - Case does not exist"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```

## POST /forms/{form}/cases/create

> Create a case against a specific user

```json
{"openapi":"3.1.0","info":{"title":"Siteglide Site API","version":"2.0.0"},"servers":[{"url":"{siteUrl}/api/site/v2","variables":{"siteUrl":{"default":"https://www.my-site.com"}}}],"security":[{"apiKey":[],"siteID":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your Siteglide API key"},"siteID":{"type":"apiKey","in":"header","name":"x-site-id","description":"The ID of the Siteglide site you are working with (not an API key — just the numeric site ID)"}}},"paths":{"/forms/{form}/cases/create":{"post":{"tags":["Cases"],"summary":"Create a case against a specific user","parameters":[{"name":"form","in":"path","required":true,"description":"The ID of your form","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Your Cases custom fields as a JSON object","content":{"application/json":{"schema":{"type":"object","required":["name","userID"],"properties":{"userID":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized - Credentials Incorrect"},"403":{"description":"Forbidden - You cannot access this site"},"404":{"description":"Not Found - Case does not exist"},"422":{"description":"Unprocessable Entity - Required data missing or data invalid"}}}}}}
```
