### Clone Growchief Repository using Git Source: https://docs.growchief.com/quickstart This command clones the Growchief project repository from GitHub. It requires Git to be installed on your system. The output is the local copy of the project files. ```bash git clone https://github.com/growchief/growchief.git ``` -------------------------------- ### Launch Growchief Services with Docker Compose Source: https://docs.growchief.com/quickstart This command starts all the services defined in the docker-compose.yml file in detached mode. It requires Docker and Docker Compose to be installed. Ensure the necessary ports (5002, 8080) are available. ```bash docker compose up -d ``` -------------------------------- ### Run Development Server with npm Source: https://docs.growchief.com/developer-guide Starts the development server for the GrowChief project using npm. This is a common script defined in the `package.json` file for local development. ```bash npm run dev ``` -------------------------------- ### Generate Prisma Client with npm Source: https://docs.growchief.com/developer-guide Generates the Prisma client, which is an ORM used for database interactions in the GrowChief backend. This command should be run after schema changes. ```bash npm run prisma-generate ``` -------------------------------- ### Get All Workflows - API Request Source: https://docs.growchief.com/public-api This snippet demonstrates how to make a GET request to the GrowChief Public API to retrieve all available workflows. Authentication is required via an API key in the Authorization header. ```HTTP GET https://api.growchief.com/public/workflows Authorization: {apiKey} ``` -------------------------------- ### Add Lead to Workflow - API Request Examples Source: https://docs.growchief.com/public-api This section provides examples of POST requests to add leads to a specific workflow using the GrowChief Public API. It covers different payload formats including direct URLs, organization details, and email addresses. The `:id` in the URL should be replaced with the actual workflow ID. ```HTTP POST https://api.growchief.com/public/workflows/:id Authorization: {apiKey} Content-Type: application/json { "urls": ["https://www.linkedin.com/in/nevo-david"] } ``` ```HTTP POST https://api.growchief.com/public/workflows/:id Authorization: {apiKey} Content-Type: application/json { "organization_name": "GrowChief", "firstName": "Nevo", "lastName": "David" } ``` ```HTTP POST https://api.growchief.com/public/workflows/:id Authorization: {apiKey} Content-Type: application/json { "email": "nevo@growchief.com" } ``` -------------------------------- ### Push Database Schema with npm Source: https://docs.growchief.com/developer-guide Pushes the database schema defined in Prisma to the actual database. This is used to update the database structure based on the schema definitions. ```bash npm run prisma-db-push ``` -------------------------------- ### Get all workflows Source: https://docs.growchief.com/public-api Retrieves a list of all available workflows within your GrowChief account. This is useful for obtaining workflow IDs needed for other operations. ```APIDOC ## GET /public/workflows ### Description Retrieves a list of all available workflows. ### Method GET ### Endpoint `https://api.growchief.com/public/workflows` (for hosted) or `https://{NEXT_PUBLIC_BACKEND_URL}/api/public/workflows` (for self-hosted) ### Parameters #### Headers - **Authorization** (string) - Required - Your API Key in the format `apiKey` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the workflow. - **name** (string) - The name of the workflow. - **organizationId** (string) - The ID of the organization the workflow belongs to. - **active** (boolean) - Indicates if the workflow is currently active. - **createdAt** (string) - The timestamp when the workflow was created. - **updatedAt** (string) - The timestamp when the workflow was last updated. - **deletedAt** (null) - Indicates if the workflow has been deleted. #### Response Example ```json [ { "id": "fbff241-607c-4432-b76d-bdc7bccd5fc3", "name": "New Workflow", "organizationId": "1b5ca8a2-c71e-4887-8e43-1ddcbca2f1f9", "active": true, "createdAt": "2025-08-19T07:27:13.902Z", "updatedAt": "2025-08-26T09:54:34.720Z", "deletedAt": null } ] ``` ``` -------------------------------- ### Add lead to a workflow Source: https://docs.growchief.com/public-api Adds a lead to a specified workflow. Leads can be identified by direct URLs, or by providing organization name, first name, last name, or email address. ```APIDOC ## POST /public/workflows/:id ### Description Adds a lead to a specified workflow using various identification methods. ### Method POST ### Endpoint `https://api.growchief.com/public/workflows/:id` (for hosted) or `https://{NEXT_PUBLIC_BACKEND_URL}/api/public/workflows/:id` (for self-hosted) ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the workflow to add the lead to. #### Headers - **Authorization** (string) - Required - Your API Key in the format `apiKey` #### Request Body Either `urls` or `organization_name`, `firstName`, `lastName`, or `email` must be provided. - **urls** (array of strings) - Optional - A list of direct URLs to identify the lead. - **organization_name** (string) - Optional - The name of the organization. - **firstName** (string) - Optional - The first name of the lead. - **lastName** (string) - Optional - The last name of the lead. - **email** (string) - Optional - The email address of the lead. ### Request Example (Direct URL) ```json { "urls": ["https://www.linkedin.com/in/nevo-david"] } ``` ### Request Example (Organization Name, First Name, Last Name) ```json { "organization_name": "GrowChief", "firstName": "Nevo", "lastName": "David" } ``` ### Request Example (Email) ```json { "email": "nevo@growchief.com" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the operation (e.g., "success"). - **message** (string) - A message describing the result of the operation. #### Response Example ```json [ { "status": "success", "message": "Workflow started successfully" } ] ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.