> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.noteforms.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# API Documentation for Zapier endpoints

|| This page is not about our Zapier integration itself, but about it's underlying API.
|| NoteForms currently does not have a public API except for the endpoints described on this page.

# NoteForms Zapier Integration API Documentation
Welcome to the NoteForms Zapier Integration API documentation. This guide provides information on how to interact with the NoteForms API to automate your workflows with Zapier.

## Authentication

To authenticate with the NoteForms API, you will need an API key. You can find or create an API key in your NoteForms settings under the ["Access Tokens"](https://NoteForms.com/settings/access-tokens) section.
This key must be included in the header of every request you make to the API.

**Header**:
```
Authorization: Bearer YOUR_API_KEY
```

**Base URL**:
All URLs referenced in the documentation have the following base: https://api.NoteForms.com

## Endpoints

### Validate API Key

**GET** `/external/zapier/validate`

This endpoint is used by Zapier to test the validity of the API key.

### List Forms

**GET** `/external/zapier/forms`

Retrieve a list of forms available in a specific workspace.

**Query Parameters:**
- `workspace_id`: The ID of the workspace for which to list forms.

### New Submission Trigger

**POST** `/external/zapier/webhook`

This endpoint is used to set up a webhook for new form submissions.

**Body Parameters:**
- `hookUrl`: The URL provided by Zapier to send the submission data.
- `form_id`: The ID of the form for which to trigger the webhook.

### Unsubscribe Webhook

**DELETE** `/external/zapier/webhook`

This endpoint is used to unsubscribe from the webhook.

**Body Parameters:**
- `hookUrl`: The URL provided by Zapier to stop sending the submission data.
- `form_id`: The ID of the form for which to unsubscribe the webhook.

### Sample Submission Polling

**GET** `/external/zapier/submissions/recent`

Retrieves the most recent submissions for a specified form. This endpoint is used by the "New Submission" trigger in Zapier to provide users with the latest form submissions.

**Query Parameters**
- `form_id`: The ID of the form to retrieve submissions for.

**Sample Response**
```json
[
{
"submission_id": "unique_submission_id",
"form_id": "unique_form_id",
"submitted_at": "timestamp",
"data": {
// Form fields and their values
}
}
// Additional submissions can follow here
]
```

## Sample Request

Here's a sample request to list forms in a workspace:

**GET** `{{process.env.BASE_URL}}/external/zapier/forms?workspace_id=12345`

**Headers:**
```
Authorization: Bearer YOUR_API_KEY
Accept: application/json
```

## Error Handling

The NoteForms API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the `2xx` range indicate success, codes in the `4xx` range indicate an error resulting from the provided information, and codes in the `5xx` range indicate an error with NoteForms's servers.

## Support

If you encounter any issues or have questions regarding the API, please reach out to our support team via the live chat on this page.