Appearance
REST API: CRM Leads
4 endpoints.
GET /api/v1/rest/leads
List leads
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | |
per_page | query | no | integer | |
status | query | no | ||
category | query | no | ||
search | query | no | ||
created_since | query | no | ||
updated_since | query | no | ||
sort | query | no | created_at | updated_at, prefix - for desc |
200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response List Leads Api V1 Rest Leads Get"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}POST /api/v1/rest/leads
Create a lead
Request body
json
{
"properties": {
"full_name": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Full Name"
},
"company_name": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Company Name"
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 320
},
{
"type": "null"
}
],
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string",
"maxLength": 64
},
{
"type": "null"
}
],
"title": "Phone"
},
"category": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
],
"title": "Category"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Status",
"description": "new | unreachable | quoted | abandoned | converted | disqualified — moved the way a Leads board drag moves it (logs a status-change activity)"
}
},
"type": "object",
"title": "LeadIn"
}201 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Create Lead Api V1 Rest Leads Post"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}GET /api/v1/rest/leads/{lead_id}
Get a lead
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
lead_id | path | yes | string |
200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Get Lead Api V1 Rest Leads Lead Id Get"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}PATCH /api/v1/rest/leads/{lead_id}
Update a lead
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
lead_id | path | yes | string |
Request body
json
{
"properties": {
"full_name": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Full Name"
},
"company_name": {
"anyOf": [
{
"type": "string",
"maxLength": 255
},
{
"type": "null"
}
],
"title": "Company Name"
},
"email": {
"anyOf": [
{
"type": "string",
"maxLength": 320
},
{
"type": "null"
}
],
"title": "Email"
},
"phone": {
"anyOf": [
{
"type": "string",
"maxLength": 64
},
{
"type": "null"
}
],
"title": "Phone"
},
"category": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
],
"title": "Category"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Status",
"description": "new | unreachable | quoted | abandoned | converted | disqualified — moved the way a Leads board drag moves it (logs a status-change activity)"
}
},
"type": "object",
"title": "LeadIn"
}200 — Successful Response
json
{
"type": "object",
"additionalProperties": true,
"title": "Response Update Lead Api V1 Rest Leads Lead Id Patch"
}422 — Validation Error
json
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}