> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.neetoform.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting the Form ID

> Understand how to retrieve form IDs for use in your API calls.

## What is a Form ID?

A form ID is a unique identifier assigned to each form in your workspace. It's required for making API requests that interact with specific forms, such as retrieving form submissions.

There are two main ways to get a form ID:

1. **Using the API** - Programmatically retrieve all forms and their IDs.
2. **From the URL** - Extract the ID directly from your browser's address bar.

## Method 1: Using the API Endpoint

The [List all forms](/api-reference/forms/list) API endpoint allows you to retrieve a list of all forms in your workspace, including their IDs. This is particularly useful when you need to programmatically access or retrieve the IDs of all available forms.

### Step-by-Step Instructions

<Steps>
  <Step title="Make the API request">
    Send a `GET` request to the [List all forms](/api-reference/forms/list) API endpoint, including your API key in the request header.
  </Step>

  <Step title="Parse the response">
    The response will contain an array of forms, each with an `id` field.

    Example:

    ```json theme={"system"}
    {
      "forms": [
        {
          "id": "53svb04a-7510-a1d6-9a6b-37a92c3ae62b",
          "title": "Contact Form",
          "is_published": true,
          "state": "active",
          "created_at": "2024-01-15T10:30:00Z",
          "updated_at": "2024-01-20T14:45:00Z",
          "submissions_count": 25,
          "attempt_url": "https://spinkart.neetoform.com/a06b5843f9e0faab8746",
          "is_archived": false,
          "is_disabled": false,
          "is_suspended": false,
          "created_by": "oliver@example.com"
        },
        // ... rest of the forms
      ],
      "pagination": {
        "total_records": 1,
        "total_pages": 1,
        "current_page_number": 1,
        "page_size": 30
      },
      "total_count": 1
    }
    ```
  </Step>

  <Step title="Extract the form ID">
    Here the form ID for the `Contact form` is: **53svb04a-7510-a1d6-9a6b-37a92c3ae62b**.

    You can access the form ID in your code from the response using:

    <CodeGroup>
      ```javascript JavaScript theme={"system"}
      // Get the first form's ID
      const formId = response.forms[0].id;

      // Or iterate through all forms to find a specific one
      const contactForm = response.forms.find(form => form.title === "Contact Form");
      const contactFormId = contactForm.id;
      ```

      ```python Python theme={"system"}
      # Get the first form's ID
      form_id = response['forms'][0]['id']

      # Or iterate through all forms to find a specific one
      contact_form = next((form for form in response['forms'] if form['title'] == "Contact Form"), None)
      contact_form_id = contact_form['id']
      ```

      ```bash Bash theme={"system"}
      # Get the first form's ID
      form_id=$(jq -r '.forms[0].id' response.json)

      # Or iterate through all forms to find a specific one
      contact_form_id=$(jq -r '.forms[] | select(.title == "Contact Form") | .id' response.json)
      ```
    </CodeGroup>

    <Note> The `forms` array contains all forms in your workspace. If you have multiple forms, you may want to filter by title or other properties to find the specific form you need. </Note>
  </Step>
</Steps>

## Method 2: From the URL

The form ID appears in the URL when you view a form in your workspace. For example, in the URL:

```
https://spinkart.neetoform.com/admin/form/53svb04a-7510-a1d6-9a6b-37a92c3ae62b/build
```

The form ID is: **53svb04a-7510-a1d6-9a6b-37a92c3ae62b**

### Step-by-Step Instructions

<Steps>
  <Step title="Navigate to your form">
    Log into your NeetoForm workspace and navigate to the form you want to work with.
  </Step>

  <Step title="Locate the form URL">
    Once you're viewing the form, look at your browser's address bar. The URL will contain the form ID.
  </Step>

  <Step title="Extract the form ID">
    The form ID is typically found in the URL path. Look for a pattern like:

    ```
    https://your-subdomain.neetoform.com/admin/form/{form-id}/build
    ```

    The `{form-id}` part is what you need.
  </Step>
</Steps>

### URL Examples

Here are some examples of how form IDs appear in URLs:

| URL Example                                                                                | Form ID                                |
| ------------------------------------------------------------------------------------------ | -------------------------------------- |
| `https://mycompany.neetoform.com/admin/form/7db4b04a-6e17-4af6-a1d6-650c4cba3f91/share`    | `7db4b04a-6e17-4af6-a1d6-650c4cba3f91` |
| `https://marketing.neetoform.com/admin/form/b4c8c9b6-7510-4d69-9a6b-37a92c3ae62b/settings` | `b4c8c9b6-7510-4d69-9a6b-37a92c3ae62b` |
| `https://events.neetoform.com/admin/form/sv53b04a-7510-a1d6-9a6b-37a92c3ae62b/submissions` | `sv53b04a-7510-a1d6-9a6b-37a92c3ae62b` |
