πŸ”₯
ClosingDealz
  • πŸ‘‹Welcome to ClosingDealz
  • Overview
    • ✨Features
    • πŸ’°Pricing
    • ❓FAQ
    • πŸ—ΊοΈRoadmap
    • 🧩Changelog
  • Getting Started
    • πŸ‘¨β€πŸ’»Creating Account
    • πŸ’ΎImporting Data
      • πŸ—„οΈImporting Data From File
      • πŸ“Other Ways To Get Data
    • 🧰Customize Your Sales Process
    • πŸ§‘β€πŸ€β€πŸ§‘Inviting Team Members
  • Features
    • πŸŽ›οΈDashboard
    • 🏫Leads
    • πŸ’°Deals
    • 🀡Contacts
    • 🀝Activities
    • πŸš€Lead Gen
      • πŸ—’οΈForms
    • πŸ“ˆAnalytics
      • πŸ“ŠOverview
      • πŸ’°Sale Log
      • πŸ“‹Pipeline
      • πŸ§‘β€πŸ€β€πŸ§‘Team
      • πŸ—’οΈForm
  • Developers
    • βš™οΈIntroduction API
    • πŸ“₯Obtaining API Key
    • ⏩API Endpoints
      • πŸ—’οΈLead Request Object
      • πŸ—’οΈContact Request Object
  • Legal
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  • Create Leads
  • Success Responses:
  • Error Responses:
  • Example Request
  1. Developers

API Endpoints

Currently, our API offers the following endpoint for lead creation:

Create Leads

  • Endpoint: POST /api/v1/leads

  • Description: This endpoint allows for the creation of new leads in the ClosingDealz CRM system.

  • Headers:

    • Content-Type: application/json

    • X-API-Key: your_api_key_here

  • Example Body Request:

[
    {
        "company": "Company Name",
        "contactPerson": "Contact Person Name",
        "jobTitle": "Job Title",
        "email": "email@example.com",
        "phoneNumber": "Phone Number",
        "notes": "Any relevant notes or information about the lead"
    }
]

Visit Lead and Contact Request Objects to view all the available fields of the request.

Success Responses:

Code: 200 OK

Description: Successfully created leads.

{ 
    "succeeded": true, 
    "statusCode": 200, 
    "statusCodeDescription": "NONE", 
    "message": null
}

Error Responses:

Code: 401 Unauthorized

Description: The submitted API key was not valid.

{ 
    "succeeded": false, 
    "statusCode": 401, 
    "statusCodeDescription": "NONE", 
    "message": "Invalid API key."
}

OR

Code: 400 Bad Request

Description: Only 100 leads is allowed to be created at once.

{ 
    "succeeded": false, 
    "statusCode": 400, 
    "statusCodeDescription": "NONE", 
    "message": "The maximum amount of leads to create at once is 100, but was {lead_count}."
}

OR

Code: 400 Bad Request

Description: Workspace plan has been downgrade to Free Plan, only workspaces with Basic Plan can use the API without limits.

{ 
    "succeeded": false, 
    "statusCode": 400, 
    "statusCodeDescription": "NONE", 
    "message": "Reached the maximum limit of leads on the free plan."
}

OR

Code: 400 Bad Request

Description: Can not have more than 5 leads on the Free Plan. Only workspaces with Basic Plan can use the API without limits.

{ 
    "succeeded": false, 
    "statusCode": 400, 
    "statusCodeDescription": "NONE", 
        "message": "Can not have more than 5 leads on the free plan."
}

OR

Code: 429 Too Many Requests

Description: Too many requests, only 1000 requests every 5 minutes is allowed.

{ 
    "succeeded": false, 
    "statusCode": 429, 
    "statusCodeDescription": "NONE", 
    "message": "Too many requests. Please try again later."
}

Example Request

Here's an example of how to create a lead using curl:

curl -X POST https://app.closingdealz.io/api/v1/leads \
     -H 'X-API-Key: your_api_key_here' \
     -H 'Content-Type: application/json' \
     -d '[{ "Company": "Open AI", "Notes": "Interested in API integration" }]'

Replace your_api_key_here with your actual API key.

Last updated 3 months ago

⏩
πŸ—’οΈLead Request Object
πŸ—’οΈContact Request Object