CRM

Manage leads, contacts, and customer relationships across your organization. Track the full customer lifecycle from initial lead to closed deal.


GET/v1/crm/leads

List leads

Retrieve a paginated list of all leads.

Optional parameters

  • Name
    status
    Type
    string
    Description

    Filter by status: new, contacted, qualified, converted, lost.

  • Name
    assigned_to
    Type
    string
    Description

    Filter by assigned user ID.

  • Name
    limit
    Type
    integer
    Description

    Maximum number of records to return (default: 50).

Request

GET
/v1/crm/leads
curl https://api.umbraerp.com/v1/crm/leads \
  -H "Authorization: Bearer <your_access_token>"

Response

{
  "result": "success",
  "leads": [
    {
      "id": "lead_abc123",
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@example.com",
      "company": "Acme Corp",
      "status": "new",
      "assigned_to": "user_456",
      "created_at": "2026-01-15T10:30:00Z"
    }
  ],
  "total_count": 1
}

POST/v1/crm/leads

Create lead

Create a new lead in the CRM.

Required attributes

  • Name
    first_name
    Type
    string
    Description

    Lead's first name.

  • Name
    last_name
    Type
    string
    Description

    Lead's last name.

  • Name
    email
    Type
    string
    Description

    Lead's email address.

Optional attributes

  • Name
    company
    Type
    string
    Description

    Company name.

  • Name
    phone
    Type
    string
    Description

    Phone number.

  • Name
    source
    Type
    string
    Description

    Lead source: website, referral, cold_call, event, other.

  • Name
    assigned_to
    Type
    string
    Description

    User ID to assign the lead to.

  • Name
    notes
    Type
    string
    Description

    Additional notes.

Request

POST
/v1/crm/leads
curl -X POST https://api.umbraerp.com/v1/crm/leads \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "company": "Acme Corp",
    "source": "website",
    "phone": "+263771234567"
  }'

Response

{
  "result": "success",
  "lead_id": "lead_abc123",
  "message": "Lead created successfully."
}

GET/v1/crm/leads/:id

Get lead

Retrieve details of a specific lead.

Request

GET
/v1/crm/leads/lead_abc123
curl https://api.umbraerp.com/v1/crm/leads/lead_abc123 \
  -H "Authorization: Bearer <your_access_token>"

PUT/v1/crm/leads/:id

Update lead

Update an existing lead's information.

Optional attributes

  • Name
    first_name
    Type
    string
    Description

    Updated first name.

  • Name
    last_name
    Type
    string
    Description

    Updated last name.

  • Name
    status
    Type
    string
    Description

    Updated status: new, contacted, qualified, converted, lost.

  • Name
    assigned_to
    Type
    string
    Description

    Updated user assignment.

Request

PUT
/v1/crm/leads/lead_abc123
curl -X PUT https://api.umbraerp.com/v1/crm/leads/lead_abc123 \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "qualified",
    "notes": "Interested in enterprise plan"
  }'

Response

{
  "result": "success",
  "message": "Lead updated successfully."
}

DELETE/v1/crm/leads/:id

Delete lead

Delete a lead from the CRM. This action is irreversible.

Request

DELETE
/v1/crm/leads/lead_abc123
curl -X DELETE https://api.umbraerp.com/v1/crm/leads/lead_abc123 \
  -H "Authorization: Bearer <your_access_token>"

Response

{
  "result": "success",
  "message": "Lead deleted successfully."
}

Was this page helpful?