Lead-Quelle
GET https://leads.qreq.com/api/lead-sources
curl --request GET \
--url 'https://leads.qreq.com/api/lead-sources' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/lead-sources' \
--header 'Authorization: Bearer {api_key}'
{
"message": "Lead sources retrieved successfully.",
"leadSources": {
"current_page": 1,
"data": [
{
"id": 1,
"name": "test",
"description": "test",
"status": "active",
"created_by": 9,
"created_at": "2025-11-01T12:15:34.000000Z",
"updated_at": "2025-11-01T12:15:34.000000Z"
}
],
"first_page_url": "https://leads.qreq.com/api/lead-sources?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://leads.qreq.com/api/lead-sources?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "https://leads.qreq.com/api/lead-sources?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"next_page_url": null,
"path": "https://leads.qreq.com/api/lead-sources",
"per_page": 10,
"prev_page_url": null,
"to": 1,
"total": 1
},
"filters": {
"search": "",
"status": "all",
"sort_field": "id",
"sort_direction": "desc",
"per_page": 10
}
}
POST https://leads.qreq.com/api/lead-sources
| Parameter | Einzelheiten | Beschreibung |
|---|---|---|
| name | Erforderlich Zeichenfolge | Lead source name |
| description | Optional Zeichenfolge | Optional description |
| status | Optional Zeichenfolge | Active or inactive. Defaults to active |
curl --request POST \
--url 'https://leads.qreq.com/api/lead-sources' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Social Media", "description": "Leads from social platforms", "status": "active" }'
--url 'https://leads.qreq.com/api/lead-sources' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Social Media", "description": "Leads from social platforms", "status": "active" }'
{
"message": "Lead source created successfully.",
"leadSource": {
"name": "test source",
"description": "test source",
"status": "active",
"created_by": 9,
"updated_at": "2025-11-01T12:34:02.000000Z",
"created_at": "2025-11-01T12:34:02.000000Z",
"id": 2
}
}
PUT https://leads.qreq.com/api/lead-sources/{lead_source_id}
| Parameter | Einzelheiten | Beschreibung |
|---|---|---|
| name | Erforderlich Zeichenfolge | Lead source name |
| description | Optional Zeichenfolge | Optional description |
| status | Optional Zeichenfolge | Active or inactive |
curl --request PUT \
--url 'https://leads.qreq.com/api/lead-sources/{lead_source_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Updated Source", "description": "Updated description", "status": "inactive" }'
--url 'https://leads.qreq.com/api/lead-sources/{lead_source_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Updated Source", "description": "Updated description", "status": "inactive" }'
{
"message": "Lead source updated successfully.",
"leadSource": {
"id": 2,
"name": "test source 1",
"description": "test source 1",
"status": "active",
"created_by": 9,
"created_at": "2025-11-01T12:34:02.000000Z",
"updated_at": "2025-11-01T12:36:25.000000Z"
}
}
DELETE https://leads.qreq.com/api/lead-sources/{lead_source_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/lead-sources/{lead_source_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/lead-sources/{lead_source_id}' \
--header 'Authorization: Bearer {api_key}'
{
"message": "Lead source deleted successfully."
}
PATCH https://leads.qreq.com/api/lead-sources/{lead_source_id}/toggle-status
curl --request PATCH \
--url 'https://leads.qreq.com/api/lead-sources/{lead_source_id}/toggle-status' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/lead-sources/{lead_source_id}/toggle-status' \
--header 'Authorization: Bearer {api_key}'
{
"message": "Lead source status updated successfully.",
"leadSource": {
"id": 3,
"name": "test source",
"description": "test source",
"status": "inactive",
"created_by": 9,
"created_at": "2025-11-01T12:42:35.000000Z",
"updated_at": "2025-11-01T12:43:34.000000Z"
}
}