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

# List Processes

> List all processes for a specific project

## Path Parameters

<ParamField path="projectId" type="string" required>
  MongoDB ObjectId of the project to list processes for
</ParamField>

## Authentication

This endpoint requires a valid API key for the specified project. The API key must be included in the Authorization header as a Bearer token.

```bash theme={null}
Authorization: Bearer <your-api-key>
```

## Authorization

The API key must belong to the project specified in the `projectId` parameter. If the API key belongs to a different project, the request will be rejected with a 403 Forbidden error.

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="processes" type="array">
  Array of process objects, sorted by creation date (newest first)

  <Expandable title="Process Object Properties">
    <ResponseField name="_id" type="string">
      Process ID (MongoDB ObjectId)
    </ResponseField>

    <ResponseField name="title" type="string">
      Process title/name
    </ResponseField>

    <ResponseField name="description" type="string">
      Process description
    </ResponseField>

    <ResponseField name="projectId" type="string">
      Associated project ID
    </ResponseField>

    <ResponseField name="processType" type="number">
      Type of process
    </ResponseField>

    <ResponseField name="numberPool" type="array">
      Array of phone numbers used by this process
    </ResponseField>

    <ResponseField name="whatsappFromId" type="string">
      WhatsApp sender ID for this process
    </ResponseField>

    <ResponseField name="activeStatus" type="number">
      Active status indicator (1 = active, 0 = inactive)
    </ResponseField>

    <ResponseField name="isActive" type="boolean">
      Whether the process is currently active
    </ResponseField>

    <ResponseField name="stateless" type="boolean">
      Whether the process is stateless
    </ResponseField>

    <ResponseField name="start" type="string">
      Starting node ID for the process
    </ResponseField>

    <ResponseField name="nodes" type="array">
      Array of node objects defining the process flow
    </ResponseField>

    <ResponseField name="callWindows" type="array">
      Array of call window configurations
    </ResponseField>

    <ResponseField name="dispositions" type="array">
      Array of possible dispositions for leads in this process
    </ResponseField>

    <ResponseField name="actions" type="array">
      Array of custom actions defined for this process
    </ResponseField>

    <ResponseField name="callbacks" type="array">
      Array of callback configurations
    </ResponseField>

    <ResponseField name="version" type="number">
      Process version number
    </ResponseField>

    <ResponseField name="metadata" type="object">
      Additional metadata for the process
    </ResponseField>

    <ResponseField name="timezone" type="string">
      Timezone for the process (e.g., "Asia/Kolkata")
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of when the process was created
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      ISO 8601 timestamp of when the process was last updated
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="count" type="number">
  Total number of processes returned
</ResponseField>

## Example Request

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://crm.uservox.ai/api/v1/processes/list/64abc123def456789 \
    --header 'Authorization: Bearer <your-api-key>'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://crm.uservox.ai/api/v1/processes/list/64abc123def456789',
    {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer <your-api-key>'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  url = "https://crm.uservox.ai/api/v1/processes/list/64abc123def456789"
  headers = {
      "Authorization": "Bearer <your-api-key>"
  }

  response = requests.get(url, headers=headers)
  data = response.json()
  ```
</RequestExample>

## Example Response

```json theme={null}
{
  "success": true,
  "processes": [
    {
      "_id": "64def456abc789123",
      "title": "Sales Outreach Process",
      "description": "Automated sales outreach for new leads",
      "projectId": "64abc123def456789",
      "processType": 1,
      "numberPool": ["+919876543210"],
      "whatsappFromId": "1234567890",
      "activeStatus": 1,
      "isActive": true,
      "stateless": false,
      "start": "initial_contact",
      "nodes": [...],
      "callWindows": [...],
      "dispositions": [...],
      "actions": [],
      "callbacks": [],
      "version": 1,
      "metadata": {},
      "timezone": "Asia/Kolkata",
      "createdAt": "2024-03-15T10:30:00.000Z",
      "updatedAt": "2024-03-20T14:45:00.000Z"
    }
  ],
  "count": 1
}
```

## Error Responses

<ResponseExample>
  ```json 400 Bad Request theme={null}
  {
    "success": false,
    "error": "projectId is required"
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "error": "Authorization header missing or invalid format"
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "success": false,
    "error": "Not authorized to access processes for this project"
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "success": false,
    "error": "Internal server error"
  }
  ```
</ResponseExample>
