{
  "service": "one_page_crm",
  "displayName": "OnePageCRM",
  "categories": [
    "Marketing"
  ],
  "authTypes": [
    "custom_credential"
  ],
  "auth": [
    {
      "type": "custom_credential",
      "fields": [
        {
          "key": "userId",
          "label": "User ID",
          "inputType": "text",
          "required": true,
          "secret": false,
          "placeholder": "ONEPAGECRM_USER_ID",
          "description": "OnePageCRM user_id used as the Basic Auth username. Find it in your OnePageCRM API configuration tab after signing in: https://app.onepagecrm.com/app/api."
        },
        {
          "key": "apiKey",
          "label": "API Key",
          "inputType": "password",
          "required": true,
          "secret": true,
          "placeholder": "ONEPAGECRM_API_KEY",
          "description": "OnePageCRM API key used as the Basic Auth password. View or regenerate it in your OnePageCRM API configuration tab: https://app.onepagecrm.com/app/api."
        }
      ],
      "testAction": {
        "actionName": "list_contacts",
        "input": {
          "perPage": 1
        }
      }
    }
  ],
  "homepageUrl": "https://www.onepagecrm.com",
  "actions": [
    {
      "id": "one_page_crm.create_contact",
      "service": "one_page_crm",
      "name": "create_contact",
      "description": "Create a OnePageCRM contact using JSON-safe contact fields.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "enum": [
              "Mr",
              "Mrs",
              "Ms"
            ],
            "description": "Title of the contact."
          },
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 25,
            "description": "First name of the contact."
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 25,
            "description": "Last name of the contact."
          },
          "jobTitle": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "description": "Job title of the contact."
          },
          "starred": {
            "type": "boolean",
            "description": "Whether the contact should be starred."
          },
          "companyId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the company to which the contact belongs."
          },
          "companyName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 55,
            "description": "Name of the company to which the contact belongs."
          },
          "urls": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "OnePageCRM type for this value, such as work, home, website, or other."
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The typed value stored on the contact."
                }
              },
              "additionalProperties": false,
              "required": [
                "type",
                "value"
              ],
              "description": "A typed value accepted by OnePageCRM for email addresses, phone numbers, or URLs."
            },
            "description": "URLs associated with the contact."
          },
          "phones": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "OnePageCRM type for this value, such as work, home, website, or other."
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The typed value stored on the contact."
                }
              },
              "additionalProperties": false,
              "required": [
                "type",
                "value"
              ],
              "description": "A typed value accepted by OnePageCRM for email addresses, phone numbers, or URLs."
            },
            "description": "Phone numbers associated with the contact."
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "minLength": 1,
                  "description": "OnePageCRM type for this value, such as work, home, website, or other."
                },
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The typed value stored on the contact."
                }
              },
              "additionalProperties": false,
              "required": [
                "type",
                "value"
              ],
              "description": "A typed value accepted by OnePageCRM for email addresses, phone numbers, or URLs."
            },
            "description": "Email addresses associated with the contact."
          },
          "statusId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the status assigned to the contact."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "One contact tag."
            },
            "description": "Tags assigned to the contact."
          },
          "leadSourceId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the lead source assigned to the contact."
          },
          "background": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10240,
            "description": "Background information about the contact."
          },
          "ownerId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the OnePageCRM user who owns the contact."
          }
        },
        "additionalProperties": false,
        "description": "Fields for creating a OnePageCRM contact."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "OnePageCRM contact object."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw OnePageCRM response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "contact",
          "raw"
        ],
        "description": "Normalized OnePageCRM contact response."
      }
    },
    {
      "id": "one_page_crm.create_deal",
      "service": "one_page_crm",
      "name": "create_deal",
      "description": "Create a OnePageCRM deal using JSON-safe deal fields.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the contact to which the deal belongs."
          },
          "ownerId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the OnePageCRM user who owns the deal."
          },
          "pipelineId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the pipeline to which the deal belongs."
          },
          "salesPipelineId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the sales pipeline to which the deal belongs."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "Name of the deal."
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 7168,
            "description": "Extra notes related to the deal."
          },
          "stage": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Progress stage for a pending deal. OnePageCRM uses 0 through 100."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "won",
              "lost"
            ],
            "description": "Status of the deal."
          },
          "expectedCloseDate": {
            "type": "string",
            "description": "Date the pending deal is expected to close.",
            "format": "date"
          },
          "closeDate": {
            "type": "string",
            "description": "Date the won or lost deal actually closed.",
            "format": "date"
          },
          "date": {
            "type": "string",
            "description": "Creation date of the deal.",
            "format": "date"
          },
          "amount": {
            "type": "number",
            "description": "Monetary value of the deal."
          },
          "months": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of months the deal is paid for."
          },
          "cost": {
            "type": "number",
            "description": "Monetary cost of the deal."
          },
          "commissionBase": {
            "type": "string",
            "enum": [
              "amount",
              "margin"
            ],
            "description": "Commission calculation base."
          },
          "commissionType": {
            "type": "string",
            "enum": [
              "none",
              "percentage",
              "fixed"
            ],
            "description": "Commission type."
          },
          "commission": {
            "type": "number",
            "description": "Fixed commission value for the deal."
          },
          "commissionPercentage": {
            "type": "number",
            "description": "Commission percentage for the deal."
          }
        },
        "additionalProperties": false,
        "required": [
          "contactId",
          "ownerId",
          "name"
        ],
        "description": "Fields for creating a OnePageCRM deal."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deal": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "OnePageCRM deal object."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw OnePageCRM response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "deal",
          "raw"
        ],
        "description": "Normalized OnePageCRM deal response."
      }
    },
    {
      "id": "one_page_crm.get_contact",
      "service": "one_page_crm",
      "name": "get_contact",
      "description": "Retrieve a single OnePageCRM contact by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the OnePageCRM contact to retrieve."
          }
        },
        "additionalProperties": false,
        "required": [
          "contactId"
        ],
        "description": "Identifier for getting a OnePageCRM contact."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contact": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "OnePageCRM contact object."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw OnePageCRM response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "contact",
          "raw"
        ],
        "description": "Normalized OnePageCRM contact response."
      }
    },
    {
      "id": "one_page_crm.get_deal",
      "service": "one_page_crm",
      "name": "get_deal",
      "description": "Retrieve a single OnePageCRM deal by ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "dealId": {
            "type": "string",
            "minLength": 1,
            "description": "ID of the OnePageCRM deal to retrieve."
          }
        },
        "additionalProperties": false,
        "required": [
          "dealId"
        ],
        "description": "Identifier for getting a OnePageCRM deal."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deal": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "OnePageCRM deal object."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw OnePageCRM response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "deal",
          "raw"
        ],
        "description": "Normalized OnePageCRM deal response."
      }
    },
    {
      "id": "one_page_crm.list_contacts",
      "service": "one_page_crm",
      "name": "list_contacts",
      "description": "List OnePageCRM contacts with pagination, search, ownership, tag, and sorting filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number to request. OnePageCRM starts pagination at 1."
          },
          "perPage": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of records to return per page. OnePageCRM allows at most 100."
          },
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "Search contacts by contact name, company name, or phone number."
          },
          "ownerId": {
            "type": "string",
            "minLength": 1,
            "description": "Return contacts owned by a specific OnePageCRM user."
          },
          "tag": {
            "type": "string",
            "minLength": 1,
            "description": "Filter contacts by tag."
          },
          "filterId": {
            "type": "string",
            "minLength": 1,
            "description": "Apply a saved OnePageCRM contact filter."
          },
          "sortBy": {
            "type": "string",
            "enum": [
              "created_at",
              "modified_at",
              "first_name",
              "last_name",
              "company_name",
              "name"
            ],
            "description": "Field used to sort OnePageCRM contacts."
          },
          "order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort order for OnePageCRM contact results."
          }
        },
        "additionalProperties": false,
        "description": "Filters and pagination for listing OnePageCRM contacts."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "contacts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "OnePageCRM contact object."
            },
            "description": "Contacts returned by OnePageCRM."
          },
          "totalCount": {
            "type": "integer",
            "description": "Total number of matching records reported by OnePageCRM."
          },
          "page": {
            "type": "integer",
            "description": "Current page number returned by OnePageCRM."
          },
          "perPage": {
            "type": "integer",
            "description": "Number of records returned per page by OnePageCRM."
          },
          "maxPage": {
            "type": "integer",
            "description": "Last available page number reported by OnePageCRM."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw OnePageCRM response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "contacts",
          "raw"
        ],
        "description": "Normalized OnePageCRM contact list response."
      }
    },
    {
      "id": "one_page_crm.list_deals",
      "service": "one_page_crm",
      "name": "list_deals",
      "description": "List OnePageCRM deals with pagination, search, status, contact, owner, tag, and sorting filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer",
            "minimum": 1,
            "description": "Page number to request. OnePageCRM starts pagination at 1."
          },
          "perPage": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Number of records to return per page. OnePageCRM allows at most 100."
          },
          "search": {
            "type": "string",
            "minLength": 1,
            "description": "Search deals by deal name, contact name, or company name."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "won",
              "lost",
              "closed"
            ],
            "description": "Return deals with a particular status."
          },
          "stage": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Return pending deals at a specific stage."
          },
          "ownerId": {
            "type": "string",
            "minLength": 1,
            "description": "Return deals owned by a specific OnePageCRM user."
          },
          "contactId": {
            "type": "string",
            "minLength": 1,
            "description": "Return deals linked to a specific contact."
          },
          "companyId": {
            "type": "string",
            "minLength": 1,
            "description": "Return deals linked to a specific company."
          },
          "tag": {
            "type": "string",
            "minLength": 1,
            "description": "Filter deals by tag."
          },
          "filterId": {
            "type": "string",
            "minLength": 1,
            "description": "Apply a saved OnePageCRM deal filter."
          },
          "sortBy": {
            "type": "string",
            "enum": [
              "created_at",
              "modified_at",
              "date",
              "close_date",
              "expected_close_date"
            ],
            "description": "Field used to sort OnePageCRM deals."
          },
          "order": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort order for OnePageCRM deal results."
          }
        },
        "additionalProperties": false,
        "description": "Filters and pagination for listing OnePageCRM deals."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "deals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {},
              "additionalProperties": true,
              "description": "OnePageCRM deal object."
            },
            "description": "Deals returned by OnePageCRM."
          },
          "totalCount": {
            "type": "integer",
            "description": "Total number of matching records reported by OnePageCRM."
          },
          "page": {
            "type": "integer",
            "description": "Current page number returned by OnePageCRM."
          },
          "perPage": {
            "type": "integer",
            "description": "Number of records returned per page by OnePageCRM."
          },
          "maxPage": {
            "type": "integer",
            "description": "Last available page number reported by OnePageCRM."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "Raw OnePageCRM response payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "deals",
          "raw"
        ],
        "description": "Normalized OnePageCRM deal list response."
      }
    }
  ]
}
