Cogmento MCP by usefulapi
Read Cogmento CRM contacts, companies, deals, tasks and cases; create records and complete tasks.
我該用這個嗎
品質與安全性
發現項目(2)
- LOW在 cogmento_get_deal_pipeline_summary 中
- LOW在 cogmento_set_deal_contact_stage 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"cogmento": {
"url": "https://cogmento.usefulapi.io/mcp"
}
}
}遠端端點
https://cogmento.usefulapi.io/mcpstreamable-http它能做什麼
工具清單
工具(26)
🟢cogmento_get_current_user
The Cogmento user this API token belongs to: id, name, email, timezone and account id. GET /auth/user/.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_account
The Cogmento account: name, country, settings, billing plan, trial days left and number of users. GET /account/.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_templates
The field definitions (names, labels, types, options) of the account's templates for each record type: contacts, companies, deals, cases, tasks. Use it to learn the custom field names for filters, creates and field updates. GET /templates/.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_contacts(filters, sort, start, limit)
List or search contacts (name, email and phone channels, company). Filter on any field, e.g. first_name contains 'Eric'. GET /contacts/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
},
"sort": {
"description": "Field to sort by, e.g. created_at; prefix with - for descending, e.g. -last_modified.",
"type": "string",
"pattern": "^-?[a-z][a-z0-9_]{0,63}$"
},
"start": {
"description": "Row offset to start from (default 0). Pass the previous reply's next_start.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"description": "Rows per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_contact(contact_id)
One full contact record, including its related tasks, cases, calls, events and documents. GET /contacts/{id}/.
輸入結構描述
{
"type": "object",
"properties": {
"contact_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
}
},
"required": [
"contact_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡cogmento_create_contact(first_name, last_name, middle_name, email, phone, ...)
WRITE: create a contact. Needs first and last name; email and phone are optional. POST /contacts/.
輸入結構描述
{
"type": "object",
"properties": {
"first_name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"last_name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"middle_name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"email": {
"description": "Email address; stored as an Email channel.",
"type": "string",
"maxLength": 320,
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
},
"phone": {
"description": "Phone number, ideally in international format (+14155550100).",
"type": "string",
"minLength": 3,
"maxLength": 40
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 5000
},
"tags": {
"description": "Tags to put on the record.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"rating": {
"description": "A 1-5 rating.",
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"required": [
"first_name",
"last_name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_companies(filters, sort, start, limit)
List or search companies (name, website, contacts). GET /companies/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
},
"sort": {
"description": "Field to sort by, e.g. created_at; prefix with - for descending, e.g. -last_modified.",
"type": "string",
"pattern": "^-?[a-z][a-z0-9_]{0,63}$"
},
"start": {
"description": "Row offset to start from (default 0). Pass the previous reply's next_start.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"description": "Rows per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_company(company_id)
One full company record with its contacts and related records. GET /companies/{id}/.
輸入結構描述
{
"type": "object",
"properties": {
"company_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
}
},
"required": [
"company_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡cogmento_create_company(name, description, url, tags, rating)
WRITE: create a company. POST /companies/.
輸入結構描述
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 5000
},
"url": {
"description": "The company's website.",
"type": "string",
"maxLength": 500,
"format": "uri"
},
"tags": {
"description": "Tags to put on the record.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"rating": {
"description": "A 1-5 rating.",
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"required": [
"name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_deals(filters, sort, start, limit)
List or search deals (title, amount, close date, assigned users, products). GET /deals/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
},
"sort": {
"description": "Field to sort by, e.g. created_at; prefix with - for descending, e.g. -last_modified.",
"type": "string",
"pattern": "^-?[a-z][a-z0-9_]{0,63}$"
},
"start": {
"description": "Row offset to start from (default 0). Pass the previous reply's next_start.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"description": "Rows per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_deal(deal_id)
One full deal record with its contacts, products and related records. GET /deals/{id}/.
輸入結構描述
{
"type": "object",
"properties": {
"deal_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
}
},
"required": [
"deal_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡cogmento_create_deal(title, description, amount, close_date, tags, ...)
WRITE: create a deal. POST /deals/.
輸入結構描述
{
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 5000
},
"amount": {
"description": "The deal value.",
"type": "number",
"minimum": 0,
"maximum": 1000000000000000
},
"close_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "A date, yyyy-mm-dd."
},
"tags": {
"description": "Tags to put on the record.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"rating": {
"description": "A 1-5 rating.",
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"required": [
"title"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_deal_pipeline_summary(filters)
Totals by pipeline stage: how many deals sit at each stage and what they are worth. Optional filters narrow the deals counted. GET /deals/summary/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_aggregate_deals(field, filters)
Sums and counts deals grouped by a field (default grouping as Cogmento chooses; e.g. field=stage). GET /deals/aggregate/.
輸入結構描述
{
"type": "object",
"properties": {
"field": {
"description": "Field to group by, e.g. stage.",
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$"
},
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_deal_stages
The account-wide stages a contact can be at within a deal (for example Champion or Decision maker). GET /deals/stages/.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴cogmento_set_deal_contact_stage(deal_id, contact_id, stage)
WRITE: record where a contact sits in a deal (a stage from cogmento_list_deal_stages). The contact is attached to the deal if it is not already. POST /deals/{id}/contact/{id}/stage/.
輸入結構描述
{
"type": "object",
"properties": {
"deal_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
},
"contact_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
},
"stage": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "A stage name from cogmento_list_deal_stages."
}
},
"required": [
"deal_id",
"contact_id",
"stage"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_tasks(filters, sort, start, limit)
List or search tasks (title, due date, completion date, assigned users, linked deal/contact/case). Filter e.g. on due_date. GET /tasks/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
},
"sort": {
"description": "Field to sort by, e.g. created_at; prefix with - for descending, e.g. -last_modified.",
"type": "string",
"pattern": "^-?[a-z][a-z0-9_]{0,63}$"
},
"start": {
"description": "Row offset to start from (default 0). Pass the previous reply's next_start.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"description": "Rows per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_task(task_id)
One task record. GET /tasks/{id}/.
輸入結構描述
{
"type": "object",
"properties": {
"task_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
}
},
"required": [
"task_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡cogmento_create_task(title, description, due_date, tags, rating)
WRITE: create a task. POST /tasks/.
輸入結構描述
{
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 5000
},
"due_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "A date, yyyy-mm-dd."
},
"tags": {
"description": "Tags to put on the record.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"rating": {
"description": "A 1-5 rating.",
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"required": [
"title"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴cogmento_complete_task(task_id)
WRITE: mark a task complete, stamping who completed it and when. A recurring task also gets its next occurrence. POST /tasks/{id}/complete/.
輸入結構描述
{
"type": "object",
"properties": {
"task_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
}
},
"required": [
"task_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_cases(filters, sort, start, limit)
List or search cases (support or project cases: title, close date, assigned users, deal, company). GET /cases/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
},
"sort": {
"description": "Field to sort by, e.g. created_at; prefix with - for descending, e.g. -last_modified.",
"type": "string",
"pattern": "^-?[a-z][a-z0-9_]{0,63}$"
},
"start": {
"description": "Row offset to start from (default 0). Pass the previous reply's next_start.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"description": "Rows per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_get_case(case_id)
One case record. GET /cases/{id}/.
輸入結構描述
{
"type": "object",
"properties": {
"case_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
}
},
"required": [
"case_id"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟡cogmento_create_case(title, description, close_date, tags, rating)
WRITE: create a case. POST /cases/.
輸入結構描述
{
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 5000
},
"close_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "A date, yyyy-mm-dd."
},
"tags": {
"description": "Tags to put on the record.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"rating": {
"description": "A 1-5 rating.",
"type": "integer",
"minimum": 1,
"maximum": 5
}
},
"required": [
"title"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_products(filters, sort, start, limit)
List the product catalogue (name, prices) that deals and invoices draw on. GET /products/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
},
"sort": {
"description": "Field to sort by, e.g. created_at; prefix with - for descending, e.g. -last_modified.",
"type": "string",
"pattern": "^-?[a-z][a-z0-9_]{0,63}$"
},
"start": {
"description": "Row offset to start from (default 0). Pass the previous reply's next_start.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"description": "Rows per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢cogmento_list_calls(filters, sort, start, limit)
The account's call records, most recent first: logged manual calls and calls placed through the browser dialer. GET /calls/.
輸入結構描述
{
"type": "object",
"properties": {
"filters": {
"description": "Conditions, all of which must match (AND). Dates are yyyy-mm-dd.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field name, e.g. first_name, title, status."
},
"operator": {
"type": "string",
"enum": [
"eq",
"gt",
"gte",
"lt",
"lte",
"contains"
],
"description": "eq, gt, gte, lt, lte or contains."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
},
{
"type": "boolean"
}
],
"description": "Value to compare with."
}
},
"required": [
"field",
"operator",
"value"
]
}
},
"sort": {
"description": "Field to sort by, e.g. created_at; prefix with - for descending, e.g. -last_modified.",
"type": "string",
"pattern": "^-?[a-z][a-z0-9_]{0,63}$"
},
"start": {
"description": "Row offset to start from (default 0). Pass the previous reply's next_start.",
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"description": "Rows per page, 1-100 (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴cogmento_update_record_field(record_type, record_id, field_name, value)
WRITE: change a single field of a contact, company, deal, task or case, e.g. a deal's status or a contact's first_name. Custom field names come from cogmento_get_templates. System fields (id, acl, private, timestamps) are refused. PATCH /<type>/{id}/.
輸入結構描述
{
"type": "object",
"properties": {
"record_type": {
"type": "string",
"enum": [
"contact",
"company",
"deal",
"task",
"case"
],
"description": "contact, company, deal, task or case."
},
"record_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "Record id (UUID)."
},
"field_name": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,63}$",
"description": "Field to set, e.g. first_name, title, status, amount, due_date."
},
"value": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"maxItems": 100,
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "number"
}
]
}
}
],
"description": "The new value (type must match the field; dates yyyy-mm-dd; null clears a field)."
}
},
"required": [
"record_type",
"record_id",
"field_name",
"value"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據