├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature-request-new-product-form.yaml │ ├── feature-request-new-api-form.yaml │ ├── bug-report-documentation-errors-form.yaml │ └── bug-report-api-field-missing-form.yaml ├── PULL_REQUEST_TEMPLATE.md ├── workflows │ ├── close-clickup-task.yml │ ├── add-product-as-label.yml │ ├── scripts │ │ └── close-clickup-task.js │ └── api-docs-issue-processing.yml ├── highlevel-teams.json ├── CONTRIBUTING.md └── CODE_OF_CONDUCT.md ├── assets └── images │ └── Screenshot 2024-05-13 at 2.41.43 PM.png ├── models └── Footer.yaml ├── package.json ├── docs ├── oauth │ ├── Overview.md │ ├── Faqs.md │ ├── WebhookAuthentication.md │ ├── Billing.md │ └── Authorization.md ├── webhook events │ ├── NoteUpdate.md │ ├── NoteCreate.md │ ├── NoteDelete.md │ ├── AppUninstall.md │ ├── LocationCreate.md │ ├── LocationUpdate.md │ ├── ConversationUnreadWebhook.md │ ├── CampaignStatusUpdate.md │ ├── TaskComplete.md │ ├── TaskCreate.md │ ├── TaskDelete.md │ ├── PlanChange.md │ ├── OpportunityStageUpdate.md │ ├── OpportunityStatusUpdate.md │ ├── OpportunityAssignedToUpdate.md │ ├── OpportunityMonetaryValueUpdate.md │ ├── OpportunityUpdate.md │ ├── OpportunityCreate.md │ ├── OpportunityDelete.md │ ├── RecordDelete.md │ ├── RelationDelete.md │ ├── AppointmentCreate.md │ ├── AppointmentDelete.md │ ├── AppointmentUpdate.md │ ├── RelationCreate.md │ ├── ProviderOutboundMessage.md │ ├── PriceDelete.md │ ├── PriceUpdate.md │ ├── PriceCreate.md │ ├── ContactCreate.md │ ├── ContactDelete.md │ ├── RecordUpdate.md │ ├── ContactTagUpdate.md │ ├── ContactUpdate.md │ ├── RecordCreate.md │ ├── AppInstall.md │ ├── AssociationCreate.md │ ├── ProductCreate.md │ ├── ProductDelete.md │ ├── ProductUpdate.md │ ├── ObjectSchemaCreate.md │ ├── ObjectSchemaUpdate.md │ ├── AssociationDelete.md │ ├── AssociationUpdate.md │ ├── UserCreate.md │ ├── OutboundMessage.md │ ├── LCEmailStats.md │ ├── InboundMessage.md │ ├── ContactDndUpdate.md │ ├── InvoicePaid.md │ └── InvoiceSent.md ├── marketplace modules │ └── CustomJs.md └── country list │ └── Country.md ├── apps ├── agencies.json ├── campaigns.json └── workflows.json ├── README.md └── common └── common-schemas.json /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # All files in the repository are owned by the CRM Marketplace Devs team 2 | * @GoHighLevel/team-crm-marketplace-devs 3 | -------------------------------------------------------------------------------- /assets/images/Screenshot 2024-05-13 at 2.41.43 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoHighLevel/highlevel-api-docs/HEAD/assets/images/Screenshot 2024-05-13 at 2.41.43 PM.png -------------------------------------------------------------------------------- /models/Footer.yaml: -------------------------------------------------------------------------------- 1 | title: Footer 2 | x-stoplight: 3 | id: l8nsxdtelley9 4 | type: object 5 | properties: 6 | id: 7 | type: string 8 | x-stoplight: 9 | id: 8kddyqi5h4wif 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Gohighlevel API Support Ticket 4 | url: https://developers.gohighlevel.com/support 5 | about: Please use this to raise a ticket for your API queries. 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "highlevel-api-docs", 3 | "version": "1.0.0", 4 | "description": "This repo contains the source of public api documents", 5 | "main": "index.js", 6 | "directories": { 7 | "doc": "docs" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "keywords": [ 13 | "highlevel", 14 | "public", 15 | "api", 16 | "documents" 17 | ], 18 | "author": "HighLevel", 19 | "license": "ISC" 20 | } -------------------------------------------------------------------------------- /docs/oauth/Overview.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | 3 | These APIs use OAuth 2.0 flow for authentication. 4 | 5 | To get started, please follow [Authorization steps](docs/oauth/Authorization.md). 6 | 7 | ### Standard Response Fields 8 | 9 | Below we have listed the standard fields you would receive with every request. 10 | 11 | #### TraceId 12 | 13 | A traceId represents a unique id for every request and is returned with every response. It is useful in pinpointing the exact request and helps while debugging. 14 | -------------------------------------------------------------------------------- /apps/agencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "info": { 4 | "title": "Agency API", 5 | "description": "Documentation for Agency API", 6 | "version": "1.0", 7 | "contact": {} 8 | }, 9 | "tags": [ 10 | { 11 | "name": "Agency", 12 | "description": "Documentation for Agency API" 13 | } 14 | ], 15 | "servers": [ 16 | { 17 | "url": "https://api.msgsndr.com" 18 | } 19 | ], 20 | "components": { 21 | "securitySchemes": { 22 | "bearer": { 23 | "scheme": "bearer", 24 | "bearerFormat": "JWT", 25 | "type": "http" 26 | } 27 | } 28 | }, 29 | "paths": {} 30 | } -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Pull Request Template 2 | 3 | ## 📋 Description 4 | 5 | Please provide a short summary explaining your changes and the motivation behind them. 6 | 7 | - [ ] Bug fix 8 | - [ ] New documentation 9 | - [ ] Update to existing docs 10 | - [ ] Other (please describe): 11 | 12 | ## 🧪 Related Issues 13 | 14 | Link any related GitHub issues or discussions here (e.g. `Closes #123`). 15 | 16 | ## 📝 Checklist 17 | 18 | - [ ] I’ve tested my changes locally (if applicable). 19 | - [ ] I’ve added sufficient documentation. 20 | - [ ] I’ve reviewed existing open PRs for potential conflicts. 21 | - [ ] I’ve followed the repository's contribution guidelines. 22 | 23 | ## 💬 Additional Comments 24 | 25 | Add any additional context or screenshots here. 26 | -------------------------------------------------------------------------------- /docs/oauth/Faqs.md: -------------------------------------------------------------------------------- 1 | # FAQs 2 | 3 | Here you will find answers to commonly encountered questions. 4 | 5 | > If you are having trouble and cannot find a suitable answer, please reach out to support. 6 | 7 | ### How do I listen to webhook events? 8 | 9 | For listening to the webhook events - 10 | 11 | 1. Register for an app. 12 | 2. Go to the app settings and update the webhook url (where you want to listen for events) 13 | 3. Under the settings, also add the scope needed for the webhook event under the scopes section. 14 | 4. Ask the location/agency admin to go to the app page in marketplace and click on "Add App". 15 | 5. Select the location, it will redirect you to the redirect uri with the authorization code. 16 | 6. Use the authorization code to get the access token. 17 | 7. You would start receiving the webhook event for the location. -------------------------------------------------------------------------------- /docs/webhook events/NoteUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Note 6 | 7 | Called whenever a note is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "body": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "dateAdded": { 31 | "type": "string" 32 | } 33 | } 34 | } 35 | ``` 36 | 37 | #### Example 38 | 39 | ```json 40 | { 41 | "type": "NoteUpdate", 42 | "locationId": "ve9EPM428h8vShlRW1KT", 43 | "id": "otg8dTQqGLh3Q6iQI55w", 44 | "body": "Loram ipsum", 45 | "contactId": "CWBf1PR9LvvBkcYqiXlc", 46 | "dateAdded": "2021-11-26T12:41:02.193Z" 47 | } 48 | ``` -------------------------------------------------------------------------------- /docs/webhook events/NoteCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Note 6 | 7 | Called whenever a note is created 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "body": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "dateAdded": { 31 | "type": "string" 32 | } 33 | } 34 | } 35 | ``` 36 | 37 | #### Example 38 | 39 | ```json 40 | { 41 | "type": "NoteCreate", 42 | "locationId": "ve9EPM428h8vShlRW1KT", 43 | "id": "otg8dTQqGLh3Q6iQI55w", 44 | "body": "Loram ipsum", 45 | "contactId": "CWBf1PR9LvvBkcYqiXlc", 46 | "dateAdded": "2021-11-26T12:41:02.193Z" 47 | } 48 | ``` 49 | -------------------------------------------------------------------------------- /docs/webhook events/NoteDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Note 6 | 7 | Called whenever a note is deleted 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "body": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "dateAdded": { 31 | "type": "string" 32 | } 33 | } 34 | } 35 | ``` 36 | 37 | #### Example 38 | 39 | ```json 40 | { 41 | "type": "NoteDelete", 42 | "locationId": "ve9EPM428h8vShlRW1KT", 43 | "id": "otg8dTQqGLh3Q6iQI55w", 44 | "body": "Loram ipsum", 45 | "contactId": "CWBf1PR9LvvBkcYqiXlc", 46 | "dateAdded": "2021-11-26T12:41:02.193Z" 47 | } 48 | ``` 49 | -------------------------------------------------------------------------------- /docs/webhook events/AppUninstall.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # App 6 | 7 | Called whenever an app is uninstalled 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "appId": { 19 | "type": "string" 20 | }, 21 | "companyId": { 22 | "type": "string" 23 | }, 24 | "locationId": { 25 | "type": "string" 26 | } 27 | } 28 | } 29 | ``` 30 | 31 | #### Example 32 | 33 | - For Location Level App Uninstall 34 | 35 | ```json 36 | { 37 | "type": "UNINSTALL", 38 | "appId": "ve9EPM428h8vShlRW1KT", 39 | "locationId": "otg8dTQqGLh3Q6iQI55w" 40 | } 41 | ``` 42 | 43 | - For Agency Level App Uninstall 44 | 45 | ```json 46 | { 47 | "type": "UNINSTALL", 48 | "appId": "ve9EPM428h8vShlRW1KT", 49 | "companyId": "otg8dTQqGLh3Q6iQI55w" 50 | } 51 | ``` -------------------------------------------------------------------------------- /docs/webhook events/LocationCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | stoplight-id: 4sn3a9hsczi43 4 | --- 5 | 6 | # Location 7 | 8 | Called whenever a location is created. 9 | 10 | > Available only to Agency Level Apps. 11 | #### Schema 12 | 13 | ```json json_schema 14 | { 15 | "type": "object", 16 | "properties": { 17 | "type": { 18 | "type": "string" 19 | }, 20 | "id": { 21 | "type": "string" 22 | }, 23 | "name": { 24 | "type": "string" 25 | }, 26 | "email": { 27 | "type": "string" 28 | }, 29 | "stripeProductId": { 30 | "type": "string" 31 | }, 32 | "companyId": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | ``` 38 | 39 | #### Example 40 | 41 | ```json 42 | { 43 | "type": "LocationCreate", 44 | "id": "ve9EPM428h8vShlRW1KT", 45 | "companyId": "otg8dTQqGLh3Q6iQI55w", 46 | "name": "Loram ipsum", 47 | "email": "mailer@example.com", 48 | "stripeProductId": "prod_xyz123abc" 49 | } 50 | ``` -------------------------------------------------------------------------------- /docs/webhook events/LocationUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | stoplight-id: 69nmspzfqtcdk 4 | --- 5 | 6 | # Location 7 | 8 | Called whenever a location is updated. 9 | 10 | > Available to Agency Level Apps for all sub-accounts or to specific sub-accounts. 11 | #### Schema 12 | 13 | ```json json_schema 14 | { 15 | "type": "object", 16 | "properties": { 17 | "type": { 18 | "type": "string" 19 | }, 20 | "id": { 21 | "type": "string" 22 | }, 23 | "name": { 24 | "type": "string" 25 | }, 26 | "email": { 27 | "type": "string" 28 | }, 29 | "stripeProductId": { 30 | "type": "string" 31 | }, 32 | "companyId": { 33 | "type": "string" 34 | } 35 | } 36 | } 37 | ``` 38 | 39 | #### Example 40 | 41 | ```json 42 | { 43 | "type": "LocationUpdate", 44 | "id": "ve9EPM428h8vShlRW1KT", 45 | "companyId": "otg8dTQqGLh3Q6iQI55w", 46 | "name": "Loram ipsum", 47 | "email": "mailer@example.com", 48 | "stripeProductId": "prod_xyz123abc" 49 | } 50 | ``` -------------------------------------------------------------------------------- /.github/workflows/close-clickup-task.yml: -------------------------------------------------------------------------------- 1 | name: Close ClickUp Task 2 | 3 | on: 4 | issues: 5 | types: [closed] 6 | workflow_dispatch: 7 | inputs: 8 | issue_number: 9 | description: 'GitHub Issue Number' 10 | required: true 11 | type: string 12 | 13 | jobs: 14 | close-clickup-task: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout repository 18 | uses: actions/checkout@v4 19 | 20 | - name: Setup Node.js 21 | uses: actions/setup-node@v4 22 | with: 23 | node-version: '20' 24 | 25 | - name: Install axios 26 | run: npm install axios 27 | 28 | - name: Close ClickUp Task 29 | run: node .github/workflows/scripts/close-clickup-task.js 30 | env: 31 | ISSUE_NUMBER: ${{ github.event.issue.number || inputs.issue_number }} 32 | CLICKUP_API_TOKEN: ${{ secrets.CLICKUP_API_TOKEN }} 33 | CLICKUP_SPACE_ID: ${{ secrets.CLICKUP_SPACE_ID }} 34 | CLICKUP_GITHUB_FIELD_ID: ${{ secrets.CLICKUP_GITHUB_FIELD_ID }} -------------------------------------------------------------------------------- /docs/webhook events/ConversationUnreadWebhook.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Conversation 6 | 7 | Called whenever a conversations unread status is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "contactId": { 25 | "type": "string" 26 | }, 27 | "unreadCount": { 28 | "type": "number" 29 | }, 30 | "inbox": { 31 | "type": "boolean" 32 | }, 33 | "starred": { 34 | "type": "boolean" 35 | }, 36 | "deleted": { 37 | "type": "boolean" 38 | } 39 | } 40 | } 41 | ``` 42 | 43 | #### Example 44 | 45 | ```json 46 | { 47 | "type": "ConversationUnreadUpdate", 48 | "locationId": "ADVlSQnPsdq3hinusd6C3", 49 | "id": "MzKIpg0rEIH2ZUGKf6BS", 50 | "contactId": "zsYhPBOUsEHtrK508Wm9", 51 | "deleted": false, 52 | "inbox": false, 53 | "starred": true, 54 | "unreadCount": 0 55 | } 56 | ``` 57 | -------------------------------------------------------------------------------- /docs/webhook events/CampaignStatusUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Campaign 6 | 7 | Called whenever a campaign status is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "contactId": { 25 | "type": "string" 26 | }, 27 | "status": { 28 | "type": "string" 29 | }, 30 | "templateId": { 31 | "type": "string" 32 | }, 33 | "replied": { 34 | "type": "string" 35 | }, 36 | "dateAdded": { 37 | "type": "string" 38 | } 39 | } 40 | } 41 | ``` 42 | 43 | #### Example 44 | 45 | ```json 46 | { 47 | "type": "CampaignStatusUpdate", 48 | "locationId": "ve9EPM428h8vShlRW1KT", 49 | "id": "2hxvXh8Fjc69SvujEWMD", 50 | "contactId": "CWBf1PR9LvvBkcYqiXlc", 51 | "status": "paused", 52 | "templateId": "Y2I9XM7aO1hncuSOlc9L", 53 | "replied": "Loram ipsum", 54 | "dateAdded": "2021-11-26T12:41:02.193Z" 55 | } 56 | ``` 57 | -------------------------------------------------------------------------------- /docs/webhook events/TaskComplete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Task 6 | 7 | Called whenever a task is completed 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "body": { 28 | "type": "string" 29 | }, 30 | "contactId": { 31 | "type": "string" 32 | }, 33 | "title": { 34 | "type": "string" 35 | }, 36 | "dateAdded": { 37 | "type": "string" 38 | }, 39 | "dueDate": { 40 | "type": "string" 41 | } 42 | } 43 | } 44 | ``` 45 | 46 | #### Example 47 | 48 | ```json 49 | { 50 | "type": "TaskComplete", 51 | "locationId": "ve9EPM428h8vShlRW1KT", 52 | "id": "5HrB1IbmnKMBXloldFuP", 53 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 54 | "body": "testing", 55 | "contactId": "WFwVrSSjZ2CNHbZThQX2", 56 | "dateAdded": "2021-11-29T13:37:28.304Z", 57 | "dueDate": "2021-12-22T06:55:00.000Z", 58 | "title": "test" 59 | } 60 | ``` 61 | -------------------------------------------------------------------------------- /docs/webhook events/TaskCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Task 6 | 7 | Called whenever a task is created 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "body": { 28 | "type": "string" 29 | }, 30 | "contactId": { 31 | "type": "string" 32 | }, 33 | "title": { 34 | "type": "string" 35 | }, 36 | "dateAdded": { 37 | "type": "string" 38 | }, 39 | "dueDate": { 40 | "type": "string" 41 | } 42 | } 43 | } 44 | ``` 45 | 46 | #### Example 47 | 48 | ```json 49 | { 50 | "type": "TaskCreate", 51 | "locationId": "ve9EPM428h8vShlRW1KT", 52 | "id": "UlRWGLSXh0ji5qbiGu4i", 53 | "assignedTo": "63e4qiWDsFJjOYAC8phG", 54 | "body": "Loram ipsum", 55 | "contactId": "CWBf1PR9LvvBkcYqiXlc", 56 | "title": "Loram ipsum", 57 | "dateAdded": "2021-11-26T12:41:02.193Z", 58 | "dueDate": "2021-11-26T12:41:02.193Z" 59 | } 60 | ``` 61 | -------------------------------------------------------------------------------- /docs/webhook events/TaskDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Task 6 | 7 | Called whenever a task is deleted 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "body": { 28 | "type": "string" 29 | }, 30 | "contactId": { 31 | "type": "string" 32 | }, 33 | "title": { 34 | "type": "string" 35 | }, 36 | "dateAdded": { 37 | "type": "string" 38 | }, 39 | "dueDate": { 40 | "type": "string" 41 | } 42 | } 43 | } 44 | ``` 45 | 46 | #### Example 47 | 48 | ```json 49 | { 50 | "type": "TaskDelete", 51 | "locationId": "ve9EPM428h8vShlRW1KT", 52 | "id": "UlRWGLSXh0ji5qbiGu4i", 53 | "assignedTo": "63e4qiWDsFJjOYAC8phG", 54 | "body": "Loram ipsum", 55 | "contactId": "CWBf1PR9LvvBkcYqiXlc", 56 | "title": "Loram ipsum", 57 | "dateAdded": "2021-11-26T12:41:02.193Z", 58 | "dueDate": "2021-11-26T12:41:02.193Z" 59 | } 60 | ``` 61 | -------------------------------------------------------------------------------- /docs/webhook events/PlanChange.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Plan Change 6 | 7 | Called whenever user changes the plan for a paid app. 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string", 17 | "example": "PLAN_CHANGE" 18 | }, 19 | "appId": { 20 | "type": "string", 21 | "example": "ve9EPM428h8vShlRW1KT" 22 | }, 23 | "locationId": { 24 | "type": "string", 25 | "example": "otg8dTQqGLh3Q6iQI55w" 26 | }, 27 | "companyId": { 28 | "type": "string", 29 | "example": "otg8dTQqGLh3Q6iQI55w" 30 | }, 31 | "userId": { 32 | "type": "string", 33 | "example": "otg8dTQqGLh3Q6iQI55w" 34 | }, 35 | "currentPlanId": { 36 | "type": "string", 37 | "example": "66a0419a0dffa47fb5f8b22f" 38 | }, 39 | "newPlanId": { 40 | "type": "string", 41 | "example": "66a0419a0dffa47fb5f8b22f" 42 | } 43 | } 44 | } 45 | ``` 46 | 47 | #### Example 48 | 49 | ```json 50 | { 51 | "type": "PLAN_CHANGE", 52 | "appId": "ve9EPM428h8vShlRW1KT", 53 | "locationId": "otg8dTQqGLh3Q6iQI55w", 54 | "companyId": "otg8dTQqGLh3Q6iQI55w", 55 | "userId": "otg8dTQqGLh3Q6iQI55w", 56 | "currentPlanId": "66a0419a0dffa47fb5f8b22f", 57 | "newPlanId": "66a0419a0dffa47fb5f8b22f" 58 | } 59 | ``` 60 | -------------------------------------------------------------------------------- /.github/workflows/add-product-as-label.yml: -------------------------------------------------------------------------------- 1 | name: Add Product Area As Label 2 | on: 3 | issues: 4 | types: [opened, edited] 5 | 6 | permissions: 7 | issues: write 8 | 9 | jobs: 10 | add-product-area-label: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/github-script@v7 14 | with: 15 | script: | 16 | const body = context.payload.issue.body || ''; 17 | const match = body.match(/###\s*Product\s*Area\s*([\s\S]*?)(?=\n###|\n##|\n
|\n>|\n-\s|$)/i); 18 | if (!match) return; 19 | 20 | const label = match[1] 21 | .split(/\r?\n/) 22 | .map(line => line.trim()) 23 | .find(line => line && line !== "_No response_"); 24 | if (!label) return; 25 | 26 | await github.rest.issues.createLabel({ 27 | owner: context.repo.owner, 28 | repo: context.repo.repo, 29 | name: label, 30 | color: '0052cc' 31 | }).catch(err => { 32 | if (err.status !== 422) throw err; // already exists is fine 33 | }); 34 | 35 | await github.rest.issues.addLabels({ 36 | owner: context.repo.owner, 37 | repo: context.repo.repo, 38 | issue_number: context.payload.issue.number, 39 | labels: [label], 40 | }); 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GoHighLevel API V2 Documentation 2 | 3 | Welcome to the official public repository for **GoHighLevel API V2 Docs**! 🚀 4 | 5 | This repository contains the source documentation for the [GoHighLevel API V2](https://marketplace.gohighlevel.com/docs/oauth/Overview/index.html) , designed to help developers integrate with the HighLevel platform easily and effectively. 6 | 7 | ## 📚 What You'll Find Here 8 | - Structured and detailed references for the HighLevel V2 API endpoints. 9 | - Descriptions, parameters, request/response examples, and error codes. 10 | - Markdown and OpenAPI-based documentation for easy readability and automation. 11 | 12 | ## 🤝 Contributing 13 | We welcome contributions from developers and partners who use our API! 14 | 15 | If you’ve found something outdated, unclear, or missing: 16 | - 🧠 Feel free to open [issues](https://github.com/GoHighLevel/api-v2-docs/issues) for discussion or clarification. 17 | - 📌 We review suggestions and may choose to incorporate them into the official documentation. 18 | 19 | > ⚠️ **Note:** Ensure compliance with our [terms of service](https://www.gohighlevel.com/terms) and do not misrepresent the HighLevel brand. 20 | 21 | ## 📬 Contact & Support 22 | Please contact us on marketplace@gohighlevel.com. 23 | 24 | --- 25 | 26 | > 🔔 _This documentation is actively maintained. We encourage your feedback and look forward to building a robust developer ecosystem together._ 27 | -------------------------------------------------------------------------------- /docs/webhook events/OpportunityStageUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Opportunity 6 | 7 | Called whenever an opportunity's stage field is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "monetaryValue": { 31 | "type": "number" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "pipelineId": { 37 | "type": "string" 38 | }, 39 | "pipelineStageId": { 40 | "type": "string" 41 | }, 42 | "source": { 43 | "type": "string" 44 | }, 45 | "status": { 46 | "type": "string" 47 | }, 48 | "dateAdded": { 49 | "type": "string" 50 | } 51 | } 52 | } 53 | ``` 54 | 55 | #### Example 56 | 57 | ```json 58 | { 59 | "type": "OpportunityStageUpdate", 60 | "locationId": "ve9EPM428h8vShlRW1KT", 61 | "id": "wWhVuzqpRuOA1ZVWi4FC", 62 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 63 | "contactId": "cJAWDskpkJHbRbhAT7bs", 64 | "monetaryValue": 40, 65 | "name": "Loram ipsu", 66 | "pipelineId": "VDm7RPYC2GLUvdpKmBfC", 67 | "pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69", 68 | "source": "Loram ipsu", 69 | "status": "open", 70 | "dateAdded": "2021-11-26T12:41:02.193Z" 71 | } 72 | ``` 73 | -------------------------------------------------------------------------------- /docs/webhook events/OpportunityStatusUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Opportunity 6 | 7 | Called whenever an opportunity's status field is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "monetaryValue": { 31 | "type": "number" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "pipelineId": { 37 | "type": "string" 38 | }, 39 | "pipelineStageId": { 40 | "type": "string" 41 | }, 42 | "source": { 43 | "type": "string" 44 | }, 45 | "status": { 46 | "type": "string" 47 | }, 48 | "dateAdded": { 49 | "type": "string" 50 | } 51 | } 52 | } 53 | ``` 54 | 55 | #### Example 56 | 57 | ```json 58 | { 59 | "type": "OpportunityStatusUpdate", 60 | "locationId": "ve9EPM428h8vShlRW1KT", 61 | "id": "wWhVuzqpRuOA1ZVWi4FC", 62 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 63 | "contactId": "cJAWDskpkJHbRbhAT7bs", 64 | "monetaryValue": 40, 65 | "name": "Loram ipsu", 66 | "pipelineId": "VDm7RPYC2GLUvdpKmBfC", 67 | "pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69", 68 | "source": "Loram ipsu", 69 | "status": "open", 70 | "dateAdded": "2021-11-26T12:41:02.193Z" 71 | } 72 | ``` 73 | -------------------------------------------------------------------------------- /docs/webhook events/OpportunityAssignedToUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Opportunity 6 | 7 | Called whenever an opportunity's AssignedTo field is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "monetaryValue": { 31 | "type": "number" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "pipelineId": { 37 | "type": "string" 38 | }, 39 | "pipelineStageId": { 40 | "type": "string" 41 | }, 42 | "source": { 43 | "type": "string" 44 | }, 45 | "status": { 46 | "type": "string" 47 | }, 48 | "dateAdded": { 49 | "type": "string" 50 | } 51 | } 52 | } 53 | ``` 54 | 55 | #### Example 56 | 57 | ```json 58 | { 59 | "type": "OpportunityAssignedToUpdate", 60 | "locationId": "ve9EPM428h8vShlRW1KT", 61 | "id": "wWhVuzqpRuOA1ZVWi4FC", 62 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 63 | "contactId": "cJAWDskpkJHbRbhAT7bs", 64 | "monetaryValue": 40, 65 | "name": "Loram ipsu", 66 | "pipelineId": "VDm7RPYC2GLUvdpKmBfC", 67 | "pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69", 68 | "source": "Loram ipsu", 69 | "status": "open", 70 | "dateAdded": "2021-11-26T12:41:02.193Z" 71 | } 72 | ``` 73 | -------------------------------------------------------------------------------- /docs/webhook events/OpportunityMonetaryValueUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Opportunity 6 | 7 | Called whenever an opportunity's monetary value field is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "monetaryValue": { 31 | "type": "number" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "pipelineId": { 37 | "type": "string" 38 | }, 39 | "pipelineStageId": { 40 | "type": "string" 41 | }, 42 | "source": { 43 | "type": "string" 44 | }, 45 | "status": { 46 | "type": "string" 47 | }, 48 | "dateAdded": { 49 | "type": "string" 50 | } 51 | } 52 | } 53 | ``` 54 | 55 | #### Example 56 | 57 | ```json 58 | { 59 | "type": "OpportunityMonetaryValueUpdate", 60 | "locationId": "ve9EPM428h8vShlRW1KT", 61 | "id": "wWhVuzqpRuOA1ZVWi4FC", 62 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 63 | "contactId": "cJAWDskpkJHbRbhAT7bs", 64 | "monetaryValue": 40, 65 | "name": "Loram ipsu", 66 | "pipelineId": "VDm7RPYC2GLUvdpKmBfC", 67 | "pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69", 68 | "source": "Loram ipsu", 69 | "status": "open", 70 | "dateAdded": "2021-11-26T12:41:02.193Z" 71 | } 72 | ``` 73 | -------------------------------------------------------------------------------- /docs/webhook events/OpportunityUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Opportunity 6 | 7 | Called whenever an opportunity is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "monetaryValue": { 31 | "type": "number" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "pipelineId": { 37 | "type": "string" 38 | }, 39 | "pipelineStageId": { 40 | "type": "string" 41 | }, 42 | "pipelineStageId": { 43 | "type": "string" 44 | }, 45 | "source": { 46 | "type": "string" 47 | }, 48 | "status": { 49 | "type": "string" 50 | }, 51 | "dateAdded": { 52 | "type": "string" 53 | } 54 | } 55 | } 56 | ``` 57 | 58 | #### Example 59 | 60 | ```json 61 | { 62 | "type": "OpportunityUpdate", 63 | "locationId": "ve9EPM428h8vShlRW1KT", 64 | "id": "wWhVuzqpRuOA1ZVWi4FC", 65 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 66 | "contactId": "cJAWDskpkJHbRbhAT7bs", 67 | "monetaryValue": 40, 68 | "name": "Loram ipsu", 69 | "pipelineId": "VDm7RPYC2GLUvdpKmBfC", 70 | "pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69", 71 | "source": "Loram ipsu", 72 | "status": "open", 73 | "dateAdded": "2021-11-26T12:41:02.193Z" 74 | } 75 | ``` -------------------------------------------------------------------------------- /docs/webhook events/OpportunityCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Opportunity 6 | 7 | Called whenever an opportunity is created 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "monetaryValue": { 31 | "type": "number" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "pipelineId": { 37 | "type": "string" 38 | }, 39 | "pipelineStageId": { 40 | "type": "string" 41 | }, 42 | "pipelineStageId": { 43 | "type": "string" 44 | }, 45 | "source": { 46 | "type": "string" 47 | }, 48 | "status": { 49 | "type": "string" 50 | }, 51 | "dateAdded": { 52 | "type": "string" 53 | } 54 | } 55 | } 56 | ``` 57 | 58 | #### Example 59 | 60 | ```json 61 | { 62 | "type": "OpportunityCreate", 63 | "locationId": "ve9EPM428h8vShlRW1KT", 64 | "id": "wWhVuzqpRuOA1ZVWi4FC", 65 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 66 | "contactId": "cJAWDskpkJHbRbhAT7bs", 67 | "monetaryValue": 40, 68 | "name": "Loram ipsu", 69 | "pipelineId": "VDm7RPYC2GLUvdpKmBfC", 70 | "pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69", 71 | "source": "Loram ipsu", 72 | "status": "open", 73 | "dateAdded": "2021-11-26T12:41:02.193Z" 74 | } 75 | ``` 76 | -------------------------------------------------------------------------------- /docs/webhook events/OpportunityDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Opportunity 6 | 7 | Called whenever an opportunity is deleted 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "assignedTo": { 25 | "type": "string" 26 | }, 27 | "contactId": { 28 | "type": "string" 29 | }, 30 | "monetaryValue": { 31 | "type": "number" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "pipelineId": { 37 | "type": "string" 38 | }, 39 | "pipelineStageId": { 40 | "type": "string" 41 | }, 42 | "pipelineStageId": { 43 | "type": "string" 44 | }, 45 | "source": { 46 | "type": "string" 47 | }, 48 | "status": { 49 | "type": "string" 50 | }, 51 | "dateAdded": { 52 | "type": "string" 53 | } 54 | } 55 | } 56 | ``` 57 | 58 | #### Example 59 | 60 | ```json 61 | { 62 | "type": "OpportunityDelete", 63 | "locationId": "ve9EPM428h8vShlRW1KT", 64 | "id": "wWhVuzqpRuOA1ZVWi4FC", 65 | "assignedTo": "bNl8QNGXhIQJLv8eeASQ", 66 | "contactId": "cJAWDskpkJHbRbhAT7bs", 67 | "monetaryValue": 40, 68 | "name": "Loram ipsu", 69 | "pipelineId": "VDm7RPYC2GLUvdpKmBfC", 70 | "pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69", 71 | "source": "Loram ipsu", 72 | "status": "open", 73 | "dateAdded": "2021-11-26T12:41:02.193Z" 74 | } 75 | ``` 76 | -------------------------------------------------------------------------------- /common/common-schemas.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "info": { 4 | "title": "Common Schemas", 5 | "version": "1.0.0", 6 | "description": "Shared schemas used across multiple microservices" 7 | }, 8 | "components": { 9 | "schemas": { 10 | "BadRequestDTO": { 11 | "type": "object", 12 | "properties": { 13 | "statusCode": { 14 | "type": "number", 15 | "example": 400 16 | }, 17 | "message": { 18 | "type": "string", 19 | "example": "Bad Request" 20 | } 21 | } 22 | }, 23 | "UnauthorizedDTO": { 24 | "type": "object", 25 | "properties": { 26 | "statusCode": { 27 | "type": "number", 28 | "example": 401 29 | }, 30 | "message": { 31 | "type": "string", 32 | "example": "Invalid token: access token is invalid" 33 | }, 34 | "error": { 35 | "type": "string", 36 | "example": "Unauthorized" 37 | } 38 | } 39 | }, 40 | "UnprocessableDTO": { 41 | "type": "object", 42 | "properties": { 43 | "statusCode": { 44 | "type": "number", 45 | "example": 422 46 | }, 47 | "message": { 48 | "example": [ 49 | "Unprocessable Entity" 50 | ], 51 | "type": "array", 52 | "items": { 53 | "type": "string" 54 | } 55 | }, 56 | "error": { 57 | "type": "string", 58 | "example": "Unprocessable Entity" 59 | } 60 | } 61 | } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /.github/highlevel-teams.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"team": "revex", "sub_team": "wordpress"}, 3 | {"team": "revex", "sub_team": "saas"}, 4 | {"team": "revex", "sub_team": "lc-phone"}, 5 | {"team": "revex", "sub_team": "lc-whatsapp"}, 6 | {"team": "revex", "sub_team": "lc-phone-sms"}, 7 | {"team": "revex", "sub_team": "lc-phone-voice"}, 8 | {"team": "revex", "sub_team": "membership"}, 9 | {"team": "revex", "sub_team": "client-portal"}, 10 | {"team": "revex", "sub_team": "prospecting"}, 11 | {"team": "revex", "sub_team": "reputation"}, 12 | {"team": "revex", "sub_team": "yext"}, 13 | {"team": "revex", "sub_team": "communities"}, 14 | {"team": "revex", "sub_team": "snapshots"}, 15 | {"team": "revex", "sub_team": "lc-email"}, 16 | {"team": "revex", "sub_team": "reselling"}, 17 | {"team": "revex", "sub_team": "gokollab"}, 18 | {"team": "revex", "sub_team": "certificates"}, 19 | {"team": "leadgen", "sub_team": "funnels"}, 20 | {"team": "leadgen", "sub_team": "launchpad"}, 21 | {"team": "leadgen", "sub_team": "forms"}, 22 | {"team": "leadgen", "sub_team": "surveys"}, 23 | {"team": "leadgen", "sub_team": "blogs"}, 24 | {"team": "leadgen", "sub_team": "emails"}, 25 | {"team": "leadgen", "sub_team": "onboarding"}, 26 | {"team": "leadgen", "sub_team": "payments"}, 27 | {"team": "leadgen", "sub_team": "payment-products"}, 28 | {"team": "leadgen", "sub_team": "proposals"}, 29 | {"team": "leadgen", "sub_team": "social-planner"}, 30 | {"team": "leadgen", "sub_team": "media-library"}, 31 | {"team": "leadgen", "sub_team": "templates"}, 32 | {"team": "crm", "sub_team": "contacts"}, 33 | {"team": "crm", "sub_team": "conversations"}, 34 | {"team": "crm", "sub_team": "marketplace"}, 35 | {"team": "crm", "sub_team": "conversations-ai"}, 36 | {"team": "crm", "sub_team": "voice-ai"}, 37 | {"team": "crm", "sub_team": "bulk-actions"}, 38 | {"team": "crm", "sub_team": "custom-objects"}, 39 | {"team": "crm", "sub_team": "opportunities"}, 40 | {"team": "crm", "sub_team": "integrations"}, 41 | {"team": "crm", "sub_team": "marketplace-modules"}, 42 | {"team": "automation", "sub_team": "reporting"}, 43 | {"team": "automation", "sub_team": "calendars"}, 44 | {"team": "automation", "sub_team": "workflows"}, 45 | {"team": "automation", "sub_team": "ad-publishing"}, 46 | {"team": "automation", "sub_team": "users"}, 47 | {"team": "ai", "sub_team": "voice"}, 48 | {"team": "ai", "sub_team": "text"} 49 | ] 50 | -------------------------------------------------------------------------------- /docs/webhook events/RecordDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Delete Record 6 | 7 | ## Overview 8 | The `Delete Record` is triggered whenever a record or business (company) is deleted from the system. 9 | 10 | ## Schema 11 | The webhook payload follows a structured JSON schema, which defines the format and expected data types of the event payload. 12 | 13 | ```json json_schema 14 | { 15 | "type": "object", 16 | "properties": { 17 | "type": { 18 | "type": "string" 19 | }, 20 | "locationId": { 21 | "type": "string" 22 | }, 23 | "owners": { 24 | "type": "array", 25 | "items": { 26 | "type": "string" 27 | } 28 | }, 29 | "followers": { 30 | "type": "array", 31 | "items": { 32 | "type": "string" 33 | } 34 | }, 35 | "properties": { 36 | "type": "array", 37 | "items": { 38 | "type": "object", 39 | "properties": { 40 | "key": { 41 | "type": "string" 42 | }, 43 | "valueString": { 44 | "type": "string" 45 | } 46 | } 47 | } 48 | }, 49 | "id": { 50 | "type": "string" 51 | }, 52 | "timestamp": { 53 | "type": "string", 54 | "format": "date-time" 55 | } 56 | } 57 | } 58 | ``` 59 | 60 | ## Explanation of Fields 61 | 62 | | Field | Type | Description | 63 | |-------------|----------|-------------| 64 | | `type` | `string` | The type of event. | 65 | | `locationId` | `string` | Unique identifier for the location associated with the deleted record. | 66 | | `owners` | `array of strings` | List of user IDs that were assigned as owners of the deleted record. | 67 | | `followers` | `array of strings` | List of user IDs that were following the deleted record. | 68 | | `properties` | `array of objects` | Key-value pairs containing additional metadata about the record. | 69 | | `id` | `string` | Unique identifier of the deleted record. | 70 | | `timestamp` | `string (ISO 8601 format)` | The timestamp when the deletion event occurred. | 71 | 72 | ## Example Payload 73 | 74 | ```json 75 | { 76 | "id": "679b8f9bde6a0c356a0311b3", 77 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P", 78 | "timestamp": "2025-02-10T08:26:05.961Z", 79 | "owners": ["60d5ec49f72b2a001f5f9d91"], 80 | "followers": ["60d5ec49f72b2a001f5f9d93", "60d5ec49f72b2a001f5f9d94"], 81 | "properties": [ 82 | { 83 | "key": "pet_name", 84 | "valueString": "buddy" 85 | } 86 | ] 87 | } 88 | ``` 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /docs/webhook events/RelationDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Response] 3 | --- 4 | 5 | # Relation Delete 6 | 7 | ## Overview 8 | 9 | This webhook response is triggered when an existing relation between objects is deleted. 10 | 11 | For example, in a business management system, a company may want to remove an relation between a custom object record and a contact. In this case: 12 | - The **first object** (custom object record) could represent an entity such as a project or a transaction. 13 | - The **second object** (contact) would represent a person associated with the custom object. 14 | 15 | 16 | ## Schema 17 | 18 | The webhook response follows the JSON schema below: 19 | 20 | ```json json_schema 21 | { 22 | "type": "object", 23 | "properties": { 24 | "id": { 25 | "type": "string" 26 | }, 27 | "firstObjectKey": { 28 | "type": "string" 29 | }, 30 | "firstRecordId": { 31 | "type": "string" 32 | }, 33 | "secondObjectKey": { 34 | "type": "string" 35 | }, 36 | "secondRecordId": { 37 | "type": "string" 38 | }, 39 | "associationId": { 40 | "type": "string" 41 | }, 42 | "locationId": { 43 | "type": "string" 44 | }, 45 | 46 | } 47 | } 48 | ``` 49 | 50 | ## Field Descriptions 51 | 52 | ### `id` 53 | - Type: `string` 54 | - Unique identifier for the deleted association. 55 | 56 | ### `firstObjectKey` 57 | - Type: `string` 58 | - Key representing the first object in the association. 59 | 60 | ### `firstRecordId` 61 | - Type: `string` 62 | - Identifier of the first object’s specific record. 63 | 64 | ### `secondObjectKey` 65 | - Type: `string` 66 | - Key representing the second object in the association. 67 | 68 | ### `secondRecordId` 69 | - Type: `string` 70 | - Identifier of the second object’s specific record. 71 | 72 | ### `associationId` 73 | - Type: `string` 74 | - Unique identifier for the association that was deleted. 75 | 76 | ### `locationId` 77 | - Type: `string` 78 | - Identifies the location associated with the deleted association. 79 | 80 | 81 | ## Example Response 82 | 83 | ```json 84 | { 85 | "id": "67ae0d741119d218c9d0c477", 86 | "firstObjectKey": "custom_objects.mad", 87 | "firstRecordId": "67a349a79b28947ec1f65bb5", 88 | "secondObjectKey": "contact", 89 | "secondRecordId": "emqfhnG3g9D9chy9inTz", 90 | "associationId": "669e5795add2094075906c65", 91 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P" 92 | } 93 | ``` 94 | 95 | ## Additional Notes 96 | 97 | - The `firstObjectKey` and `secondObjectKey` define the relationship between the deleted entities. 98 | 99 | -------------------------------------------------------------------------------- /docs/webhook events/AppointmentCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Appointment 6 | 7 | Called whenever an appointment is created 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "appointment": { 22 | "type": "object", 23 | "properties": { 24 | "id": { 25 | "type": "string" 26 | }, 27 | "address": { 28 | "type": "string" 29 | }, 30 | "title": { 31 | "type": "string" 32 | }, 33 | "calendarId": { 34 | "type": "string" 35 | }, 36 | "contactId": { 37 | "type": "string" 38 | }, 39 | "groupId": { 40 | "type": "string" 41 | }, 42 | "appointmentStatus": { 43 | "type": "string" 44 | }, 45 | "assignedUserId": { 46 | "type": "string" 47 | }, 48 | "users": { 49 | "type": "array" 50 | }, 51 | "notes": { 52 | "type": "string" 53 | }, 54 | "source": { 55 | "type": "string" 56 | }, 57 | "startTime": { 58 | "type": "string" 59 | }, 60 | "endTime": { 61 | "type": "string" 62 | }, 63 | "dateAdded": { 64 | "type": "string" 65 | }, 66 | "dateUpdated": { 67 | "type": "string" 68 | } 69 | } 70 | } 71 | } 72 | } 73 | ``` 74 | 75 | #### Example 76 | 77 | ```json 78 | { 79 | "type": "AppointmentCreate", 80 | "locationId": "0007BWpSzSwfiuSl0tR2", 81 | "appointment": { 82 | "id": "0007BWpSzSwfiuSl0tR2", 83 | "address": "https://example.com/meeting", 84 | "title": "Appointment with GHL Dev team", 85 | "calendarId": "BqTwX8QFwXzpegMve9EQ", 86 | "contactId": "9NkT25Vor1v4aQatFsv2", 87 | "groupId": "9NkT25Vor1v4aQatFsv2", 88 | "appointmentStatus": "confirmed", 89 | "assignedUserId": "YlWd2wuCAZQzh2cH1fVZ", 90 | "users": [ 91 | "YlWd2wuCAZQzh2cH1fVZ", 92 | "9NkT25Vor1v4aQatFsv2" 93 | ], 94 | "notes": "Some dummy note", 95 | "source": "booking_widget", 96 | "startTime": "2023-09-25T16:00:00+05:30", 97 | "endTime": "2023-09-25T16:00:00+05:30", 98 | "dateAdded": "2023-09-25T16:00:00+05:30", 99 | "dateUpdated": "2023-09-25T16:00:00+05:30" 100 | } 101 | } 102 | ``` -------------------------------------------------------------------------------- /docs/webhook events/AppointmentDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Appointment 6 | 7 | Called whenever an appointment is deleted 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "appointment": { 22 | "type": "object", 23 | "properties": { 24 | "id": { 25 | "type": "string" 26 | }, 27 | "address": { 28 | "type": "string" 29 | }, 30 | "title": { 31 | "type": "string" 32 | }, 33 | "calendarId": { 34 | "type": "string" 35 | }, 36 | "contactId": { 37 | "type": "string" 38 | }, 39 | "groupId": { 40 | "type": "string" 41 | }, 42 | "appointmentStatus": { 43 | "type": "string" 44 | }, 45 | "assignedUserId": { 46 | "type": "string" 47 | }, 48 | "users": { 49 | "type": "array" 50 | }, 51 | "notes": { 52 | "type": "string" 53 | }, 54 | "source": { 55 | "type": "string" 56 | }, 57 | "startTime": { 58 | "type": "string" 59 | }, 60 | "endTime": { 61 | "type": "string" 62 | }, 63 | "dateAdded": { 64 | "type": "string" 65 | }, 66 | "dateUpdated": { 67 | "type": "string" 68 | } 69 | } 70 | } 71 | } 72 | } 73 | ``` 74 | 75 | #### Example 76 | 77 | ```json 78 | { 79 | "type": "AppointmentCreate", 80 | "locationId": "0007BWpSzSwfiuSl0tR2", 81 | "appointment": { 82 | "id": "0007BWpSzSwfiuSl0tR2", 83 | "address": "https://example.com/meeting", 84 | "title": "Appointment with GHL Dev team", 85 | "calendarId": "BqTwX8QFwXzpegMve9EQ", 86 | "contactId": "9NkT25Vor1v4aQatFsv2", 87 | "groupId": "9NkT25Vor1v4aQatFsv2", 88 | "appointmentStatus": "confirmed", 89 | "assignedUserId": "YlWd2wuCAZQzh2cH1fVZ", 90 | "users": [ 91 | "YlWd2wuCAZQzh2cH1fVZ", 92 | "9NkT25Vor1v4aQatFsv2" 93 | ], 94 | "notes": "Some dummy note", 95 | "source": "booking_widget", 96 | "startTime": "2023-09-25T16:00:00+05:30", 97 | "endTime": "2023-09-25T16:00:00+05:30", 98 | "dateAdded": "2023-09-25T16:00:00+05:30", 99 | "dateUpdated": "2023-09-25T16:00:00+05:30" 100 | } 101 | } 102 | ``` -------------------------------------------------------------------------------- /docs/webhook events/AppointmentUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Appointment 6 | 7 | Called whenever an appointment is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "appointment": { 22 | "type": "object", 23 | "properties": { 24 | "id": { 25 | "type": "string" 26 | }, 27 | "address": { 28 | "type": "string" 29 | }, 30 | "title": { 31 | "type": "string" 32 | }, 33 | "calendarId": { 34 | "type": "string" 35 | }, 36 | "contactId": { 37 | "type": "string" 38 | }, 39 | "groupId": { 40 | "type": "string" 41 | }, 42 | "appointmentStatus": { 43 | "type": "string" 44 | }, 45 | "assignedUserId": { 46 | "type": "string" 47 | }, 48 | "users": { 49 | "type": "array" 50 | }, 51 | "notes": { 52 | "type": "string" 53 | }, 54 | "source": { 55 | "type": "string" 56 | }, 57 | "startTime": { 58 | "type": "string" 59 | }, 60 | "endTime": { 61 | "type": "string" 62 | }, 63 | "dateAdded": { 64 | "type": "string" 65 | }, 66 | "dateUpdated": { 67 | "type": "string" 68 | } 69 | } 70 | } 71 | } 72 | } 73 | ``` 74 | 75 | #### Example 76 | 77 | ```json 78 | { 79 | "type": "AppointmentCreate", 80 | "locationId": "0007BWpSzSwfiuSl0tR2", 81 | "appointment": { 82 | "id": "0007BWpSzSwfiuSl0tR2", 83 | "address": "https://example.com/meeting", 84 | "title": "Appointment with GHL Dev team", 85 | "calendarId": "BqTwX8QFwXzpegMve9EQ", 86 | "contactId": "9NkT25Vor1v4aQatFsv2", 87 | "groupId": "9NkT25Vor1v4aQatFsv2", 88 | "appointmentStatus": "confirmed", 89 | "assignedUserId": "YlWd2wuCAZQzh2cH1fVZ", 90 | "users": [ 91 | "YlWd2wuCAZQzh2cH1fVZ", 92 | "9NkT25Vor1v4aQatFsv2" 93 | ], 94 | "notes": "Some dummy note", 95 | "source": "booking_widget", 96 | "startTime": "2023-09-25T16:00:00+05:30", 97 | "endTime": "2023-09-25T16:00:00+05:30", 98 | "dateAdded": "2023-09-25T16:00:00+05:30", 99 | "dateUpdated": "2023-09-25T16:00:00+05:30" 100 | } 101 | } 102 | ``` -------------------------------------------------------------------------------- /docs/webhook events/RelationCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Response] 3 | --- 4 | 5 | # Relation Create 6 | 7 | ## Overview 8 | 9 | This webhook response is triggered when an relation between objects is created. 10 | 11 | For example, in a business management system, a company may want to establish an association between a custom object record and a contact. In this case: 12 | - The **second object** (contact) would represent a person associated with the custom object record. 13 | - The **first object** (custom object) could represent an entity such as a project or a transaction. 14 | - The system allows for dynamic relationships between entities, facilitating better data management. 15 | 16 | ## Schema 17 | 18 | The webhook response follows the JSON schema below: 19 | 20 | ```json json_schema 21 | { 22 | "type": "object", 23 | "properties": { 24 | "id": { 25 | "type": "string" 26 | }, 27 | "firstObjectKey": { 28 | "type": "string" 29 | }, 30 | "firstRecordId": { 31 | "type": "string" 32 | }, 33 | "secondObjectKey": { 34 | "type": "string" 35 | }, 36 | "secondRecordId": { 37 | "type": "string" 38 | }, 39 | "associationId": { 40 | "type": "string" 41 | }, 42 | "locationId": { 43 | "type": "string" 44 | } 45 | } 46 | } 47 | ``` 48 | 49 | ## Field Descriptions 50 | 51 | ### `id` 52 | - Type: `string` 53 | - Unique identifier for the created association. 54 | 55 | ### `firstObjectKey` 56 | - Type: `string` 57 | - Key representing the first object in the association. 58 | 59 | ### `firstRecordId` 60 | - Type: `string` 61 | - Identifier of the first object’s specific record. 62 | 63 | ### `secondObjectKey` 64 | - Type: `string` 65 | - Key representing the second object in the association. 66 | 67 | ### `secondRecordId` 68 | - Type: `string` 69 | - Identifier of the second object’s specific record. 70 | 71 | ### `associationId` 72 | - Type: `string` 73 | - Unique identifier for the association that was created. 74 | 75 | ### `locationId` 76 | - Type: `string` 77 | - Identifies the location associated with the created association. 78 | 79 | 80 | ## Example Response 81 | 82 | ```json 83 | { 84 | "id": "67ae0d741119d218c9d0c477", 85 | "firstObjectKey": "custom_objects.mad", 86 | "firstRecordId": "67a349a79b28947ec1f65bb5", 87 | "secondObjectKey": "contact", 88 | "secondRecordId": "emqfhnG3g9D9chy9inTz", 89 | "associationId": "669e5795add2094075906c65", 90 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P" 91 | } 92 | ``` 93 | 94 | ## Additional Notes 95 | 96 | - The `firstObjectKey` and `secondObjectKey` define the relationship between the created entities. 97 | -------------------------------------------------------------------------------- /docs/webhook events/ProviderOutboundMessage.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Conversation Provider - Outbound Message 6 | 7 | Called whenever a user sends a message to a contact and has a custom provider as the default channel in the settings. 8 | 9 | > Conversation Provider - Outbound Message differs from the structure of our other webhooks which may appear similar upon first glance however, the documentation below is accurate and only what is listed will be necessary for a successful execution. 10 | 11 | | Channel | Supported Modules | 12 | | ------- | -------------------------------------------- | 13 | | SMS | Web App, Mobile App, Workflows, Bulk Actions | 14 | | Email | Web App, Mobile App, Workflows, Bulk Actions | 15 | 16 | #### Schema 17 | 18 | ```json json_schema 19 | { 20 | "type": "object", 21 | "properties": { 22 | "contactId": { 23 | "type": "string" 24 | }, 25 | "locationId": { 26 | "type": "string" 27 | }, 28 | "messageId": { 29 | "type": "string" 30 | }, 31 | "emailMessageId": { 32 | "type": "string" 33 | }, 34 | "type": { 35 | "type": "Email/SMS" 36 | }, 37 | "attachments": { 38 | "type": "array" 39 | }, 40 | "message": { 41 | "type": "string" 42 | }, 43 | "phone": { 44 | "type": "string" 45 | }, 46 | "emailTo": { 47 | "type": "string" 48 | }, 49 | "emailFrom": { 50 | "type": "string" 51 | }, 52 | "html": { 53 | "type": "string" 54 | }, 55 | "subject": { 56 | "type": "string" 57 | }, 58 | "userId": { 59 | "type": "string" 60 | } 61 | } 62 | } 63 | ``` 64 | 65 | #### Example for SMS 66 | 67 | ```json 68 | { 69 | "contactId": "GKBhT6BfwY9mjzXAU3sq", 70 | "locationId": "GKAWb4yu7A4LSc0skQ6g", 71 | "messageId": "GKJxs4P5L8dWc5CFUITM", 72 | "type": "SMS", 73 | "phone": "+15864603685", 74 | "message": "The text message to be sent to the contact", 75 | "attachments": ["https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"], 76 | "userId": "GK56r6wdJDrkUPd0xsmx" 77 | } 78 | ``` 79 | 80 | #### Example for Email 81 | 82 | ```json 83 | { 84 | "contactId": "GKKFF0QB9gV8fGA6zEbr", 85 | "locationId": "GKifVDyQeo7nwe27vMP0", 86 | "messageId": "GK56r6wdJDrkUPd0xsmx", 87 | "emailMessageId": "GK56r6wdJDrkUPd0xsmx", 88 | "type": "Email", 89 | "emailTo": ["abc@gmail.com"], 90 | "emailFrom": "From Name ", 91 | "attachments": ["https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"], 92 | "html": "

Testing an outobund email from custom provider.

", 93 | "subject": "Subject from Conversation Page", 94 | "userId": "GK56r6wdJDrkUPd0xsmx" 95 | } 96 | ``` 97 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to GoHighLevel API V2 Docs 2 | 3 | Thank you for your interest in contributing! We welcome suggestions, improvements, and fixes that help enhance the GoHighLevel developer experience. 4 | 5 | This guide outlines how you can get started and what we expect from contributors. 6 | 7 | --- 8 | 9 | ## 🚀 How to Contribute 10 | 11 | 1. **Fork the Repository** 12 | Click the **Fork** button at the top right to create your own copy of this repository. 13 | 14 | 2. **Clone Your Fork Locally** 15 | Clone your fork using the following commands: 16 | 17 | ```bash 18 | git clone https://github.com/YOUR-USERNAME/api-v2-docs.git 19 | cd api-v2-docs 20 | ``` 21 | 22 | 3. **Create a New Branch** 23 | Create a feature branch to work on: 24 | 25 | ```bash 26 | git checkout -b feature/your-feature-name 27 | ``` 28 | 29 | 4. **Make Your Changes** 30 | Edit the documentation using clear and consistent Markdown. Follow the formatting and structure used in existing files. 31 | 32 | 5. **Commit Your Changes** 33 | Commit your changes with a descriptive message: 34 | 35 | ```bash 36 | git commit -m "Update: Brief description of your changes" 37 | ``` 38 | 39 | 6. **Push to Your Fork** 40 | Push the branch to your GitHub fork: 41 | 42 | ```bash 43 | git push origin feature/your-feature-name 44 | ``` 45 | 46 | 7. **Open a Pull Request** 47 | - Go to the original repo: [GoHighLevel/api-v2-docs](https://github.com/GoHighLevel/api-v2-docs) 48 | - Click **“Compare & pull request”** 49 | - Describe your changes clearly and concisely 50 | - Submit the pull request for review 51 | 52 | --- 53 | 54 | ## ✍️ Documentation Guidelines 55 | 56 | When contributing new documentation or improving existing content, please: 57 | 58 | - Use clear, concise language 59 | - Format your contributions in Markdown 60 | - Match the tone and structure of the existing documentation 61 | - When documenting API endpoints, include: 62 | - Endpoint path and HTTP method 63 | - Authentication requirements 64 | - Request parameters and example body 65 | - Example responses 66 | - Common error codes and descriptions 67 | 68 | --- 69 | 70 | ## ✅ Before You Submit 71 | 72 | Please make sure that: 73 | 74 | - [ ] Your changes follow the existing file structure and style 75 | - [ ] You’ve tested that Markdown renders correctly 76 | - [ ] You’ve proofread for grammar, clarity, and formatting 77 | - [ ] You’ve linked any related GitHub issues (if applicable) 78 | 79 | --- 80 | 81 | ## 🧠 Questions or Support 82 | 83 | If you’re not sure how or where to contribute: 84 | 85 | - Open a [GitHub issue](https://github.com/GoHighLevel/api-v2-docs/issues) 86 | - Ask in the [HighLevel Community](https://www.facebook.com/groups/gohighlevel) 87 | 88 | We’re excited to collaborate with you—thanks for helping improve our documentation! 89 | -------------------------------------------------------------------------------- /docs/webhook events/PriceDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Price 6 | 7 | Called whenever a price is deleted 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "membershipOffers": { 19 | "type": "array", 20 | "items": { 21 | "type": "object", 22 | "properties": { 23 | "label": { 24 | "type": "string" 25 | }, 26 | "value": { 27 | "type": "string" 28 | }, 29 | "_id": { 30 | "type": "string" 31 | } 32 | } 33 | } 34 | }, 35 | "variantOptionIds": { 36 | "type": "array", 37 | "items": { 38 | "type": "string" 39 | } 40 | }, 41 | "locationId": { 42 | "type": "string" 43 | }, 44 | "product": { 45 | "type": "string" 46 | }, 47 | "userId": { 48 | "type": "string" 49 | }, 50 | "name": { 51 | "type": "string" 52 | }, 53 | "type": { 54 | "type": "string" 55 | }, 56 | "currency": { 57 | "type": "string" 58 | }, 59 | "amount": { 60 | "type": "number" 61 | }, 62 | "recurring": { 63 | "type": "object", 64 | "properties": { 65 | "interval": { 66 | "type": "string" 67 | }, 68 | "intervalCount": { 69 | "type": "number" 70 | } 71 | } 72 | }, 73 | "createdAt": { 74 | "type": "string" 75 | }, 76 | "updatedAt": { 77 | "type": "string" 78 | }, 79 | "compareAtPrice": { 80 | "type": "number" 81 | }, 82 | "trackInventory": { 83 | "type": "null" 84 | }, 85 | "availableQuantity": { 86 | "type": "number" 87 | }, 88 | "allowOutOfStockPurchases": { 89 | "type": "boolean" 90 | } 91 | } 92 | } 93 | ``` 94 | 95 | #### Example 96 | 97 | ```json{ 98 | "_id": "655b33aa2209e60b6adb87a7", 99 | "membershipOffers": [ 100 | { 101 | "label": "top_50", 102 | "value": "50", 103 | "_id": "655b33aa2209e60b6adb87a7" 104 | } 105 | ], 106 | "variantOptionIds": [ 107 | "h4z7u0im2q8", 108 | "h3nst2ltsnn" 109 | ], 110 | "locationId": "3SwdhCsvxI8Au3KsPJt6", 111 | "product": "655b33a82209e60b6adb87a5", 112 | "userId": "6YAtzfzpmHAdj0e8GkKp", 113 | "name": "Red / S", 114 | "type": "one_time", 115 | "currency": "INR", 116 | "amount": 199999, 117 | "recurring": { 118 | "interval": "day", 119 | "intervalCount": 1 120 | }, 121 | "createdAt": "2023-11-20T10:23:38.645Z", 122 | "updatedAt": "2024-01-23T09:57:04.852Z", 123 | "compareAtPrice": 2000000, 124 | "trackInventory": null, 125 | "availableQuantity": 5, 126 | "allowOutOfStockPurchases": true 127 | } 128 | ``` 129 | -------------------------------------------------------------------------------- /docs/webhook events/PriceUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Price 6 | 7 | Called whenever a price is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "membershipOffers": { 19 | "type": "array", 20 | "items": { 21 | "type": "object", 22 | "properties": { 23 | "label": { 24 | "type": "string" 25 | }, 26 | "value": { 27 | "type": "string" 28 | }, 29 | "_id": { 30 | "type": "string" 31 | } 32 | } 33 | } 34 | }, 35 | "variantOptionIds": { 36 | "type": "array", 37 | "items": { 38 | "type": "string" 39 | } 40 | }, 41 | "locationId": { 42 | "type": "string" 43 | }, 44 | "product": { 45 | "type": "string" 46 | }, 47 | "userId": { 48 | "type": "string" 49 | }, 50 | "name": { 51 | "type": "string" 52 | }, 53 | "type": { 54 | "type": "string" 55 | }, 56 | "currency": { 57 | "type": "string" 58 | }, 59 | "amount": { 60 | "type": "number" 61 | }, 62 | "recurring": { 63 | "type": "object", 64 | "properties": { 65 | "interval": { 66 | "type": "string" 67 | }, 68 | "intervalCount": { 69 | "type": "number" 70 | } 71 | } 72 | }, 73 | "createdAt": { 74 | "type": "string" 75 | }, 76 | "updatedAt": { 77 | "type": "string" 78 | }, 79 | "compareAtPrice": { 80 | "type": "number" 81 | }, 82 | "trackInventory": { 83 | "type": "null" 84 | }, 85 | "availableQuantity": { 86 | "type": "number" 87 | }, 88 | "allowOutOfStockPurchases": { 89 | "type": "boolean" 90 | } 91 | } 92 | } 93 | ``` 94 | 95 | #### Example 96 | 97 | ```json{ 98 | "_id": "655b33aa2209e60b6adb87a7", 99 | "membershipOffers": [ 100 | { 101 | "label": "top_50", 102 | "value": "50", 103 | "_id": "655b33aa2209e60b6adb87a7" 104 | } 105 | ], 106 | "variantOptionIds": [ 107 | "h4z7u0im2q8", 108 | "h3nst2ltsnn" 109 | ], 110 | "locationId": "3SwdhCsvxI8Au3KsPJt6", 111 | "product": "655b33a82209e60b6adb87a5", 112 | "userId": "6YAtzfzpmHAdj0e8GkKp", 113 | "name": "Red / S", 114 | "type": "one_time", 115 | "currency": "INR", 116 | "amount": 199999, 117 | "recurring": { 118 | "interval": "day", 119 | "intervalCount": 1 120 | }, 121 | "createdAt": "2023-11-20T10:23:38.645Z", 122 | "updatedAt": "2024-01-23T09:57:04.852Z", 123 | "compareAtPrice": 2000000, 124 | "trackInventory": null, 125 | "availableQuantity": 5, 126 | "allowOutOfStockPurchases": true 127 | } 128 | ``` 129 | -------------------------------------------------------------------------------- /docs/webhook events/PriceCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Price 6 | 7 | Called whenever a price is created 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "membershipOffers": { 19 | "type": "array", 20 | "items": { 21 | "type": "object", 22 | "properties": { 23 | "label": { 24 | "type": "string" 25 | }, 26 | "value": { 27 | "type": "string" 28 | }, 29 | "_id": { 30 | "type": "string" 31 | } 32 | } 33 | } 34 | }, 35 | "variantOptionIds": { 36 | "type": "array", 37 | "items": { 38 | "type": "string" 39 | } 40 | }, 41 | "locationId": { 42 | "type": "string" 43 | }, 44 | "product": { 45 | "type": "string" 46 | }, 47 | "userId": { 48 | "type": "string" 49 | }, 50 | "name": { 51 | "type": "string" 52 | }, 53 | "priceType": { 54 | "type": "string" 55 | }, 56 | "currency": { 57 | "type": "string" 58 | }, 59 | "amount": { 60 | "type": "number" 61 | }, 62 | "recurring": { 63 | "type": "object", 64 | "properties": { 65 | "interval": { 66 | "type": "string" 67 | }, 68 | "intervalCount": { 69 | "type": "number" 70 | } 71 | } 72 | }, 73 | "createdAt": { 74 | "type": "string" 75 | }, 76 | "updatedAt": { 77 | "type": "string" 78 | }, 79 | "compareAtPrice": { 80 | "type": "number" 81 | }, 82 | "trackInventory": { 83 | "type": "null" 84 | }, 85 | "availableQuantity": { 86 | "type": "number" 87 | }, 88 | "allowOutOfStockPurchases": { 89 | "type": "boolean" 90 | } 91 | } 92 | } 93 | ``` 94 | 95 | #### Example 96 | 97 | ```json{ 98 | "_id": "655b33aa2209e60b6adb87a7", 99 | "membershipOffers": [ 100 | { 101 | "label": "top_50", 102 | "value": "50", 103 | "_id": "655b33aa2209e60b6adb87a7" 104 | } 105 | ], 106 | "variantOptionIds": [ 107 | "h4z7u0im2q8", 108 | "h3nst2ltsnn" 109 | ], 110 | "locationId": "3SwdhCsvxI8Au3KsPJt6", 111 | "product": "655b33a82209e60b6adb87a5", 112 | "userId": "6YAtzfzpmHAdj0e8GkKp", 113 | "name": "Red / S", 114 | "priceType": "one_time", 115 | "currency": "INR", 116 | "amount": 199999, 117 | "recurring": { 118 | "interval": "day", 119 | "intervalCount": 1 120 | }, 121 | "createdAt": "2023-11-20T10:23:38.645Z", 122 | "updatedAt": "2024-01-23T09:57:04.852Z", 123 | "compareAtPrice": 2000000, 124 | "trackInventory": null, 125 | "availableQuantity": 5, 126 | "allowOutOfStockPurchases": true 127 | } 128 | ``` 129 | -------------------------------------------------------------------------------- /docs/webhook events/ContactCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Contact 6 | 7 | Called whenever a contact is created 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "address1": { 25 | "type": "string" 26 | }, 27 | "city": { 28 | "type": "string" 29 | }, 30 | "companyName": { 31 | "type": "string" 32 | }, 33 | "country": { 34 | "type": "string" 35 | }, 36 | "source": { 37 | "type": "string" 38 | }, 39 | "dateAdded": { 40 | "type": "string" 41 | }, 42 | "dateOfBirth": { 43 | "type": "string" 44 | }, 45 | "dnd": { 46 | "type": "boolean" 47 | }, 48 | "email": { 49 | "type": "string" 50 | }, 51 | "name": { 52 | "type": "string" 53 | }, 54 | "firstName": { 55 | "type": "string" 56 | }, 57 | "lastName": { 58 | "type": "string" 59 | }, 60 | "phone": { 61 | "type": "string" 62 | }, 63 | "postalCode": { 64 | "type": "string" 65 | }, 66 | "state": { 67 | "type": "string" 68 | }, 69 | "tags": { 70 | "type": "array" 71 | }, 72 | "website": { 73 | "type": "string" 74 | }, 75 | "attachments": { 76 | "type": "array" 77 | }, 78 | "assignedTo": { 79 | "type": "string" 80 | }, 81 | "customFields": { 82 | "type": "array", 83 | "items": { 84 | "type": "object", 85 | "properties": { 86 | "id": { 87 | "type": "string" 88 | }, 89 | "value": { 90 | "type": ["string", "number", "array", "object"] 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | ``` 98 | 99 | #### Example 100 | 101 | ```json 102 | { 103 | "type": "ContactCreate", 104 | "locationId": "ve9EPM428h8vShlRW1KT", 105 | "id": "nmFmQEsNgz6AVpgLVUJ0", 106 | "address1": "3535 1st St N", 107 | "city": "ruDolomitebika", 108 | "state": "AL", 109 | "companyName": "Loram ipsum", 110 | "country": "DE", 111 | "source": "xyz form", 112 | "dateAdded": "2021-11-26T12:41:02.193Z", 113 | "dateOfBirth": "2000-01-05T00:00:00.000Z", 114 | "dnd": true, 115 | "email": "JohnDeo@gmail.comm", 116 | "name": "John Deo", 117 | "firstName": "John", 118 | "lastName": "Deo", 119 | "phone": "+919509597501", 120 | "postalCode": "452001", 121 | "tags": ["id magna sed Lorem", "Duis dolor commodo aliqua"], 122 | "website": "https://www.google.com/", 123 | "attachments": [], 124 | "assignedTo": "nmFmQEsNgz6AVpgLVUJ0", 125 | "customFields": [ 126 | { 127 | "id": "BcdmQEsNgz6AVpgLVUJ0", 128 | "value": "XYZ Corp" 129 | } 130 | ] 131 | } 132 | ``` -------------------------------------------------------------------------------- /docs/webhook events/ContactDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Contact 6 | 7 | Called whenever a contact is deleted 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "address1": { 25 | "type": "string" 26 | }, 27 | "city": { 28 | "type": "string" 29 | }, 30 | "companyName": { 31 | "type": "string" 32 | }, 33 | "country": { 34 | "type": "string" 35 | }, 36 | "source": { 37 | "type": "string" 38 | }, 39 | "dateAdded": { 40 | "type": "string" 41 | }, 42 | "dateOfBirth": { 43 | "type": "string" 44 | }, 45 | "dnd": { 46 | "type": "boolean" 47 | }, 48 | "email": { 49 | "type": "string" 50 | }, 51 | "name": { 52 | "type": "string" 53 | }, 54 | "firstName": { 55 | "type": "string" 56 | }, 57 | "lastName": { 58 | "type": "string" 59 | }, 60 | "phone": { 61 | "type": "string" 62 | }, 63 | "postalCode": { 64 | "type": "string" 65 | }, 66 | "state": { 67 | "type": "string" 68 | }, 69 | "tags": { 70 | "type": "array" 71 | }, 72 | "website": { 73 | "type": "string" 74 | }, 75 | "attachments": { 76 | "type": "array" 77 | }, 78 | "assignedTo": { 79 | "type": "string" 80 | }, 81 | "customFields": { 82 | "type": "array", 83 | "items": { 84 | "type": "object", 85 | "properties": { 86 | "id": { 87 | "type": "string" 88 | }, 89 | "value": { 90 | "type": ["string", "number", "array", "object"] 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | ``` 98 | 99 | #### Example 100 | 101 | ```json 102 | { 103 | "type": "ContactDelete", 104 | "locationId": "ve9EPM428h8vShlRW1KT", 105 | "id": "nmFmQEsNgz6AVpgLVUJ0", 106 | "address1": "3535 1st St N", 107 | "city": "ruDolomitebika", 108 | "state": "AL", 109 | "companyName": "Loram ipsum", 110 | "country": "DE", 111 | "source": "xyz form", 112 | "dateAdded": "2021-11-26T12:41:02.193Z", 113 | "dateOfBirth": "2000-01-05T00:00:00.000Z", 114 | "dnd": true, 115 | "email": "JohnDeo@gmail.comm", 116 | "name": "John Deo", 117 | "firstName": "John", 118 | "lastName": "Deo", 119 | "phone": "+919509597501", 120 | "postalCode": "452001", 121 | "tags": ["id magna sed Lorem", "Duis dolor commodo aliqua"], 122 | "website": "https://www.google.com/", 123 | "attachments": [], 124 | "assignedTo": "nmFmQEsNgz6AVpgLVUJ0", 125 | "customFields": [ 126 | { 127 | "id": "BcdmQEsNgz6AVpgLVUJ0", 128 | "value": "XYZ Corp" 129 | } 130 | ] 131 | } 132 | ``` -------------------------------------------------------------------------------- /docs/webhook events/RecordUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Response] 3 | --- 4 | 5 | # Record Update 6 | 7 | ## Overview 8 | 9 | This webhook response is triggered when a record or business is updated. 10 | ## Schema 11 | 12 | The webhook response follows the JSON schema below: 13 | 14 | ```json json_schema 15 | { 16 | "type": "object", 17 | "properties": { 18 | "type": { 19 | "type": "string" 20 | }, 21 | "locationId": { 22 | "type": "string" 23 | }, 24 | "owners": { 25 | "type": "array", 26 | "items": { 27 | "type": "string" 28 | } 29 | }, 30 | "followers": { 31 | "type": "array", 32 | "items": { 33 | "type": "string" 34 | } 35 | }, 36 | "properties": { 37 | "type": "array", 38 | "items": { 39 | "type": "object", 40 | "properties": { 41 | "key": { 42 | "type": "string" 43 | }, 44 | "valueString": { 45 | "type": "string" 46 | } 47 | } 48 | } 49 | }, 50 | "id": { 51 | "type": "string" 52 | }, 53 | "timestamp": { 54 | "type": "string", 55 | "format": "date-time" 56 | } 57 | } 58 | } 59 | ``` 60 | 61 | ## Field Descriptions 62 | 63 | ### `type` 64 | - Type: `string` 65 | - Indicates the type of record created. 66 | 67 | ### `locationId` 68 | - Type: `string` 69 | - Identifies the location associated with the created record. 70 | 71 | ### `owners` 72 | - Type: `array of strings` 73 | - Represents the unique identifiers of users who own the record. 74 | 75 | ### `followers` 76 | - Type: `array of strings` 77 | - List of users who are following the record for updates. 78 | 79 | ### `properties` 80 | - Type: `array of objects` 81 | - Contains key-value pairs representing additional details about the record. 82 | - **`key`**: The property name. 83 | - **`valueString`**: The corresponding value as a string. 84 | 85 | ### `id` 86 | - Type: `string` 87 | - Unique identifier for the created record. 88 | 89 | ### `timestamp` 90 | - Type: `string` 91 | - Format: `date-time` 92 | - Represents the date and time when the record was created. 93 | 94 | ## Example Response 95 | 96 | ```json 97 | { 98 | "id": "679b8f9bde6a0c356a0311b3", 99 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P", 100 | "timestamp": "2025-02-10T08:26:05.961Z", 101 | "owners": ["60d5ec49f72b2a001f5f9d91"], 102 | "followers": ["60d5ec49f72b2a001f5f9d93", "60d5ec49f72b2a001f5f9d94"], 103 | "properties": [ 104 | { 105 | "key": "pet_name", 106 | "valueString": "buddy" 107 | } 108 | ] 109 | } 110 | ``` 111 | 112 | ## Additional Notes 113 | 114 | - Ensure that your webhook listener is capable of processing `POST` requests. 115 | - The `owners` and `followers` fields help in managing record access and tracking. 116 | - The `properties` array allows extensibility by enabling dynamic field storage. 117 | 118 | --- 119 | -------------------------------------------------------------------------------- /docs/webhook events/ContactTagUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Contact 6 | 7 | Called whenever a contact's tag field is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "address1": { 25 | "type": "string" 26 | }, 27 | "city": { 28 | "type": "string" 29 | }, 30 | "companyName": { 31 | "type": "string" 32 | }, 33 | "country": { 34 | "type": "string" 35 | }, 36 | "source": { 37 | "type": "string" 38 | }, 39 | "dateAdded": { 40 | "type": "string" 41 | }, 42 | "dateOfBirth": { 43 | "type": "string" 44 | }, 45 | "dnd": { 46 | "type": "boolean" 47 | }, 48 | "email": { 49 | "type": "string" 50 | }, 51 | "name": { 52 | "type": "string" 53 | }, 54 | "firstName": { 55 | "type": "string" 56 | }, 57 | "lastName": { 58 | "type": "string" 59 | }, 60 | "phone": { 61 | "type": "string" 62 | }, 63 | "postalCode": { 64 | "type": "string" 65 | }, 66 | "state": { 67 | "type": "string" 68 | }, 69 | "tags": { 70 | "type": "array" 71 | }, 72 | "website": { 73 | "type": "string" 74 | }, 75 | "attachments": { 76 | "type": "array" 77 | }, 78 | "assignedTo": { 79 | "type": "string" 80 | }, 81 | "customFields": { 82 | "type": "array", 83 | "items": { 84 | "type": "object", 85 | "properties": { 86 | "id": { 87 | "type": "string" 88 | }, 89 | "value": { 90 | "type": ["string", "number", "array", "object"] 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | ``` 98 | 99 | #### Example 100 | 101 | ```json 102 | { 103 | "type": "ContactTagUpdate", 104 | "locationId": "ve9EPM428h8vShlRW1KT", 105 | "id": "nmFmQEsNgz6AVpgLVUJ0", 106 | "address1": "3535 1st St N", 107 | "city": "ruDolomitebika", 108 | "state": "AL", 109 | "companyName": "Loram ipsum", 110 | "country": "DE", 111 | "source": "xyz form", 112 | "dateAdded": "2021-11-26T12:41:02.193Z", 113 | "dateOfBirth": "2000-01-05T00:00:00.000Z", 114 | "dnd": true, 115 | "email": "JohnDeo@gmail.comm", 116 | "name": "John Deo", 117 | "firstName": "John", 118 | "lastName": "Deo", 119 | "phone": "+919509597501", 120 | "postalCode": "452001", 121 | "tags": ["id magna sed Lorem", "Duis dolor commodo aliqua"], 122 | "website": "https://www.google.com/", 123 | "attachments": [], 124 | "assignedTo": "nmFmQEsNgz6AVpgLVUJ0", 125 | "customFields": [ 126 | { 127 | "id": "BcdmQEsNgz6AVpgLVUJ0", 128 | "value": "XYZ Corp" 129 | } 130 | ] 131 | } 132 | ``` -------------------------------------------------------------------------------- /docs/webhook events/ContactUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Contact 6 | 7 | Called whenever the specific fields in contact is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "address1": { 25 | "type": "string" 26 | }, 27 | "city": { 28 | "type": "string" 29 | }, 30 | "companyName": { 31 | "type": "string" 32 | }, 33 | "country": { 34 | "type": "string" 35 | }, 36 | "source": { 37 | "type": "string" 38 | }, 39 | "dateAdded": { 40 | "type": "string" 41 | }, 42 | "dateOfBirth": { 43 | "type": "string" 44 | }, 45 | "dnd": { 46 | "type": "boolean" 47 | }, 48 | "email": { 49 | "type": "string" 50 | }, 51 | "name": { 52 | "type": "string" 53 | }, 54 | "firstName": { 55 | "type": "string" 56 | }, 57 | "lastName": { 58 | "type": "string" 59 | }, 60 | "phone": { 61 | "type": "string" 62 | }, 63 | "postalCode": { 64 | "type": "string" 65 | }, 66 | "state": { 67 | "type": "string" 68 | }, 69 | "tags": { 70 | "type": "array" 71 | }, 72 | "website": { 73 | "type": "string" 74 | }, 75 | "attachments": { 76 | "type": "array" 77 | }, 78 | "assignedTo": { 79 | "type": "string" 80 | }, 81 | "customFields": { 82 | "type": "array", 83 | "items": { 84 | "type": "object", 85 | "properties": { 86 | "id": { 87 | "type": "string" 88 | }, 89 | "value": { 90 | "type": ["string", "number", "array", "object"] 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | ``` 98 | 99 | #### Example 100 | 101 | ```json 102 | { 103 | "type": "ContactUpdate", 104 | "locationId": "ve9EPM428h8vShlRW1KT", 105 | "id": "nmFmQEsNgz6AVpgLVUJ0", 106 | "address1": "3535 1st St N", 107 | "city": "ruDolomitebika", 108 | "state": "AL", 109 | "companyName": "Loram ipsum", 110 | "country": "DE", 111 | "source": "xyz form", 112 | "dateAdded": "2021-11-26T12:41:02.193Z", 113 | "dateOfBirth": "2000-01-05T00:00:00.000Z", 114 | "dnd": true, 115 | "email": "JohnDeo@gmail.comm", 116 | "name": "John Deo", 117 | "firstName": "John", 118 | "lastName": "Deo", 119 | "phone": "+919509597501", 120 | "postalCode": "452001", 121 | "tags": ["id magna sed Lorem", "Duis dolor commodo aliqua"], 122 | "website": "https://www.google.com/", 123 | "attachments": [], 124 | "assignedTo": "nmFmQEsNgz6AVpgLVUJ0", 125 | "customFields": [ 126 | { 127 | "id": "BcdmQEsNgz6AVpgLVUJ0", 128 | "value": "XYZ Corp" 129 | } 130 | ] 131 | } 132 | ``` -------------------------------------------------------------------------------- /docs/webhook events/RecordCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Response] 3 | --- 4 | 5 | # Record Create 6 | 7 | ## Overview 8 | 9 | This webhook response is triggered when a new record or business is created. 10 | 11 | ## Schema 12 | 13 | The webhook response follows the JSON schema below: 14 | 15 | ```json json_schema 16 | { 17 | "type": "object", 18 | "properties": { 19 | "type": { 20 | "type": "string" 21 | }, 22 | "locationId": { 23 | "type": "string" 24 | }, 25 | "owners": { 26 | "type": "array", 27 | "items": { 28 | "type": "string" 29 | } 30 | }, 31 | "followers": { 32 | "type": "array", 33 | "items": { 34 | "type": "string" 35 | } 36 | }, 37 | "properties": { 38 | "type": "array", 39 | "items": { 40 | "type": "object", 41 | "properties": { 42 | "key": { 43 | "type": "string" 44 | }, 45 | "valueString": { 46 | "type": "string" 47 | } 48 | } 49 | } 50 | }, 51 | "id": { 52 | "type": "string" 53 | }, 54 | "timestamp": { 55 | "type": "string", 56 | "format": "date-time" 57 | } 58 | } 59 | } 60 | ``` 61 | 62 | ## Field Descriptions 63 | 64 | ### `type` 65 | - Type: `string` 66 | - Indicates the type of record created. 67 | 68 | ### `locationId` 69 | - Type: `string` 70 | - Identifies the location associated with the created record. 71 | 72 | ### `owners` 73 | - Type: `array of strings` 74 | - Represents the unique identifiers of users who own the record. 75 | 76 | ### `followers` 77 | - Type: `array of strings` 78 | - List of users who are following the record for updates. 79 | 80 | ### `properties` 81 | - Type: `array of objects` 82 | - Contains key-value pairs representing additional details about the record. 83 | - **`key`**: The property name. 84 | - **`valueString`**: The corresponding value as a string. 85 | 86 | ### `id` 87 | - Type: `string` 88 | - Unique identifier for the created record. 89 | 90 | ### `timestamp` 91 | - Type: `string` 92 | - Format: `date-time` 93 | - Represents the date and time when the record was created. 94 | 95 | ## Example Response 96 | 97 | ```json 98 | { 99 | "id": "679b8f9bde6a0c356a0311b3", 100 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P", 101 | "timestamp": "2025-02-10T08:26:05.961Z", 102 | "owners": ["60d5ec49f72b2a001f5f9d91"], 103 | "followers": ["60d5ec49f72b2a001f5f9d93", "60d5ec49f72b2a001f5f9d94"], 104 | "properties": [ 105 | { 106 | "key": "pet_name", 107 | "valueString": "buddy" 108 | } 109 | ] 110 | } 111 | ``` 112 | 113 | ## Additional Notes 114 | 115 | - Ensure that your webhook listener is capable of processing `POST` requests. 116 | - The `owners` and `followers` fields help in managing record access and tracking. 117 | - The `properties` array allows extensibility by enabling dynamic field storage. 118 | 119 | --- 120 | -------------------------------------------------------------------------------- /docs/webhook events/AppInstall.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # App 6 | 7 | Called whenever an app is installed 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "appId": { 19 | "type": "string" 20 | }, 21 | "companyId": { 22 | "type": "string" 23 | }, 24 | "locationId": { 25 | "type": "string" 26 | }, 27 | "userId": { 28 | "type": "string" 29 | }, 30 | "planId": { 31 | "type": "string" 32 | }, 33 | "trial": { 34 | "type": "object", 35 | "properties": { 36 | "onTrial": { 37 | "type": "boolean" 38 | }, 39 | "trialDuration": { 40 | "type": "number" 41 | }, 42 | "trialStartDate": { 43 | "type": "Date" 44 | } 45 | } 46 | }, 47 | "isWhitelabelCompany": { 48 | "type": "boolean" 49 | }, 50 | "whitelabelDetails": { 51 | "type": "object", 52 | "properties": { 53 | "domain": { 54 | "type": "string" 55 | }, 56 | "logoUrl": { 57 | "type": "string" 58 | } 59 | } 60 | }, 61 | "companyName": { 62 | "type": "string" 63 | } 64 | } 65 | } 66 | ``` 67 | 68 | - Note: The User ID and Company ID may be available when a new token is generated. In case of app installation via future locations, you may not get these fields. 69 | 70 | #### Example 71 | 72 | - For Location Level App Install if company is whitelabeled 73 | 74 | ```json 75 | { 76 | "type": "INSTALL", 77 | "appId": "ve9EPM428h8vShlRW1KT", 78 | "locationId": "otg8dTQqGLh3Q6iQI55w", 79 | "companyId": "otg8dTQqGLh3Q6iQI55w", 80 | "userId": "otg8dTQqGLh3Q6iQI55w", 81 | "planId": "66a0419a0dffa47fb5f8b22f", 82 | "trial": { 83 | "onTrial": true, 84 | "trialDuration": 10, 85 | "trialStartDate": "2024-07-23T23:54:51.264Z" 86 | }, 87 | "isWhitelabelCompany": true, 88 | "whitelabelDetails": { 89 | "domain": "example.com", 90 | "logoUrl": "https://example.com/logo.png" 91 | }, 92 | "companyName": "Example Company" 93 | } 94 | ``` 95 | 96 | - For Location Level App Install if company is non whitelabeled 97 | 98 | ```json 99 | { 100 | "type": "INSTALL", 101 | "appId": "ve9EPM428h8vShlRW1KT", 102 | "locationId": "otg8dTQqGLh3Q6iQI55w", 103 | "companyId": "otg8dTQqGLh3Q6iQI55w", 104 | "userId": "otg8dTQqGLh3Q6iQI55w", 105 | "planId": "66a0419a0dffa47fb5f8b22f", 106 | "trial": { 107 | "onTrial": true, 108 | "trialDuration": 10, 109 | "trialStartDate": "2024-07-23T23:54:51.264Z" 110 | }, 111 | "isWhitelabelCompany": false, 112 | "whitelabelDetails": {}, 113 | "companyName": "Example Company" 114 | } 115 | ``` 116 | 117 | - For Agency Level App Install 118 | 119 | ```json 120 | { 121 | "type": "INSTALL", 122 | "appId": "ve9EPM428h8vShlRW1KT", 123 | "companyId": "otg8dTQqGLh3Q6iQI55w", 124 | "planId": "66a0419a0dffa47fb5f8b22f", 125 | "trial": { 126 | "onTrial": true, 127 | "trialDuration": 10, 128 | "trialStartDate": "2024-07-23T23:54:51.264Z" 129 | } 130 | } 131 | ``` -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as contributors and maintainers pledge to make participation in our project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. 8 | 9 | ## Our Standards 10 | 11 | Examples of behavior that contributes to a positive environment for our community include: 12 | 13 | - Demonstrating empathy and kindness toward other people 14 | - Using welcoming and inclusive language 15 | - Being respectful of differing viewpoints and experiences 16 | - Gracefully accepting constructive criticism 17 | - Focusing on what is best for the community 18 | - Showing empathy toward other community members 19 | 20 | Examples of unacceptable behavior include: 21 | 22 | - The use of sexualized language or imagery, and sexual attention or advances of any kind 23 | - Trolling, insulting or derogatory comments, and personal or political attacks 24 | - Public or private harassment 25 | - Publishing others’ private information, such as a physical or email address, without their explicit permission 26 | - Other conduct which could reasonably be considered inappropriate in a professional setting 27 | 28 | ## Enforcement Responsibilities 29 | 30 | Project maintainers are responsible for clarifying and enforcing standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. 31 | 32 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. 33 | 34 | ## Scope 35 | 36 | This Code of Conduct applies within all project spaces, and also applies when an individual is officially representing the project or its community in public spaces. 37 | 38 | Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. 39 | 40 | ## Enforcement 41 | 42 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project team at [support@gohighlevel.com](mailto:support@gohighlevel.com). 43 | 44 | All complaints will be reviewed and investigated promptly and fairly. 45 | 46 | All project maintainers are obligated to respect the privacy and security of the reporter of any incident. 47 | 48 | ## Attribution 49 | 50 | This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at 51 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html) 52 | 53 | For answers to common questions about this code of conduct, see 54 | [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). 55 | -------------------------------------------------------------------------------- /docs/webhook events/AssociationCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Response] 3 | --- 4 | 5 | # Association Created 6 | 7 | ## Overview 8 | 9 | This webhook response is triggered when a new association is created between objects, such as linking contacts to custom objects. Currently, only contact-to-contact , contact to custom object and custom object to custom object associations are supported. There are plans to expand support for additional associations in the future. 10 | 11 | For example, in a real estate system, a company may want to associate potential buyers with specific properties. In this case: 12 | - The **first object** (buyer) would be a custom object representing the interested person. 13 | - The **second object** (property) would be a custom object representing the real estate listing. 14 | - The **association label** might be "Interested Buyer," indicating that the buyer has shown interest in the property. 15 | - The system could store multiple buyers per property (many-to-many relationship), allowing for flexible tracking of interest. 16 | 17 | ## Schema 18 | 19 | The webhook response follows the JSON schema below: 20 | 21 | ```json json_schema 22 | { 23 | "type": "object", 24 | "properties": { 25 | "id": { 26 | "type": "string" 27 | }, 28 | "associationType": { 29 | "type": "string" 30 | }, 31 | "firstObjectKey": { 32 | "type": "string" 33 | }, 34 | "firstObjectLabel": { 35 | "type": "string" 36 | }, 37 | "secondObjectKey": { 38 | "type": "string" 39 | }, 40 | "secondObjectLabel": { 41 | "type": "string" 42 | }, 43 | "key": { 44 | "type": "string" 45 | }, 46 | "locationId": { 47 | "type": "string" 48 | } 49 | } 50 | } 51 | ``` 52 | 53 | ## Field Descriptions 54 | 55 | ### `id` 56 | - Type: `string` 57 | - Unique identifier for the association. 58 | 59 | ### `associationType` 60 | - Type: `string` 61 | - Specifies the type of association (e.g., `USER_DEFINED` or `SYSTEM_DEFINED`). 62 | 63 | ### `firstObjectKey` 64 | - Type: `string` 65 | - Key representing the first object in the association. 66 | 67 | ### `firstObjectLabel` 68 | - Type: `string` 69 | - Readable label for the first object. 70 | 71 | ### `secondObjectKey` 72 | - Type: `string` 73 | - Key representing the second object in the association. 74 | 75 | ### `secondObjectLabel` 76 | - Type: `string` 77 | - Readable label for the second object. 78 | 79 | ### `key` 80 | - Type: `string` 81 | - Unique key assigned to the association. 82 | 83 | ### `locationId` 84 | - Type: `string` 85 | - Identifies the location associated with the created association. 86 | 87 | ## Example Response 88 | 89 | ```json 90 | { 91 | "id": "67ade73d1119d2ac7ad0c475", 92 | "associationType": "USER_DEFINED", 93 | "firstObjectKey": "custom_objects.real_estate_buyer", 94 | "firstObjectLabel": "Interested Buyer", 95 | "secondObjectKey": "custom_objects.property", 96 | "secondObjectLabel": "Property", 97 | "key": "buyer_property_interest", 98 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P" 99 | } 100 | ``` 101 | 102 | ## Additional Notes 103 | 104 | - Ensure that your webhook listener is capable of processing `POST` requests. 105 | - The `firstObjectKey` and `secondObjectKey` help define relationships between entities. 106 | - The `traceId` is useful for debugging and logging purposes. 107 | -------------------------------------------------------------------------------- /docs/webhook events/ProductCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Product 6 | 7 | Called whenever a product is created 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "description": { 19 | "type": "string" 20 | }, 21 | "variants": { 22 | "type": "array", 23 | "items": { 24 | "type": "object", 25 | "properties": { 26 | "id": { 27 | "type": "string" 28 | }, 29 | "name": { 30 | "type": "string" 31 | }, 32 | "options": { 33 | "type": "array", 34 | "items": { 35 | "type": "object", 36 | "properties": { 37 | "id": { 38 | "type": "string" 39 | }, 40 | "name": { 41 | "type": "string" 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | }, 49 | "medias": { 50 | "type": "array", 51 | "items": { 52 | "type": "object", 53 | "properties": { 54 | "id": { 55 | "type": "string" 56 | }, 57 | "title": { 58 | "type": "string" 59 | }, 60 | "url": { 61 | "type": "string" 62 | }, 63 | "type": { 64 | "type": "string" 65 | }, 66 | "isFeatured": { 67 | "type": "boolean" 68 | } 69 | } 70 | } 71 | }, 72 | "locationId": { 73 | "type": "string" 74 | }, 75 | "name": { 76 | "type": "string" 77 | }, 78 | "productType": { 79 | "type": "string" 80 | }, 81 | "availableInStore": { 82 | "type": "boolean" 83 | }, 84 | "userId": { 85 | "type": "string" 86 | }, 87 | "createdAt": { 88 | "type": "string" 89 | }, 90 | "updatedAt": { 91 | "type": "string" 92 | }, 93 | "statementDescriptor": { 94 | "type": "string" 95 | }, 96 | "image": { 97 | "type": "string" 98 | } 99 | } 100 | } 101 | ``` 102 | 103 | #### Example 104 | 105 | ```json 106 | { 107 | "_id": "655b33a82209e60b6adb87a5", 108 | "description": "This is a really awesome product", 109 | "variants": [ 110 | { 111 | "id": "38s63qmxfr4", 112 | "name": "Size", 113 | "options": [ 114 | { 115 | "id": "h4z7u0im2q8", 116 | "name": "XL" 117 | } 118 | ] 119 | } 120 | ], 121 | "medias": [ 122 | { 123 | "id": "fzrgusiuu0m", 124 | "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png", 125 | "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png", 126 | "type": "image", 127 | "isFeatured": true 128 | } 129 | ], 130 | "locationId": "3SwdhCsvxI8Au3KsPJt6", 131 | "name": "Awesome Product", 132 | "productType": "PHYSICAL", 133 | "availableInStore": true, 134 | "userId": "6YAtzfzpmHAdj0e8GkKp", 135 | "createdAt": "2023-11-20T10:23:36.515Z", 136 | "updatedAt": "2024-01-23T09:57:04.846Z", 137 | "statementDescriptor": "abcde", 138 | "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png" 139 | } 140 | ``` 141 | -------------------------------------------------------------------------------- /docs/webhook events/ProductDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Product 6 | 7 | Called whenever a product is deleted 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "description": { 19 | "type": "string" 20 | }, 21 | "variants": { 22 | "type": "array", 23 | "items": { 24 | "type": "object", 25 | "properties": { 26 | "id": { 27 | "type": "string" 28 | }, 29 | "name": { 30 | "type": "string" 31 | }, 32 | "options": { 33 | "type": "array", 34 | "items": { 35 | "type": "object", 36 | "properties": { 37 | "id": { 38 | "type": "string" 39 | }, 40 | "name": { 41 | "type": "string" 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | }, 49 | "medias": { 50 | "type": "array", 51 | "items": { 52 | "type": "object", 53 | "properties": { 54 | "id": { 55 | "type": "string" 56 | }, 57 | "title": { 58 | "type": "string" 59 | }, 60 | "url": { 61 | "type": "string" 62 | }, 63 | "type": { 64 | "type": "string" 65 | }, 66 | "isFeatured": { 67 | "type": "boolean" 68 | } 69 | } 70 | } 71 | }, 72 | "locationId": { 73 | "type": "string" 74 | }, 75 | "name": { 76 | "type": "string" 77 | }, 78 | "productType": { 79 | "type": "string" 80 | }, 81 | "availableInStore": { 82 | "type": "boolean" 83 | }, 84 | "userId": { 85 | "type": "string" 86 | }, 87 | "createdAt": { 88 | "type": "string" 89 | }, 90 | "updatedAt": { 91 | "type": "string" 92 | }, 93 | "statementDescriptor": { 94 | "type": "string" 95 | }, 96 | "image": { 97 | "type": "string" 98 | } 99 | } 100 | } 101 | ``` 102 | 103 | #### Example 104 | 105 | ```json 106 | { 107 | "_id": "655b33a82209e60b6adb87a5", 108 | "description": "This is a really awesome product", 109 | "variants": [ 110 | { 111 | "id": "38s63qmxfr4", 112 | "name": "Size", 113 | "options": [ 114 | { 115 | "id": "h4z7u0im2q8", 116 | "name": "XL" 117 | } 118 | ] 119 | } 120 | ], 121 | "medias": [ 122 | { 123 | "id": "fzrgusiuu0m", 124 | "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png", 125 | "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png", 126 | "type": "image", 127 | "isFeatured": true 128 | } 129 | ], 130 | "locationId": "3SwdhCsvxI8Au3KsPJt6", 131 | "name": "Awesome Product", 132 | "productType": "PHYSICAL", 133 | "availableInStore": true, 134 | "userId": "6YAtzfzpmHAdj0e8GkKp", 135 | "createdAt": "2023-11-20T10:23:36.515Z", 136 | "updatedAt": "2024-01-23T09:57:04.846Z", 137 | "statementDescriptor": "abcde", 138 | "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png" 139 | } 140 | ``` 141 | -------------------------------------------------------------------------------- /docs/webhook events/ProductUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Product 6 | 7 | Called whenever a product is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "description": { 19 | "type": "string" 20 | }, 21 | "variants": { 22 | "type": "array", 23 | "items": { 24 | "type": "object", 25 | "properties": { 26 | "id": { 27 | "type": "string" 28 | }, 29 | "name": { 30 | "type": "string" 31 | }, 32 | "options": { 33 | "type": "array", 34 | "items": { 35 | "type": "object", 36 | "properties": { 37 | "id": { 38 | "type": "string" 39 | }, 40 | "name": { 41 | "type": "string" 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | }, 49 | "medias": { 50 | "type": "array", 51 | "items": { 52 | "type": "object", 53 | "properties": { 54 | "id": { 55 | "type": "string" 56 | }, 57 | "title": { 58 | "type": "string" 59 | }, 60 | "url": { 61 | "type": "string" 62 | }, 63 | "type": { 64 | "type": "string" 65 | }, 66 | "isFeatured": { 67 | "type": "boolean" 68 | } 69 | } 70 | } 71 | }, 72 | "locationId": { 73 | "type": "string" 74 | }, 75 | "name": { 76 | "type": "string" 77 | }, 78 | "productType": { 79 | "type": "string" 80 | }, 81 | "availableInStore": { 82 | "type": "boolean" 83 | }, 84 | "userId": { 85 | "type": "string" 86 | }, 87 | "createdAt": { 88 | "type": "string" 89 | }, 90 | "updatedAt": { 91 | "type": "string" 92 | }, 93 | "statementDescriptor": { 94 | "type": "string" 95 | }, 96 | "image": { 97 | "type": "string" 98 | } 99 | } 100 | } 101 | ``` 102 | 103 | #### Example 104 | 105 | ```json 106 | { 107 | "_id": "655b33a82209e60b6adb87a5", 108 | "description": "This is a really awesome product", 109 | "variants": [ 110 | { 111 | "id": "38s63qmxfr4", 112 | "name": "Size", 113 | "options": [ 114 | { 115 | "id": "h4z7u0im2q8", 116 | "name": "XL" 117 | } 118 | ] 119 | } 120 | ], 121 | "medias": [ 122 | { 123 | "id": "fzrgusiuu0m", 124 | "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png", 125 | "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png", 126 | "type": "image", 127 | "isFeatured": true 128 | } 129 | ], 130 | "locationId": "3SwdhCsvxI8Au3KsPJt6", 131 | "name": "Awesome Product", 132 | "productType": "PHYSICAL", 133 | "availableInStore": true, 134 | "userId": "6YAtzfzpmHAdj0e8GkKp", 135 | "createdAt": "2023-11-20T10:23:36.515Z", 136 | "updatedAt": "2024-01-23T09:57:04.846Z", 137 | "statementDescriptor": "abcde", 138 | "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png" 139 | } 140 | ``` 141 | -------------------------------------------------------------------------------- /.github/workflows/scripts/close-clickup-task.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | 3 | function makeRequest(options, data = null) { 4 | const config = { 5 | method: options.method, 6 | url: `https://${options.hostname}${options.path}`, 7 | headers: options.headers, 8 | timeout: 10000 9 | }; 10 | 11 | if (data) { 12 | config.data = data; 13 | } 14 | return axios(config) 15 | .then(response => response.data) 16 | .catch(error => { 17 | console.error(`API Error: ${error.response?.status} - ${error.response?.data?.err || error.message}`); 18 | throw error; 19 | }); 20 | } 21 | 22 | async function findTaskInList(listId, issueId, githubFieldId, apiToken) { 23 | console.log(`🔍 Searching for issue #${issueId}...`); 24 | 25 | let page = 0; 26 | const maxPages = 50; // Prevent infinite loops 27 | 28 | while (page < maxPages) { 29 | const options = { 30 | hostname: 'api.clickup.com', 31 | path: `/api/v2/list/${listId}/task?page=${page}`, 32 | method: 'GET', 33 | headers: { 34 | 'Authorization': apiToken, 35 | 'Content-Type': 'application/json' 36 | } 37 | }; 38 | 39 | const response = await makeRequest(options); 40 | const tasks = response.tasks || []; 41 | 42 | if (tasks.length === 0) break; 43 | 44 | // Check each task for matching GitHub issue field 45 | for (const task of tasks) { 46 | if (task.custom_fields) { 47 | const githubField = task.custom_fields.find(field => field.id === githubFieldId); 48 | if (githubField && githubField.value?.trim() == issueId) { 49 | console.log(`✅ Found task: ${task.id} - "${task.name}"`); 50 | return task.id; 51 | } 52 | } 53 | } 54 | 55 | if (response.last_page === true) break; 56 | page++; 57 | } 58 | 59 | console.log(`⚠️ Searched ${maxPages} pages but no matching task found`); 60 | return null; 61 | } 62 | 63 | async function closeTask(taskId, apiToken) { 64 | const options = { 65 | hostname: 'api.clickup.com', 66 | path: `/api/v2/task/${taskId}`, 67 | method: 'PUT', 68 | headers: { 69 | 'Authorization': apiToken.trim(), 70 | 'Content-Type': 'application/json' 71 | } 72 | }; 73 | 74 | await makeRequest(options, { status: 'closed' }); 75 | console.log(`🔒 Task closed successfully!`); 76 | } 77 | 78 | async function main() { 79 | console.log(`🚀 ClickUp Task Closer - Issue #${process.env.ISSUE_NUMBER}`); 80 | 81 | // Get environment variables 82 | const issueId = process.env.ISSUE_NUMBER; 83 | const apiToken = process.env.CLICKUP_API_TOKEN; 84 | const listId = process.env.CLICKUP_SPACE_ID; // This is actually the list ID 85 | const githubFieldId = process.env.CLICKUP_GITHUB_FIELD_ID; 86 | 87 | // Validate required variables 88 | if (!issueId || !apiToken || !listId || !githubFieldId) { 89 | console.error(`❌ Missing required environment variables`); 90 | process.exit(1); 91 | } 92 | 93 | try { 94 | // Find the task 95 | const taskId = await findTaskInList(listId, issueId, githubFieldId, apiToken); 96 | 97 | if (!taskId) { 98 | console.log(`❌ No matching task found`); 99 | process.exit(0); 100 | } 101 | 102 | // Close the task 103 | await closeTask(taskId, apiToken); 104 | 105 | } catch (error) { 106 | console.error(`💥 Error:`, error); 107 | process.exit(1); 108 | } 109 | } 110 | 111 | main(); -------------------------------------------------------------------------------- /docs/webhook events/ObjectSchemaCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Object Schema Create 6 | 7 | ## Overview 8 | 9 | The **Object Schema Create** is triggered whenever a custom object is created. This webhook allows systems to listen for new custom objects and take appropriate actions based on the event. 10 | 11 | ## Schema 12 | 13 | The webhook payload follows the JSON schema below: 14 | 15 | ```json json_schema 16 | { 17 | "type": "object", 18 | "properties": { 19 | "labels": { 20 | "type": "object", 21 | "required": true 22 | }, 23 | "description": { 24 | "type": "string" 25 | }, 26 | "searchableProperties": { 27 | "type": "array" 28 | }, 29 | "primaryDisplayProperty": { 30 | "type": "string", 31 | "required": true 32 | }, 33 | "key": { 34 | "type": "string", 35 | "required": true 36 | }, 37 | "locationId": { 38 | "type": "string", 39 | "required": true 40 | }, 41 | "createdBy": { 42 | "type": "object" 43 | }, 44 | "updatedBy": { 45 | "type": "object" 46 | }, 47 | "timestamp": { 48 | "type": "string", 49 | "format": "date-time" 50 | }, 51 | "objectType": { 52 | "type": "string", 53 | "enum": ["USER_DEFINED"], 54 | "default": "USER_DEFINED" 55 | } 56 | } 57 | } 58 | ``` 59 | 60 | ## Field Descriptions 61 | 62 | ### `labels` 63 | An object that defines the human-readable names associated with the custom object. 64 | - **`singular`**: The name of the object in singular form (e.g., `"pet"`). 65 | - **`plural`**: The name of the object in plural form (e.g., `"pets"`). 66 | 67 | ### `description` 68 | - Type: `string` 69 | - A brief explanation of the custom object. 70 | 71 | ### `searchableProperties` 72 | - Type: `array` 73 | - List of properties that are indexed for search. 74 | 75 | ### `primaryDisplayProperty` 76 | - Type: `string` 77 | - Required: ✅ 78 | - The key property used to display the custom object. 79 | 80 | ### `key` 81 | - Type: `string` 82 | - Required: ✅ 83 | - Unique identifier for the custom object type. 84 | 85 | ### `locationId` 86 | - Type: `string` 87 | - Required: ✅ 88 | - Identifies the location associated with the custom object. 89 | 90 | ### `createdBy` 91 | - Type: `object` 92 | - Metadata about the user who created the object. 93 | 94 | ### `updatedBy` 95 | - Type: `object` 96 | - Metadata about the user who last updated the object. 97 | 98 | ### `timestamp` 99 | - Type: `string` 100 | - Format: `date-time` 101 | - The date and time when the object was created. 102 | 103 | ### `objectType` 104 | - Type: `string` 105 | - Default: `"USER_DEFINED"` 106 | - Specifies the type of object, currently supports only `USER_DEFINED`. 107 | 108 | ## Example Payload 109 | 110 | ```json 111 | { 112 | "id": "6798a1a18fc746e0eba2ccfe", 113 | "labels": { 114 | "singular": "pet", 115 | "plural": "pets" 116 | }, 117 | "description": "Pet's Description", 118 | "searchableProperties": [ 119 | "custom_objects.pets.pet_name" 120 | ], 121 | "primaryDisplayProperty": "custom_objects.pets.pet_name", 122 | "key": "custom_objects.pets", 123 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P", 124 | "updatedAt": "2025-01-28T09:21:37.311Z", 125 | "createdAt": "2025-01-28T09:21:37.311Z", 126 | "objectType": "USER_DEFINED", 127 | "timestamp": "2025-02-10T08:26:05.961Z" 128 | } 129 | ``` 130 | 131 | ## Additional Notes 132 | 133 | - Ensure your webhook listener is set up to handle `POST` requests. 134 | - The payload format may change in future versions; check for updates regularly. 135 | - The `key` field should be unique within a given `locationId`. 136 | 137 | --- 138 | -------------------------------------------------------------------------------- /docs/webhook events/ObjectSchemaUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Update Custom Object 6 | 7 | ## Overview 8 | 9 | The **Update Custom Object** is triggered whenever a custom object is Updated. This webhook allows systems to listen for new custom objects and take appropriate actions based on the event. 10 | 11 | ## Schema 12 | 13 | The webhook payload follows the JSON schema below: 14 | 15 | ```json json_schema 16 | { 17 | "type": "object", 18 | "properties": { 19 | "labels": { 20 | "type": "object", 21 | "required": true 22 | }, 23 | "description": { 24 | "type": "string" 25 | }, 26 | "searchableProperties": { 27 | "type": "array" 28 | }, 29 | "primaryDisplayProperty": { 30 | "type": "string", 31 | "required": true 32 | }, 33 | "key": { 34 | "type": "string", 35 | "required": true 36 | }, 37 | "locationId": { 38 | "type": "string", 39 | "required": true 40 | }, 41 | "createdBy": { 42 | "type": "object" 43 | }, 44 | "updatedBy": { 45 | "type": "object" 46 | }, 47 | "timestamp": { 48 | "type": "string", 49 | "format": "date-time" 50 | }, 51 | "objectType": { 52 | "type": "string", 53 | "enum": ["USER_DEFINED"], 54 | "default": "USER_DEFINED" 55 | } 56 | } 57 | } 58 | ``` 59 | 60 | ## Field Descriptions 61 | 62 | ### `labels` 63 | An object that defines the human-readable names associated with the custom object. 64 | - **`singular`**: The name of the object in singular form (e.g., `"pet"`). 65 | - **`plural`**: The name of the object in plural form (e.g., `"pets"`). 66 | 67 | ### `description` 68 | - Type: `string` 69 | - A brief explanation of the custom object. 70 | 71 | ### `searchableProperties` 72 | - Type: `array` 73 | - List of properties that are indexed for search. 74 | 75 | ### `primaryDisplayProperty` 76 | - Type: `string` 77 | - Required: ✅ 78 | - The key property used to display the custom object. 79 | 80 | ### `key` 81 | - Type: `string` 82 | - Required: ✅ 83 | - Unique identifier for the custom object type. 84 | 85 | ### `locationId` 86 | - Type: `string` 87 | - Required: ✅ 88 | - Identifies the location associated with the custom object. 89 | 90 | ### `createdBy` 91 | - Type: `object` 92 | - Metadata about the user who created the object. 93 | 94 | ### `updatedBy` 95 | - Type: `object` 96 | - Metadata about the user who last updated the object. 97 | 98 | ### `timestamp` 99 | - Type: `string` 100 | - Format: `date-time` 101 | - The date and time when the object was created. 102 | 103 | ### `objectType` 104 | - Type: `string` 105 | - Default: `"USER_DEFINED"` 106 | - Specifies the type of object, currently supports only `USER_DEFINED`. 107 | 108 | ## Example Payload 109 | 110 | ```json 111 | { 112 | "id": "6798a1a18fc746e0eba2ccfe", 113 | "labels": { 114 | "singular": "pet", 115 | "plural": "pets" 116 | }, 117 | "description": "Pet's Description", 118 | "searchableProperties": [ 119 | "custom_objects.pets.pet_name" 120 | ], 121 | "primaryDisplayProperty": "custom_objects.pets.pet_name", 122 | "key": "custom_objects.pets", 123 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P", 124 | "updatedAt": "2025-01-28T09:21:37.311Z", 125 | "createdAt": "2025-01-28T09:21:37.311Z", 126 | "objectType": "USER_DEFINED", 127 | "timestamp": "2025-02-10T08:26:05.961Z" 128 | } 129 | ``` 130 | 131 | ## Additional Notes 132 | 133 | - Ensure your webhook listener is set up to handle `POST` requests. 134 | - The payload format may change in future versions; check for updates regularly. 135 | - The `key` field should be unique within a given `locationId`. 136 | 137 | --- 138 | -------------------------------------------------------------------------------- /docs/oauth/WebhookAuthentication.md: -------------------------------------------------------------------------------- 1 | --- 2 | stoplight-id: vyc3gbbez52ip 3 | --- 4 | 5 | # Webhook Authentication Guide 6 | 7 | ## How It Works 8 | 9 | ### 1. Receiving the Webhook 10 | 11 | When your endpoint receives a webhook request, it will include the following: 12 | 13 | - **Headers**: 14 | 15 | - `x-wh-signature`: The digital signature of the payload. 16 | 17 | - **Body**: The payload containing the timestamp, webhook ID, and data. 18 | 19 | Example payload: 20 | 21 | { 22 | "timestamp": "2025-01-28T14:35:00Z", 23 | "webhookId": "abc123xyz", 24 | ... 25 | } 26 | 27 | 28 | ### 2. Verifying the Signature 29 | 30 | To verify the authenticity of the webhook request: 31 | 32 | 1. Retrieve the `x-wh-signature` header from the request. 33 | 34 | 2. Use the public key mentioned below to verify the signature: 35 | 36 | 3. Compute the signature on your end using the payload and the public key. 37 | 38 | 4. Compare your computed signature with the `x-wh-signature` header. 39 | 40 | ``` 41 | -----BEGIN PUBLIC KEY----- 42 | MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAokvo/r9tVgcfZ5DysOSC 43 | Frm602qYV0MaAiNnX9O8KxMbiyRKWeL9JpCpVpt4XHIcBOK4u3cLSqJGOLaPuXw6 44 | dO0t6Q/ZVdAV5Phz+ZtzPL16iCGeK9po6D6JHBpbi989mmzMryUnQJezlYJ3DVfB 45 | csedpinheNnyYeFXolrJvcsjDtfAeRx5ByHQmTnSdFUzuAnC9/GepgLT9SM4nCpv 46 | uxmZMxrJt5Rw+VUaQ9B8JSvbMPpez4peKaJPZHBbU3OdeCVx5klVXXZQGNHOs8gF 47 | 3kvoV5rTnXV0IknLBXlcKKAQLZcY/Q9rG6Ifi9c+5vqlvHPCUJFT5XUGG5RKgOKU 48 | J062fRtN+rLYZUV+BjafxQauvC8wSWeYja63VSUruvmNj8xkx2zE/Juc+yjLjTXp 49 | IocmaiFeAO6fUtNjDeFVkhf5LNb59vECyrHD2SQIrhgXpO4Q3dVNA5rw576PwTzN 50 | h/AMfHKIjE4xQA1SZuYJmNnmVZLIZBlQAF9Ntd03rfadZ+yDiOXCCs9FkHibELhC 51 | HULgCsnuDJHcrGNd5/Ddm5hxGQ0ASitgHeMZ0kcIOwKDOzOU53lDza6/Y09T7sYJ 52 | PQe7z0cvj7aE4B+Ax1ZoZGPzpJlZtGXCsu9aTEGEnKzmsFqwcSsnw3JB31IGKAyk 53 | T1hhTiaCeIY/OwwwNUY2yvcCAwEAAQ== 54 | -----END PUBLIC KEY----- 55 | ``` 56 | 57 | If they match, the payload is valid and comes from a trusted source. 58 | 59 | ### 3. Handling Replay Attacks 60 | 61 | To protect against replay attacks: 62 | 63 | - Ensure the `timestamp` in the payload is within an acceptable time window (e.g., 5 minutes). 64 | 65 | - Reject any requests with duplicate `webhookId` values. 66 | 67 | ### 4. Handling Public Key Rotation 68 | 69 | Please keep an eye on your email and [our social channels](https://ghl-developer-council.slack.com/archives/C01F43GUJV6) for notices regarding public key rotation to stay updated. The public key in this doc is the one to use to validate the webhook payload. 70 | 71 | *** 72 | 73 | 74 | ## Example Code 75 | 76 | Here’s an example of how to verify the signature in Node.js: 77 | 78 | const crypto = require('crypto'); 79 | 80 | const publicKey = ``; 81 | 82 | function verifySignature(payload, signature) { 83 | const verifier = crypto.createVerify('SHA256'); 84 | verifier.update(payload); 85 | verifier.end(); 86 | 87 | return verifier.verify(publicKey, signature, 'base64'); 88 | } 89 | 90 | // Example usage 91 | const payload = JSON.stringify({ 92 | "timestamp": "2025-01-28T14:35:00Z", 93 | "webhookId": "abc123xyz", 94 | ... 95 | }); 96 | 97 | const signature = ""; 98 | const isValid = verifySignature(payload, signature); 99 | 100 | return isValid; 101 | 102 | 103 | ## Summary 104 | 105 | These new features significantly enhance the security of webhook integrations. By including a timestamp, webhook ID, and a digitally signed payload, we ensure your data remains secure and trusted. Implement these changes today to keep your integrations robust and secure! 106 | -------------------------------------------------------------------------------- /docs/marketplace modules/CustomJs.md: -------------------------------------------------------------------------------- 1 | # CustomJS 2 | 3 | ## Wrapper functions 4 | 5 | HighLevel provides functions to render contextual data & some utilities that can help developers customize experience for the user. 6 | 7 | ### 1. Local Storage and Cookies Management: 8 | 9 | This feature provides utility methods to interact with localStorage and cookies efficiently. 10 | 11 | **Local Storage Wrapper:** 12 | 13 | - Store data with a maximum size of 5KB per entry. 14 | - The wrapper automatically prefixes keys to prevent key collisions with `custom_`. 15 | - Stored data is automatically cleaned up when the Vue instance is destroyed. 16 | 17 | _Usage:_ 18 | 19 | ```shell 20 | await AppUtils.Storage.setData(key, value); // Store data 21 | await AppUtils.Storage.getData(key); // Retrieve data 22 | ``` 23 | 24 |
25 | 26 | **Cookies Wrapper:** 27 | 28 | - Store data with a maximum size of 5KB per entry. 29 | - Set cookies with optional expiration (maximum of 2 days from the time of creation). 30 | - The wrapper automatically prefixes keys to prevent key collisions with `custom_`. 31 | 32 | _Usage:_ 33 | 34 | ```shell 35 | await AppUtils.Storage.setCookie(key, value, expiryInHours) 36 | //or 37 | await AppUtils.Storage.setCookie(key, value) // Store data in a cookie 38 | 39 | await AppUtils.Storage.getCookie(key) // Retrieve cookie value 40 | ``` 41 | 42 |
43 | 44 | ### 2. Custom Events: 45 | 46 | You can listen to custom application events for specific lifecycle hooks or activities. 47 | 48 | **Events:** 49 | 50 | - **routeLoaded**: Emitted when the first route is loaded after application startup. 51 | - **routeChangeEvent**: Emitted on every route change after the initial route load. 52 | 53 | _Usage:_ 54 | 55 | ```shell 56 | window.addEventListener('routeLoaded',callback) 57 | window.addEventListener('routeChangeEvent',callback) 58 | ``` 59 | 60 |
61 | 62 | ### 3. Routing Methods: 63 | 64 | Custom scripts can now control routing within the application via exposed methods. 65 | 66 | **Methods:** 67 | 68 | - **getCurrentRoute()**: Get the current route info. 69 | - **navigate(options:INavigationOptions)**: Allows you to navigate to a different route via name or path. 70 | 71 | ```js 72 | interface INavigationOptions{ 73 | name?: string 74 | path?: string 75 | params?: Record 76 | query?: Record 77 | replace?: boolean 78 | append?: boolean 79 | } 80 | ``` 81 | 82 | _Usage:_ 83 | 84 | ```shell 85 | await AppUtils.RouteHelper.navigate({name: 'integrations-settings-v2'}); // Navigate to integrations page on current location 86 | 87 | const path = '/integration' 88 | await AppUtils.RouteHelper.navigate({path}) // Navigates to marketplace apps page 89 | 90 | const currentRoute = await AppUtils.RouteHelper.getCurrentRoute(); 91 | console.log(currentRoute); // Logs current route information {fullPath, name, params, path, query} 92 | ``` 93 | 94 |
95 | 96 | ### 4. Utility Methods: 97 | 98 | A set of utility methods is now available to provide essential contextual data for custom scripts. 99 | 100 | **Methods:** 101 | 102 | - User Info: `getCurrentUser()` – Retrieves current user's information. 103 | - Current Location: `getCurrentLocation()` – Retrieves data about the user's current location. 104 | - Company Info: `getCompany()` – Retrieves information about the current company. 105 | 106 | _Usage:_ 107 | 108 | ```shell 109 | const userInfo = await AppUtils.Utilities.getCurrentUser();//{id, name, firstName, lastName, email, type, role} 110 | 111 | const currentLocation = await AppUtils.Utilities.getCurrentLocation();//{id, name, address: {address, city, country}} 112 | 113 | const companyInfo = AppUtils.Utilities.getCompany();//{id, name} 114 | ``` -------------------------------------------------------------------------------- /docs/webhook events/AssociationDelete.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Response] 3 | --- 4 | 5 | # Association Deleted 6 | 7 | ## Overview 8 | 9 | This webhook response is triggered when a new association is deleted between objects, such as linking contacts to custom objects. Currently, only contact-to-contact , contact to custom object and custom object to custom object associations are supported. There are plans to expand support for additional associations in the future. 10 | 11 | For example, in a real estate system, a company may want to associate potential buyers with specific properties. In this case: 12 | - The **first object** (buyer) would be a custom object representing the interested person. 13 | - The **second object** (property) would be a custom object representing the real estate listing. 14 | - The **association label** might be "Interested Buyer," indicating that the buyer has shown interest in the property. 15 | - The system could store multiple buyers per property (many-to-many relationship), allowing for flexible tracking of interest. 16 | 17 | ## Schema 18 | 19 | The webhook response follows the JSON schema below: 20 | 21 | ```json json_schema 22 | { 23 | "type": "object", 24 | "properties": { 25 | "id": { 26 | "type": "string" 27 | }, 28 | "associationType": { 29 | "type": "string" 30 | }, 31 | "firstObjectKey": { 32 | "type": "string" 33 | }, 34 | "firstObjectLabel": { 35 | "type": "string" 36 | }, 37 | "firstObjectToSecondObjectCardinality": { 38 | "type": "string" 39 | }, 40 | "secondObjectKey": { 41 | "type": "string" 42 | }, 43 | "secondObjectLabel": { 44 | "type": "string" 45 | }, 46 | "secondObjectToFirstObjectCardinality": { 47 | "type": "string" 48 | }, 49 | "key": { 50 | "type": "string" 51 | }, 52 | "locationId": { 53 | "type": "string" 54 | } 55 | } 56 | } 57 | ``` 58 | 59 | ## Field Descriptions 60 | 61 | ### `id` 62 | - Type: `string` 63 | - Unique identifier for the association. 64 | 65 | ### `associationType` 66 | - Type: `string` 67 | - Specifies the type of association (e.g., `USER_DEFINED` or `SYSTEM_DEFINED`). 68 | 69 | ### `firstObjectKey` 70 | - Type: `string` 71 | - Key representing the first object in the association. 72 | 73 | ### `firstObjectLabel` 74 | - Type: `string` 75 | - Human-readable label for the first object. 76 | 77 | ### `firstObjectToSecondObjectCardinality` 78 | - Type: `string` 79 | - Indicates the relationship between the first and second object (e.g., `MANY_TO_MANY`). 80 | 81 | ### `secondObjectKey` 82 | - Type: `string` 83 | - Key representing the second object in the association. 84 | 85 | ### `secondObjectLabel` 86 | - Type: `string` 87 | - Human-readable label for the second object. 88 | 89 | ### `secondObjectToFirstObjectCardinality` 90 | - Type: `string` 91 | - Defines the reverse relationship between objects. 92 | 93 | ### `key` 94 | - Type: `string` 95 | - Unique key assigned to the association. 96 | 97 | ### `locationId` 98 | - Type: `string` 99 | - Identifies the location associated with the created association. 100 | 101 | ## Example Response 102 | 103 | ```json 104 | { 105 | "id": "67ade73d1119d2ac7ad0c475", 106 | "associationType": "USER_DEFINED", 107 | "firstObjectKey": "custom_objects.real_estate_buyer", 108 | "firstObjectLabel": "Interested Buyer", 109 | "firstObjectToSecondObjectCardinality": "MANY_TO_MANY", 110 | "secondObjectKey": "custom_objects.property", 111 | "secondObjectLabel": "Property", 112 | "secondObjectToFirstObjectCardinality": "MANY_TO_MANY", 113 | "key": "buyer_property_interest", 114 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P" 115 | } 116 | ``` 117 | 118 | ## Additional Notes 119 | 120 | - Ensure that your webhook listener is capable of processing `POST` requests. 121 | - The `firstObjectKey` and `secondObjectKey` help define relationships between entities. 122 | - The `traceId` is useful for debugging and logging purposes. 123 | -------------------------------------------------------------------------------- /docs/webhook events/AssociationUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Response] 3 | --- 4 | 5 | # Association Updated 6 | 7 | ## Overview 8 | 9 | This webhook response is triggered when a new association is updated between objects, such as linking contacts to custom objects. Currently, only contact-to-contact , contact to custom object and custom object to custom object associations are supported. There are plans to expand support for additional associations in the future. 10 | 11 | For example, in a real estate system, a company may want to associate potential buyers with specific properties. In this case: 12 | - The **first object** (buyer) would be a custom object representing the interested person. 13 | - The **second object** (property) would be a custom object representing the real estate listing. 14 | - The **association label** might be "Interested Buyer," indicating that the buyer has shown interest in the property. 15 | - The system could store multiple buyers per property (many-to-many relationship), allowing for flexible tracking of interest. 16 | 17 | ## Schema 18 | 19 | The webhook response follows the JSON schema below: 20 | 21 | ```json json_schema 22 | { 23 | "type": "object", 24 | "properties": { 25 | "id": { 26 | "type": "string" 27 | }, 28 | "associationType": { 29 | "type": "string" 30 | }, 31 | "firstObjectKey": { 32 | "type": "string" 33 | }, 34 | "firstObjectLabel": { 35 | "type": "string" 36 | }, 37 | "firstObjectToSecondObjectCardinality": { 38 | "type": "string" 39 | }, 40 | "secondObjectKey": { 41 | "type": "string" 42 | }, 43 | "secondObjectLabel": { 44 | "type": "string" 45 | }, 46 | "secondObjectToFirstObjectCardinality": { 47 | "type": "string" 48 | }, 49 | "key": { 50 | "type": "string" 51 | }, 52 | "locationId": { 53 | "type": "string" 54 | } 55 | } 56 | } 57 | ``` 58 | 59 | ## Field Descriptions 60 | 61 | ### `id` 62 | - Type: `string` 63 | - Unique identifier for the association. 64 | 65 | ### `associationType` 66 | - Type: `string` 67 | - Specifies the type of association (e.g., `USER_DEFINED` or `SYSTEM_DEFINED`). 68 | 69 | ### `firstObjectKey` 70 | - Type: `string` 71 | - Key representing the first object in the association. 72 | 73 | ### `firstObjectLabel` 74 | - Type: `string` 75 | - Human-readable label for the first object. 76 | 77 | ### `firstObjectToSecondObjectCardinality` 78 | - Type: `string` 79 | - Indicates the relationship between the first and second object (e.g., `MANY_TO_MANY`). 80 | 81 | ### `secondObjectKey` 82 | - Type: `string` 83 | - Key representing the second object in the association. 84 | 85 | ### `secondObjectLabel` 86 | - Type: `string` 87 | - Human-readable label for the second object. 88 | 89 | ### `secondObjectToFirstObjectCardinality` 90 | - Type: `string` 91 | - Defines the reverse relationship between objects. 92 | 93 | ### `key` 94 | - Type: `string` 95 | - Unique key assigned to the association. 96 | 97 | ### `locationId` 98 | - Type: `string` 99 | - Identifies the location associated with the created association. 100 | 101 | ## Example Response 102 | 103 | ```json 104 | { 105 | "id": "67ade73d1119d2ac7ad0c475", 106 | "associationType": "USER_DEFINED", 107 | "firstObjectKey": "custom_objects.real_estate_buyer", 108 | "firstObjectLabel": "Interested Buyer", 109 | "firstObjectToSecondObjectCardinality": "MANY_TO_MANY", 110 | "secondObjectKey": "custom_objects.property", 111 | "secondObjectLabel": "Property", 112 | "secondObjectToFirstObjectCardinality": "MANY_TO_MANY", 113 | "key": "buyer_property_interest", 114 | "locationId": "eHy2cOSZxMQzQ6Yyvl8P" 115 | } 116 | ``` 117 | 118 | ## Additional Notes 119 | 120 | - Ensure that your webhook listener is capable of processing `POST` requests. 121 | - The `firstObjectKey` and `secondObjectKey` help define relationships between entities. 122 | - The `traceId` is useful for debugging and logging purposes. 123 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request-new-product-form.yaml: -------------------------------------------------------------------------------- 1 | name: "🌟 Feature Request: New Product" 2 | description: Suggest a new feature or documentation improvement 3 | title: "[Feature New Product] " 4 | labels: ["feature-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Thank you for suggesting a new product feature! 10 | 11 | Please fill out the information below to help us understand your feature request. 12 | 13 | - type: textarea 14 | id: feature-description 15 | attributes: 16 | label: 🌟 Describe the Feature 17 | description: A clear and concise description of the proposed improvement. 18 | placeholder: I would like to see a new product feature that can... 19 | validations: 20 | required: true 21 | 22 | - type: textarea 23 | id: justification 24 | attributes: 25 | label: 🚀 Justification 26 | description: Why would this be useful for other developers? 27 | placeholder: This would help users by... 28 | validations: 29 | required: true 30 | 31 | - type: textarea 32 | id: suggestions 33 | attributes: 34 | label: 📝 Suggestions 35 | description: If applicable, include ideas or mockups of the improvement. 36 | placeholder: Here are some mockups or ideas for how this could work... 37 | validations: 38 | required: false 39 | 40 | - type: dropdown 41 | id: product-area 42 | attributes: 43 | label: Product Area 44 | description: Which product area would this new feature relate to? 45 | options: 46 | - ad-publishing 47 | - blogs 48 | - bulk-actions 49 | - calendars 50 | - certificates 51 | - client-portal 52 | - communities 53 | - contacts 54 | - conversations 55 | - conversations-ai 56 | - custom-objects 57 | - emails 58 | - forms 59 | - funnels 60 | - gokollab 61 | - integrations 62 | - launchpad 63 | - lc-email 64 | - lc-phone 65 | - lc-phone-sms 66 | - lc-phone-voice 67 | - lc-whatsapp 68 | - marketplace 69 | - marketplace-modules 70 | - membership 71 | - onboarding 72 | - opportunities 73 | - payment-products 74 | - payments 75 | - proposals 76 | - prospecting 77 | - reporting 78 | - reputation 79 | - reselling 80 | - saas 81 | - snapshots 82 | - social-planner 83 | - media-library 84 | - surveys 85 | - templates 86 | - text 87 | - users 88 | - voice 89 | - wordpress 90 | - workflows 91 | - yext 92 | validations: 93 | required: true 94 | 95 | - type: textarea 96 | id: use-case 97 | attributes: 98 | label: 📋 Use Case 99 | description: Please describe your specific use case for this new product feature. How would it benefit your workflow? 100 | placeholder: | 101 | This feature would help us: 102 | - Streamline our process for X 103 | - Better serve our customers by Y 104 | - Save time and resources on Z 105 | validations: 106 | required: true 107 | 108 | - type: textarea 109 | id: priority-justification 110 | attributes: 111 | label: 🚨 Why Should This Be Prioritized? 112 | description: Please explain the business impact of this feature and why it should be prioritized in the product roadmap. 113 | placeholder: | 114 | This should be prioritized because: 115 | - It would improve user experience by... 116 | - Our competitors already offer this and we're losing customers... 117 | - This would reduce support tickets by... 118 | - It aligns with our goal of... 119 | validations: 120 | required: true 121 | 122 | - type: textarea 123 | id: additional-context 124 | attributes: 125 | label: 🧠 Additional Context 126 | description: Any other details you'd like to share? 127 | placeholder: This feature would be especially useful for... 128 | validations: 129 | required: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request-new-api-form.yaml: -------------------------------------------------------------------------------- 1 | name: "🌟 Feature Request: New APIs" 2 | description: Suggest a new feature or documentation improvement 3 | title: "[Feature New API] " 4 | labels: ["feature-request"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Thank you for suggesting a new API feature! 10 | 11 | Please fill out the information below to help us understand your feature request. 12 | 13 | - type: textarea 14 | id: feature-description 15 | attributes: 16 | label: 🌟 Describe the Feature 17 | description: A clear and concise description of the proposed improvement. 18 | placeholder: I would like to see an API endpoint that can... 19 | validations: 20 | required: true 21 | 22 | - type: textarea 23 | id: justification 24 | attributes: 25 | label: 🚀 Justification 26 | description: Why would this be useful for other developers? 27 | placeholder: This would help developers by... 28 | validations: 29 | required: true 30 | 31 | - type: textarea 32 | id: suggestions 33 | attributes: 34 | label: 📝 Suggestions 35 | description: If applicable, include ideas or mockups of the improvement. 36 | placeholder: | 37 | ```json 38 | { 39 | "suggested_endpoint": "/api/v2/new-feature", 40 | "method": "POST", 41 | "response": "..." 42 | } 43 | ``` 44 | validations: 45 | required: false 46 | 47 | - type: dropdown 48 | id: product-area 49 | attributes: 50 | label: Product Area 51 | description: Which product area would this new API relate to? 52 | options: 53 | - ad-publishing 54 | - blogs 55 | - bulk-actions 56 | - calendars 57 | - certificates 58 | - client-portal 59 | - communities 60 | - contacts 61 | - conversations 62 | - conversations-ai 63 | - custom-objects 64 | - emails 65 | - forms 66 | - funnels 67 | - gokollab 68 | - integrations 69 | - launchpad 70 | - lc-email 71 | - lc-phone 72 | - lc-phone-sms 73 | - lc-phone-voice 74 | - lc-whatsapp 75 | - marketplace 76 | - marketplace-modules 77 | - membership 78 | - onboarding 79 | - opportunities 80 | - payment-products 81 | - payments 82 | - proposals 83 | - prospecting 84 | - reporting 85 | - reputation 86 | - reselling 87 | - saas 88 | - snapshots 89 | - social-planner 90 | - media-library 91 | - surveys 92 | - templates 93 | - text 94 | - users 95 | - voice 96 | - wordpress 97 | - workflows 98 | - yext 99 | validations: 100 | required: true 101 | 102 | - type: textarea 103 | id: use-case 104 | attributes: 105 | label: 📋 Use Case 106 | description: Please describe your specific use case for this new API. How would you integrate it into your application? 107 | placeholder: | 108 | We need this API to: 109 | - Enable our users to perform X 110 | - Integrate with our existing workflow for Y 111 | - Automate the process of Z 112 | validations: 113 | required: true 114 | 115 | - type: textarea 116 | id: priority-justification 117 | attributes: 118 | label: 🚨 Why Should This Be Prioritized? 119 | description: Please explain the business value of this API and why it should be prioritized over other features. 120 | placeholder: | 121 | This should be prioritized because: 122 | - It would unlock new capabilities for... 123 | - We have X customers waiting for this feature... 124 | - It would save us Y hours per week... 125 | - Without this API, we cannot... 126 | validations: 127 | required: true 128 | 129 | - type: textarea 130 | id: additional-context 131 | attributes: 132 | label: 🧠 Additional Context 133 | description: Any other details you'd like to share? 134 | placeholder: This feature would integrate well with... 135 | validations: 136 | required: false -------------------------------------------------------------------------------- /.github/workflows/api-docs-issue-processing.yml: -------------------------------------------------------------------------------- 1 | name: API Documentation Issue Processing 2 | 3 | on: 4 | issues: 5 | types: [opened] # Only trigger on new issues 6 | workflow_dispatch: 7 | inputs: 8 | issue_number: 9 | description: 'Issue number to process (must be a valid positive number)' 10 | required: true 11 | type: number 12 | 13 | # Add concurrency to prevent race conditions 14 | concurrency: 15 | group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.inputs.issue_number || github.sha }} 16 | cancel-in-progress: true 17 | 18 | jobs: 19 | process-issue: 20 | name: Process API Documentation Issue 21 | runs-on: ubuntu-latest 22 | # Only run on the API docs repository and non-internal issues 23 | if: | 24 | github.repository == 'GoHighLevel/highlevel-api-docs' && 25 | (github.event_name == 'workflow_dispatch' || !contains(github.event.issue.labels.*.name, 'internal')) 26 | 27 | permissions: 28 | issues: write # Required for issue labeling and commenting 29 | contents: read # Required for checkout 30 | 31 | steps: 32 | - name: Checkout repository 33 | uses: actions/checkout@v4 34 | 35 | - name: Setup Node.js 36 | uses: actions/setup-node@v4 37 | with: 38 | node-version: '18' 39 | 40 | - name: Check required secrets 41 | run: | 42 | if [ -z "${{ secrets.CLICKUP_API_TOKEN }}" ]; then 43 | echo "CLICKUP_API_TOKEN is not set" 44 | exit 1 45 | fi 46 | if [ -z "${{ secrets.ONCALL_AUTH_TOKEN }}" ]; then 47 | echo "ONCALL_AUTH_TOKEN is not set" 48 | exit 1 49 | fi 50 | if [ -z "${{ secrets.ONCALL_SERVICE_URL }}" ]; then 51 | echo "ONCALL_SERVICE_URL is not set" 52 | exit 1 53 | fi 54 | if [ -z "${{ secrets.ONCALL_API_VERSION }}" ]; then 55 | echo "ONCALL_API_VERSION is not set" 56 | exit 1 57 | fi 58 | if [ -z "${{ secrets.SLACK_WEBHOOK_CRM }}" ]; then 59 | echo "SLACK_WEBHOOK_CRM is not set" 60 | exit 1 61 | fi 62 | if [ -z "${{ secrets.SLACK_WEBHOOK_AUTOMATIONS }}" ]; then 63 | echo "SLACK_WEBHOOK_AUTOMATIONS is not set" 64 | exit 1 65 | fi 66 | if [ -z "${{ secrets.SLACK_WEBHOOK_REVEX }}" ]; then 67 | echo "SLACK_WEBHOOK_REVEX is not set" 68 | exit 1 69 | fi 70 | if [ -z "${{ secrets.SLACK_WEBHOOK_LEADGEN }}" ]; then 71 | echo "SLACK_WEBHOOK_LEADGEN is not set" 72 | exit 1 73 | fi 74 | if [ -z "${{ secrets.SLACK_WEBHOOK_MOBILE }}" ]; then 75 | echo "SLACK_WEBHOOK_MOBILE is not set" 76 | exit 1 77 | fi 78 | 79 | - name: Install axios 80 | run: npm install axios 81 | 82 | - name: Process Issue and Create ClickUp Task 83 | id: process 84 | uses: actions/github-script@v7 85 | env: 86 | CLICKUP_API_TOKEN: ${{ secrets.CLICKUP_API_TOKEN }} 87 | ONCALL_AUTH_TOKEN: ${{ secrets.ONCALL_AUTH_TOKEN }} 88 | ONCALL_SERVICE_URL: ${{ secrets.ONCALL_SERVICE_URL }} 89 | ONCALL_API_VERSION: ${{ secrets.ONCALL_API_VERSION }} 90 | SLACK_WEBHOOK_CRM: ${{ secrets.SLACK_WEBHOOK_CRM }} 91 | SLACK_WEBHOOK_AUTOMATIONS: ${{ secrets.SLACK_WEBHOOK_AUTOMATIONS }} 92 | SLACK_WEBHOOK_REVEX: ${{ secrets.SLACK_WEBHOOK_REVEX }} 93 | SLACK_WEBHOOK_LEADGEN: ${{ secrets.SLACK_WEBHOOK_LEADGEN }} 94 | SLACK_WEBHOOK_MOBILE: ${{ secrets.SLACK_WEBHOOK_MOBILE }} 95 | with: 96 | debug: false 97 | script: | 98 | try { 99 | const processIssue = require('./.github/process-issue.js'); 100 | if (context.eventName === 'workflow_dispatch') { 101 | const issueNumber = context.payload?.inputs?.issue_number; 102 | if (!issueNumber || Number(issueNumber) <= 0) { 103 | throw new Error('Please provide a valid positive issue number'); 104 | } 105 | } 106 | await processIssue(github, context, core); 107 | } catch (error) { 108 | core.setFailed(`Error processing issue: ${error.message}`); 109 | throw error; 110 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report-documentation-errors-form.yaml: -------------------------------------------------------------------------------- 1 | name: "🐛 Bug Report: Documentation Errors" 2 | description: Report a problem with only the existing documentation inconsistencies in Highlevel APIs 3 | title: "[Bug Report: Documentation Errors] " 4 | labels: ["bug-documentation-errors"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Thank you for reporting documentation errors in our API! 10 | 11 | Please fill out the information below to help us address the issue quickly. 12 | 13 | - type: textarea 14 | id: bug-description 15 | attributes: 16 | label: 🐛 Describe the Bug 17 | description: A clear and concise description of what the bug is. 18 | placeholder: The documentation for endpoint X says Y but it should be Z... 19 | validations: 20 | required: true 21 | 22 | - type: input 23 | id: api-endpoint 24 | attributes: 25 | label: 📍 API Endpoint 26 | description: Which API endpoint does this relate to? 27 | placeholder: e.g., /api/v2/users/{id} 28 | validations: 29 | required: true 30 | 31 | - type: textarea 32 | id: expected-behavior 33 | attributes: 34 | label: ✅ Expected Behavior 35 | description: What should have happened? 36 | placeholder: The documentation should state that... 37 | validations: 38 | required: true 39 | 40 | - type: textarea 41 | id: code-samples 42 | attributes: 43 | label: 💻 Screenshots or Code Samples 44 | description: Paste relevant markdown/code samples or screenshots. 45 | placeholder: | 46 | ```json 47 | { 48 | "example": "code here" 49 | } 50 | ``` 51 | validations: 52 | required: false 53 | 54 | - type: dropdown 55 | id: product-area 56 | attributes: 57 | label: Product Area 58 | description: Which product area does this issue relate to? 59 | options: 60 | - ad-publishing 61 | - blogs 62 | - bulk-actions 63 | - calendars 64 | - certificates 65 | - client-portal 66 | - communities 67 | - contacts 68 | - conversations 69 | - conversations-ai 70 | - custom-objects 71 | - emails 72 | - forms 73 | - funnels 74 | - gokollab 75 | - integrations 76 | - launchpad 77 | - lc-email 78 | - lc-phone 79 | - lc-phone-sms 80 | - lc-phone-voice 81 | - lc-whatsapp 82 | - marketplace 83 | - marketplace-modules 84 | - membership 85 | - onboarding 86 | - opportunities 87 | - payment-products 88 | - payments 89 | - proposals 90 | - prospecting 91 | - reporting 92 | - reputation 93 | - reselling 94 | - saas 95 | - snapshots 96 | - social-planner 97 | - media-library 98 | - surveys 99 | - templates 100 | - text 101 | - users 102 | - voice 103 | - wordpress 104 | - workflows 105 | - yext 106 | validations: 107 | required: true 108 | 109 | - type: textarea 110 | id: use-case 111 | attributes: 112 | label: 📋 Use Case 113 | description: Please describe your specific use case for this documentation. How are you trying to use this feature? 114 | placeholder: | 115 | I'm trying to: 116 | - Implement this feature in my application 117 | - Understand how to use this API correctly 118 | - Follow the documentation to achieve a specific goal 119 | validations: 120 | required: true 121 | 122 | - type: textarea 123 | id: priority-justification 124 | attributes: 125 | label: 🚨 Why Should This Be Prioritized? 126 | description: Please explain how this documentation issue impacts your work and why it should be addressed urgently. 127 | placeholder: | 128 | This should be prioritized because: 129 | - It's preventing our team from... 130 | - Developers are wasting time trying to... 131 | - We can't properly implement... 132 | - This confusion is causing errors in production... 133 | validations: 134 | required: true 135 | 136 | - type: textarea 137 | id: additional-context 138 | attributes: 139 | label: 🧠 Additional Context 140 | description: Any other helpful information? 141 | placeholder: This issue also affects other endpoints... 142 | validations: 143 | required: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report-api-field-missing-form.yaml: -------------------------------------------------------------------------------- 1 | name: "🐛 Bug Report: API Field Missing" 2 | description: Report a problem where existing API Endpoints have missing fields but available in Highlevel UI 3 | title: "[Bug Report: API Field Missing] " 4 | labels: ["bug-missing-api-field"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Thank you for reporting missing API fields! 10 | 11 | Please fill out the information below to help us address the missing field issue quickly. 12 | 13 | - type: textarea 14 | id: bug-description 15 | attributes: 16 | label: 🐛 Describe the Bug 17 | description: A clear and concise description of what the bug is. 18 | placeholder: The API endpoint is missing field X which is available in the Highlevel UI... 19 | validations: 20 | required: true 21 | 22 | - type: input 23 | id: api-endpoint 24 | attributes: 25 | label: 📍 API Endpoint 26 | description: Which API endpoint does this relate to? 27 | placeholder: e.g., /api/v2/users/{id} 28 | validations: 29 | required: true 30 | 31 | - type: textarea 32 | id: expected-behavior 33 | attributes: 34 | label: ✅ Expected Behavior 35 | description: What should have happened? 36 | placeholder: The API should return field X with value Y... 37 | validations: 38 | required: true 39 | 40 | - type: textarea 41 | id: code-samples 42 | attributes: 43 | label: 💻 Screenshots or Code Samples 44 | description: Paste relevant markdown/code samples or screenshots. 45 | placeholder: | 46 | ```json 47 | { 48 | "missing_field": "should_be_here" 49 | } 50 | ``` 51 | validations: 52 | required: false 53 | 54 | - type: dropdown 55 | id: product-area 56 | attributes: 57 | label: Product Area 58 | description: Which product area does this issue relate to? 59 | options: 60 | - ad-publishing 61 | - blogs 62 | - bulk-actions 63 | - calendars 64 | - certificates 65 | - client-portal 66 | - communities 67 | - contacts 68 | - conversations 69 | - conversations-ai 70 | - custom-objects 71 | - emails 72 | - forms 73 | - funnels 74 | - gokollab 75 | - integrations 76 | - launchpad 77 | - lc-email 78 | - lc-phone 79 | - lc-phone-sms 80 | - lc-phone-voice 81 | - lc-whatsapp 82 | - marketplace 83 | - marketplace-modules 84 | - membership 85 | - onboarding 86 | - opportunities 87 | - payment-products 88 | - payments 89 | - proposals 90 | - prospecting 91 | - reporting 92 | - reputation 93 | - reselling 94 | - saas 95 | - snapshots 96 | - social-planner 97 | - media-library 98 | - surveys 99 | - templates 100 | - text 101 | - users 102 | - voice 103 | - wordpress 104 | - workflows 105 | - yext 106 | validations: 107 | required: true 108 | 109 | - type: textarea 110 | id: use-case 111 | attributes: 112 | label: 📋 Use Case 113 | description: Please describe your specific use case for this field. How would you use it in your application? 114 | placeholder: | 115 | We need this field to: 116 | - Track user preferences in our system 117 | - Display this information in our dashboard 118 | - Make decisions based on this data 119 | validations: 120 | required: true 121 | 122 | - type: textarea 123 | id: priority-justification 124 | attributes: 125 | label: 🚨 Why Should This Be Prioritized? 126 | description: Please explain the impact of this issue on your business/operations and why it should be addressed urgently. 127 | placeholder: | 128 | This should be prioritized because: 129 | - It's blocking our ability to... 130 | - X number of our customers are affected... 131 | - We're losing revenue/productivity due to... 132 | - This prevents us from launching/implementing... 133 | validations: 134 | required: true 135 | 136 | - type: textarea 137 | id: additional-context 138 | attributes: 139 | label: 🧠 Additional Context 140 | description: Any other helpful information? 141 | placeholder: This field is also missing in other related endpoints... 142 | validations: 143 | required: false -------------------------------------------------------------------------------- /docs/oauth/Billing.md: -------------------------------------------------------------------------------- 1 | # Billing Webhook 2 | 3 | This webhook is essential for externally billed apps within our marketplace. It must be accessed by developers to authorize the installation of the app. 4 | 5 | The primary purpose of this webhook is to capture and update payment information for apps that employ a Paid business model and do not utilize HighLevel's internal billing mechanism. 6 | 7 | ## 1. Prerequisites for using this webhook 8 | 9 | Before using this webhook, ensure that you meet the following prerequisites on the [Marketplace](https://marketplace.gohighlevel.com): 10 | 11 | 1. You should have an app with a Business Model marked as Paid. 12 | 2. External Billing must be enabled for your app. 13 | 3. You must have entered the Billing URL. 14 | 15 | ## 2. Retrieving Parameters from the Billing URL 16 | 17 | When an Agency or Location installs your app, they will be redirected to the Billing URL specified in the configuration. You will receive the following parameters in the URL: 18 | 19 | | Parameter Name | Possible Values | Notes | 20 | | -------------- | -------------------- | ----------------------------------------------------------------------- | 21 | | clientId | `` | Used for validation. | 22 | | installType | `location`, `agency` | You will receive `agency,location` in case of both agency and location. | 23 | | locationId | `` | You will receive this in case of `location` or `agency,location`. | 24 | | companyId | `` | You will receive this in case of `agency` or `agency,location`. | 25 | 26 | ## 3. Using The Webhook 27 | 28 | After successfully processing the payment on your end, you need to make a request to our billing webhook endpoint: 29 | 30 | ``` 31 | https://services.leadconnectorhq.com/oauth/billing/webhook 32 | ``` 33 | 34 | The parameters you need to include in the webhook request are as follows: 35 | 36 | **Request Method:** 37 | POST 38 | 39 | **Request Headers:** 40 | 41 | | Name | Value | Notes | 42 | | ------------------- | ------------------ | ------------------------------------------------------------------------------ | 43 | | x-ghl-client-key | Your client key | This should be from the same client for which you are authorizing the payment. | 44 | | x-ghl-client-secret | Your Client Secret | The corresponding client secret for the client key used. | 45 | | Content-Type | application/json | 46 | 47 | **Request Body:** 48 | 49 | | Name | Value | Notes | 50 | | -------------- | -------------------- | ----------------------------------------------------------------- | 51 | | clientId | Your client ID | | 52 | | authType | Enum | Possible values are `company` and `location`. | 53 | | locationId | `` | Required when authType is `location`. | 54 | | companyId | `` | Required when authType is `company`. | 55 | | subscriptionId | Your subscription ID | You can include this if you have configured a subscription model. | 56 | | paymentId | Your Payment ID | In case of a one-time payment model, you can send this parameter. | 57 | | amount | Billed Amount | Required. | 58 | | status | Enum | Possible values are `COMPLETED` and `FAILED`. | 59 | | paymentType | Enum | Possible values are `one_time` and `recurring`. | 60 | 61 | ### Example 62 | 63 | Here is a sample cURL command for the webhook request: 64 | 65 | ```shell 66 | curl --location 'https://services.leadconnectorhq.com/oauth/billing/webhook' \ 67 | --header 'x-ghl-client-key: ' \ 68 | --header 'x-ghl-client-secret: ' \ 69 | --header 'Content-Type: application/json' \ 70 | --data '{ 71 | "clientId": "", 72 | "authType": "location", 73 | "locationId": "", 74 | "subscriptionId": "", 75 | "paymentId": "", 76 | "amount": 12, 77 | "status": "COMPLETED", 78 | "paymentType": "recurring" 79 | }' 80 | ``` 81 | 82 | ## Webhook FAQs 83 | 84 | ### Can I get multiple location ids in the Billing URL? 85 | 86 | Yes, in the case of multiple installations, you will receive a list of locationIds in a comma-separated format in the billing URL. 87 | 88 | ### Can I update for multiple locations in one call? 89 | 90 | No, you need to trigger the webhook for each location and company separately. 91 | -------------------------------------------------------------------------------- /docs/oauth/Authorization.md: -------------------------------------------------------------------------------- 1 | # Authorization 2 | 3 | HighLevel supports the Authorization Code Grant flow with v2 APIs. Please find the step-by-step procedure to use and understand the OAuth 2.0 flow. 4 | 5 | Here's a [Loom Video](https://www.loom.com/share/f32384758de74a4dbb647e0b7962c4ea?sid=0907a66d-a160-4b51-bcd4-c47ebae37fca) to walk you through the entire process. 6 | 7 | ### 1. Register an OAuth app 8 | 9 | 1. Go to the [Marketplace](https://marketplace.gohighlevel.com) 10 | 2. Sign up for a developer account. 11 | 3. Go to "My Apps," and click on "Create App." 12 | 4. Fill up the required details in the form, then your app will be created. 13 | 5. Click on the app, and it will take you to settings where you can configure the scopes, generate the keys, etc. 14 | 15 | ### 2. Add the app to your desired location 16 | 17 | 1. Make the location/agency Admin go to the app's Authorization Page URL. 18 | 2. They select the location they want to connect. 19 | 3. They are redirected to the redirect URL with the Authorization Code. 20 | 4. Use the Authorization Code to get the Access token via the Get Access Token API under OAuth 2.0. 21 | 5. Use the Access Token to call any API. 22 | 23 | ### 3. Get the app's Authorization Page URL 24 | 25 | To generate the Authorization Page URL for an app, replace the `client_id`, `redirect_uri`, and `scope` in the template below. Then, redirect the location/agency admin trying to install your app to the URL. 26 | 27 | 1. For standard Auth URL flow: 28 | 29 | ``` 30 | https://marketplace.gohighlevel.com/oauth/chooselocation? 31 | response_type=code& 32 | redirect_uri=https://myapp.com/oauth/callback/gohighlevel& 33 | client_id=CLIENT_ID& 34 | scope=conversations/message.readonly conversations/message.write 35 | ``` 36 | 37 | 2. For White-labeled Auth URL flow: 38 | 39 | ``` 40 | https://marketplace.leadconnectorhq.com/oauth/chooselocation? 41 | response_type=code& 42 | redirect_uri=https://myapp.com/oauth/callback/gohighlevel& 43 | client_id=CLIENT_ID& 44 | scope=conversations/message.readonly conversations/message.write 45 | ``` 46 | 47 | NOTE: For the users who are not logged in to the application at the time of giving consent, developer has option to initiate login in new tab or in same tab. For initiating login in same tab, developer need to append `&loginWindowOpenMode=self` to authorization url. If the query param not passed, login in new tab would be default. 48 | 49 | When a user grants access, their browser is redirected to the specified redirect URI, and the Authorization Code is passed inside the code query parameter. 50 | 51 | ``` 52 | https://myapp.com/oauth/callback/gohighlevel?code=7676cjcbdc6t76cdcbkjcd09821jknnkj 53 | ``` 54 | 55 | ## OAuth FAQs 56 | 57 | ### How long are the access tokens valid? 58 | 59 | The access tokens are valid for a day. After that, you can use the refresh token to get a new access token which will be valid for another day. 60 | 61 | ### How long are the refresh tokens valid? 62 | 63 | The refresh tokens are valid for a year unless they are used. If they are used, the new refresh token is valid for a year as well. 64 | 65 | ### How should we handle token expiry? 66 | 67 | You should: 68 | 69 | 1. Make a request to any of our APIs using the accessToken. 70 | 2. If you get a response saying that the token is expired, refresh the token using our API and save the new access token and refresh token in your database. 71 | 3. Make the request again with the new accessToken. 72 | 73 | You can write a wrapper function on your end to achieve this. You can use it for all the API calls you make to our APIs. 74 | 75 | ### What are current rate limits for API 2.0? 76 | 77 | GHL has implemented rate limits on our public V2 APIs using OAuth to ensure optimal performance and stability. These limits have been adjusted to: 78 | 79 | Burst limit: A maximum of 100 API requests per 10 seconds for each Marketplace app (i.e., client) per resource (i.e., Location or Company). 80 | Daily limit: 200,000 API requests per day for each Marketplace app (i.e., client) per resource (i.e., Location or Company). 81 | 82 | These new limits contribute to better overall performance and stability of our system. 83 | 84 | To monitor your limited usage, refer to the following API response headers: 85 | 86 | 'X-RateLimit-Limit-Daily': Your daily limit 87 | 'X-RateLimit-Daily-Remaining': The remaining number of requests for the day 88 | 'X-RateLimit-Interval-Milliseconds': The time interval for burst requests 89 | 'X-RateLimit-Max': The maximum request limit in the specified time interval 90 | 'X-RateLimit-Remaining': The remaining number of requests in the current time interval 91 | 92 | Example: If the 'GHL-APP' is installed on two locations (Sub-account A and Sub-account B) on the GHL Marketplace, the rate limits for each location would be as follows: 93 | 94 | 1. Sub-account A: 'GHL-APP' can make 200,000 API requests per day and 100 API requests per 10 seconds. 95 | 2. Sub-account B: 'GHL-APP' can make 200,000 API requests per day and 100 API requests per 10 seconds. 96 | -------------------------------------------------------------------------------- /docs/webhook events/UserCreate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # User 6 | 7 | Called whenever a user is created 8 | 9 | #### Schema 10 | 11 | ```json 12 | { 13 | "type": "string", 14 | "locationId": "string", 15 | "companyId": "string", 16 | "id": "string", 17 | "firstName": "string", 18 | "lastName": "string", 19 | "email": "string", 20 | "phone": "string", 21 | "extension": "string", 22 | "role": "string", 23 | "permissions": { 24 | "adwordsReportingEnabled": "boolean", 25 | "affiliateManagerEnabled": "boolean", 26 | "agentReportingEnabled": "boolean", 27 | "appointmentsEnabled": "boolean", 28 | "assignedDataOnly": "boolean", 29 | "attributionsReportingEnabled": "boolean", 30 | "bloggingEnabled": "boolean", 31 | "botService": "boolean", 32 | "bulkRequestsEnabled": "boolean", 33 | "campaignsEnabled": "boolean", 34 | "campaignsReadOnly": "boolean", 35 | "cancelSubscriptionEnabled": "boolean", 36 | "communitiesEnabled": "boolean", 37 | "contactsEnabled": "boolean", 38 | "contentAiEnabled": "boolean", 39 | "conversationsEnabled": "boolean", 40 | "dashboardStatsEnabled": "boolean", 41 | "facebookAdsReportingEnabled": "boolean", 42 | "funnelsEnabled": "boolean", 43 | "invoiceEnabled": "boolean", 44 | "leadValueEnabled": "boolean", 45 | "marketingEnabled": "boolean", 46 | "membershipEnabled": "boolean", 47 | "onlineListingsEnabled": "boolean", 48 | "opportunitiesEnabled": "boolean", 49 | "paymentsEnabled": "boolean", 50 | "phoneCallEnabled": "boolean", 51 | "recordPaymentEnabled": "boolean", 52 | "refundsEnabled": "boolean", 53 | "reviewsEnabled": "boolean", 54 | "settingsEnabled": "boolean", 55 | "socialPlanner": "boolean", 56 | "tagsEnabled": "boolean", 57 | "triggersEnabled": "boolean", 58 | "websitesEnabled": "boolean", 59 | "workflowsEnabled": "boolean", 60 | "workflowsReadOnly": "boolean" 61 | }, 62 | "locations": ["string"] 63 | } 64 | ``` 65 | 66 | #### Example (For Sub Account User) 67 | 68 | ```json 69 | { 70 | "type": "UserCreate", 71 | "locationId": "ve9EPM428h8vShlRW1KT", 72 | "id": "ve9EPM428h8vShlRW1KT", 73 | "firstName": "John", 74 | "lastName": "Doe", 75 | "email": "john.doe+2@example.com", 76 | "phone": "+13235559998", 77 | "extension": "111", 78 | "role": "user", 79 | "permissions": { 80 | "adwordsReportingEnabled": true, 81 | "affiliateManagerEnabled": false, 82 | "agentReportingEnabled": true, 83 | "appointmentsEnabled": true, 84 | "assignedDataOnly": false, 85 | "attributionsReportingEnabled": true, 86 | "bloggingEnabled": true, 87 | "botService": false, 88 | "bulkRequestsEnabled": true, 89 | "campaignsEnabled": true, 90 | "campaignsReadOnly": false, 91 | "cancelSubscriptionEnabled": true, 92 | "communitiesEnabled": true, 93 | "contactsEnabled": true, 94 | "contentAiEnabled": true, 95 | "conversationsEnabled": true, 96 | "dashboardStatsEnabled": true, 97 | "facebookAdsReportingEnabled": true, 98 | "funnelsEnabled": true, 99 | "invoiceEnabled": true, 100 | "leadValueEnabled": true, 101 | "marketingEnabled": true, 102 | "membershipEnabled": true, 103 | "onlineListingsEnabled": true, 104 | "opportunitiesEnabled": true, 105 | "paymentsEnabled": true, 106 | "phoneCallEnabled": true, 107 | "recordPaymentEnabled": true, 108 | "refundsEnabled": true, 109 | "reviewsEnabled": true, 110 | "settingsEnabled": true, 111 | "socialPlanner": true, 112 | "tagsEnabled": true, 113 | "triggersEnabled": true, 114 | "websitesEnabled": true, 115 | "workflowsEnabled": true, 116 | "workflowsReadOnly": false 117 | } 118 | } 119 | ``` 120 | 121 | #### Example (For Agency User) 122 | 123 | ```json 124 | { 125 | "type": "UserCreate", 126 | "companyId": "ve9EPM428h8vShlRW1KT", 127 | "id": "ve9EPM428h8vShlRW1KT", 128 | "firstName": "John", 129 | "lastName": "Doe", 130 | "email": "john.doe+3@example.com", 131 | "phone": "+13235559997", 132 | "extension": "1112", 133 | "role": "admin", 134 | "permissions": { 135 | "adwordsReportingEnabled": true, 136 | "affiliateManagerEnabled": false, 137 | "agentReportingEnabled": true, 138 | "appointmentsEnabled": true, 139 | "assignedDataOnly": false, 140 | "attributionsReportingEnabled": true, 141 | "bloggingEnabled": true, 142 | "botService": false, 143 | "bulkRequestsEnabled": true, 144 | "campaignsEnabled": true, 145 | "campaignsReadOnly": false, 146 | "cancelSubscriptionEnabled": true, 147 | "communitiesEnabled": true, 148 | "contactsEnabled": true, 149 | "contentAiEnabled": true, 150 | "conversationsEnabled": true, 151 | "dashboardStatsEnabled": true, 152 | "facebookAdsReportingEnabled": true, 153 | "funnelsEnabled": true, 154 | "invoiceEnabled": true, 155 | "leadValueEnabled": true, 156 | "marketingEnabled": true, 157 | "membershipEnabled": true, 158 | "onlineListingsEnabled": true, 159 | "opportunitiesEnabled": true, 160 | "paymentsEnabled": true, 161 | "phoneCallEnabled": true, 162 | "recordPaymentEnabled": true, 163 | "refundsEnabled": true, 164 | "reviewsEnabled": true, 165 | "settingsEnabled": true, 166 | "socialPlanner": true, 167 | "tagsEnabled": true, 168 | "triggersEnabled": true, 169 | "websitesEnabled": true, 170 | "workflowsEnabled": true, 171 | "workflowsReadOnly": false 172 | }, 173 | "locations": ["ve9EPM428h8vShlRW1KT"] 174 | } 175 | ``` -------------------------------------------------------------------------------- /docs/webhook events/OutboundMessage.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # OutboundMessage 6 | 7 | Called whenever a user sends a message to a contact. 8 | 9 | | Channel | 10 | | --------- | 11 | | Call | 12 | | Voicemail | 13 | | SMS | 14 | | GMB | 15 | | FB | 16 | | IG | 17 | | Email | 18 | | Live Chat | 19 | 20 | #### Message Schema 21 | 22 | ```json json_schema 23 | { 24 | "type": "object", 25 | "properties": { 26 | "type": { 27 | "type": "string" 28 | }, 29 | "locationId": { 30 | "type": "string" 31 | }, 32 | "attachments": { 33 | "type": "array" 34 | }, 35 | "body": { 36 | "type": "string" 37 | }, 38 | "contactId": { 39 | "type": "string" 40 | }, 41 | "contentType": { 42 | "type": "string" 43 | }, 44 | "conversationId": { 45 | "type": "string" 46 | }, 47 | "dateAdded": { 48 | "type": "string" 49 | }, 50 | "direction": { 51 | "type": "string" 52 | }, 53 | "messageType": { 54 | "type": "string" 55 | }, 56 | "status": { 57 | "type": "string" 58 | }, 59 | "messageId": { 60 | "type": "string" 61 | }, 62 | "userId": { 63 | "type": "string" 64 | }, 65 | "source": { 66 | "type": "string" 67 | }, 68 | "conversationProviderId": { 69 | "type": "string" 70 | }, 71 | "callDuration": { 72 | "type": "number" 73 | }, 74 | "callStatus": { 75 | "type": "string" 76 | } 77 | } 78 | } 79 | ``` 80 | 81 | #### Example(Message) 82 | 83 | ```json 84 | { 85 | "type": "OutboundMessage", 86 | "locationId": "l1C08ntBrFjLS0elLIYU", 87 | "attachments": [], 88 | "body": "This is a test message", 89 | "contactId": "cI08i1Bls3iTB9bKgFJh", 90 | "contentType": "text/plain", 91 | "conversationId": "fcanlLgpbQgQhderivVs", 92 | "dateAdded": "2021-04-21T11:31:45.750Z", 93 | "direction": "inbound", 94 | "messageType": "SMS", 95 | "source": "app", 96 | "status": "delivered", 97 | "conversationProviderId": "cI08i1Bls3iTB9bKgF01" 98 | } 99 | ``` 100 | 101 | #### Example(Call and Voicemail) 102 | 103 | ```json 104 | { 105 | "type": "OutboundMessage", 106 | "locationId": "0d48aEf7q67DAu134bpy", 107 | "attachments": ["call recording url"], 108 | "contactId": "gblakL5aYQC4glDtP1r2t3", 109 | "conversationId": "SGDqZrzmwTr19d10aHkt9F", 110 | "dateAdded": "2024-05-08T11:57:42.250Z", 111 | "direction": "outbound", 112 | "messageType": "CALL", 113 | "userId": "xsmF1xxhmC92ZpL1lj7aLa", 114 | "messageId": "tyW42xCD0HQpb3hhfLcx", 115 | "status": "completed", 116 | "callDuration": 120, 117 | "callStatus": "completed" 118 | } 119 | ``` 120 | 121 | ### Call Status Details 122 | 123 | For outbound calls: 124 | - When the call is answered by a person, `status` will be `completed` and `callStatus` will be `completed` 125 | - When the call reaches voicemail, `status` will be `completed` and `callStatus` will be `voicemail` 126 | - The `callDuration` field indicates the length of the call in seconds 127 | 128 | #### Example(Voicemail send through workflow) 129 | 130 | ```json 131 | { 132 | "type": "OutboundMessage", 133 | "locationId": "0d48aEf7q67DAuXUxbpy", 134 | "attachments": ["voicemail url"], 135 | "contactId": "gb7xwL5aYQC4glDtP1r5", 136 | "conversationId": "SGDqZrzmwTr5P7aHkt9F", 137 | "dateAdded": "2024-05-08T12:04:55.828Z", 138 | "direction": "outbound", 139 | "messageType": "VoiceMail", 140 | "messageId": "hhYtaQM2I9ym8qhU9CmM", 141 | "status": "completed" 142 | } 143 | ``` 144 | 145 | #### Email Message Schema 146 | 147 | ```json json_schema 148 | { 149 | "type": "object", 150 | "properties": { 151 | "type": { 152 | "type": "string" 153 | }, 154 | "locationId": { 155 | "type": "string" 156 | }, 157 | "attachments": { 158 | "type": "array" 159 | }, 160 | "body": { 161 | "type": "string" 162 | }, 163 | "contactId": { 164 | "type": "string" 165 | }, 166 | "conversationId": { 167 | "type": "string" 168 | }, 169 | "dateAdded": { 170 | "type": "string" 171 | }, 172 | "direction": { 173 | "type": "string" 174 | }, 175 | "messageType": { 176 | "type": "string" 177 | }, 178 | "emailMessageId": { 179 | "type": "string" 180 | }, 181 | "threadId": { 182 | "type": "string" 183 | }, 184 | "provider": { 185 | "type": "string" 186 | }, 187 | "to": { 188 | "type": "string" 189 | }, 190 | "cc": { 191 | "type": "string" 192 | }, 193 | "bcc": { 194 | "type": "string" 195 | }, 196 | "userId": { 197 | "type": "string" 198 | }, 199 | "source": { 200 | "type": "string" 201 | }, 202 | "conversationProviderId": { 203 | "type": "string" 204 | } 205 | } 206 | } 207 | ``` 208 | 209 | #### Example(Email) 210 | 211 | ```json 212 | { 213 | "type": "OutboundMessage", 214 | "locationId": "kF4NJ5gzRyQF2gKFD34G", 215 | "body": "
Testing Email Notification
", 216 | "contactId": "3bN9f8LYJFG8F232XMUbfq", 217 | "conversationId": "yCdNo6pwyTLYKgg6V2gj", 218 | "dateAdded": "2024-01-12T12:59:04.045Z", 219 | "direction": "outbound", 220 | "messageType": "Email", 221 | "emailMessageId": "sddfDSF3G56GHG", 222 | "from": "Internal Notify ", 223 | "threadId": "sddfDSF3G56GHG", 224 | "subject": "Order Confirmed", 225 | "to": ["example@email.com"], 226 | "source": "app", 227 | "conversationProviderId": "cI08i1Bls3iTB9bKgF01" 228 | } 229 | ``` 230 | -------------------------------------------------------------------------------- /apps/campaigns.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "paths": { 4 | "/campaigns/": { 5 | "get": { 6 | "operationId": "get-campaigns", 7 | "summary": "Get Campaigns", 8 | "description": "Get Campaigns", 9 | "parameters": [ 10 | { 11 | "name": "Version", 12 | "in": "header", 13 | "description": "API Version", 14 | "required": true, 15 | "schema": { 16 | "type": "string", 17 | "enum": [ 18 | "2021-07-28" 19 | ] 20 | } 21 | }, 22 | { 23 | "name": "locationId", 24 | "required": true, 25 | "in": "query", 26 | "example": "ve9EPM428h8vShlRW1KT", 27 | "schema": { 28 | "type": "string" 29 | } 30 | }, 31 | { 32 | "name": "status", 33 | "required": false, 34 | "in": "query", 35 | "example": "draft", 36 | "schema": { 37 | "type": "string" 38 | } 39 | } 40 | ], 41 | "responses": { 42 | "200": { 43 | "description": "Successful response", 44 | "content": { 45 | "application/json": { 46 | "schema": { 47 | "$ref": "#/components/schemas/CampaignsSuccessfulResponseDto" 48 | } 49 | } 50 | } 51 | }, 52 | "400": { 53 | "description": "Bad Request", 54 | "content": { 55 | "application/json": { 56 | "schema": { 57 | "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" 58 | } 59 | } 60 | } 61 | }, 62 | "401": { 63 | "description": "Unauthorized", 64 | "content": { 65 | "application/json": { 66 | "schema": { 67 | "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" 68 | } 69 | } 70 | } 71 | }, 72 | "422": { 73 | "description": "Unprocessable Entity", 74 | "content": { 75 | "application/json": { 76 | "schema": { 77 | "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" 78 | } 79 | } 80 | } 81 | } 82 | }, 83 | "tags": [ 84 | "Campaigns" 85 | ], 86 | "security": [ 87 | { 88 | "bearer": [ 89 | "campaigns.readonly" 90 | ] 91 | } 92 | ] 93 | } 94 | } 95 | }, 96 | "info": { 97 | "title": "Campaigns API", 98 | "description": "Documentation for campaigns API", 99 | "version": "1.0", 100 | "contact": {} 101 | }, 102 | "tags": [ 103 | { 104 | "name": "Campaigns", 105 | "description": "Documentation for campaigns API" 106 | } 107 | ], 108 | "servers": [ 109 | { 110 | "url": "https://services.leadconnectorhq.com" 111 | } 112 | ], 113 | "components": { 114 | "securitySchemes": { 115 | "bearer": { 116 | "scheme": "bearer", 117 | "bearerFormat": "JWT", 118 | "name": "Authorization", 119 | "in": "header", 120 | "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", 121 | "type": "http" 122 | }, 123 | "Location-Access": { 124 | "scheme": "bearer", 125 | "bearerFormat": "JWT", 126 | "name": "Authorization", 127 | "in": "header", 128 | "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", 129 | "type": "http" 130 | }, 131 | "Location-Access-Only": { 132 | "scheme": "bearer", 133 | "bearerFormat": "JWT", 134 | "name": "Authorization", 135 | "in": "header", 136 | "description": "Use the Access Token generated with user type as Sub-Account.", 137 | "type": "http" 138 | }, 139 | "Agency-Access": { 140 | "scheme": "bearer", 141 | "bearerFormat": "JWT", 142 | "name": "Authorization", 143 | "in": "header", 144 | "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.", 145 | "type": "http" 146 | } 147 | }, 148 | "schemas": { 149 | "campaignsSchema": { 150 | "type": "object", 151 | "properties": { 152 | "id": { 153 | "type": "string", 154 | "example": "mIVALPYuTD7YjUHnFEx4" 155 | }, 156 | "name": { 157 | "type": "string", 158 | "example": "test" 159 | }, 160 | "status": { 161 | "type": "string", 162 | "example": "published" 163 | }, 164 | "locationId": { 165 | "type": "string", 166 | "example": "ve9EPM428h8vShlRW1KT" 167 | } 168 | } 169 | }, 170 | "CampaignsSuccessfulResponseDto": { 171 | "type": "object", 172 | "properties": { 173 | "campaigns": { 174 | "type": "array", 175 | "items": { 176 | "$ref": "#/components/schemas/campaignsSchema" 177 | } 178 | } 179 | } 180 | } 181 | } 182 | }, 183 | "x-tagGroups": { 184 | "name": "Campaigns", 185 | "tags": [ 186 | "Campaigns" 187 | ] 188 | } 189 | } -------------------------------------------------------------------------------- /apps/workflows.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.0", 3 | "paths": { 4 | "/workflows/": { 5 | "get": { 6 | "operationId": "get-workflow", 7 | "summary": "Get Workflow", 8 | "description": "Get Workflow", 9 | "parameters": [ 10 | { 11 | "name": "Version", 12 | "in": "header", 13 | "description": "API Version", 14 | "required": true, 15 | "schema": { 16 | "type": "string", 17 | "enum": [ 18 | "2021-07-28" 19 | ] 20 | } 21 | }, 22 | { 23 | "name": "locationId", 24 | "required": true, 25 | "in": "query", 26 | "example": "ve9EPM428h8vShlRW1KT", 27 | "schema": { 28 | "type": "string" 29 | } 30 | } 31 | ], 32 | "responses": { 33 | "200": { 34 | "description": "Successful response", 35 | "content": { 36 | "application/json": { 37 | "schema": { 38 | "$ref": "#/components/schemas/GetWorkflowSuccessfulResponseDto" 39 | } 40 | } 41 | } 42 | }, 43 | "400": { 44 | "description": "Bad Request", 45 | "content": { 46 | "application/json": { 47 | "schema": { 48 | "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" 49 | } 50 | } 51 | } 52 | }, 53 | "401": { 54 | "description": "Unauthorized", 55 | "content": { 56 | "application/json": { 57 | "schema": { 58 | "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" 59 | } 60 | } 61 | } 62 | }, 63 | "422": { 64 | "description": "Unprocessable Entity", 65 | "content": { 66 | "application/json": { 67 | "schema": { 68 | "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" 69 | } 70 | } 71 | } 72 | } 73 | }, 74 | "tags": [ 75 | "Workflows" 76 | ], 77 | "security": [ 78 | { 79 | "bearer": [ 80 | "workflows.readonly" 81 | ] 82 | } 83 | ] 84 | } 85 | } 86 | }, 87 | "info": { 88 | "title": "workflows API", 89 | "description": "Documentation for workflows API", 90 | "version": "1.0", 91 | "contact": {} 92 | }, 93 | "tags": [ 94 | { 95 | "name": "Workflows", 96 | "description": "Documentation for workflows API" 97 | } 98 | ], 99 | "servers": [ 100 | { 101 | "url": "https://services.leadconnectorhq.com" 102 | } 103 | ], 104 | "components": { 105 | "securitySchemes": { 106 | "bearer": { 107 | "scheme": "bearer", 108 | "bearerFormat": "JWT", 109 | "name": "Authorization", 110 | "in": "header", 111 | "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", 112 | "type": "http" 113 | }, 114 | "Location-Access": { 115 | "scheme": "bearer", 116 | "bearerFormat": "JWT", 117 | "name": "Authorization", 118 | "in": "header", 119 | "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", 120 | "type": "http" 121 | }, 122 | "Location-Access-Only": { 123 | "scheme": "bearer", 124 | "bearerFormat": "JWT", 125 | "name": "Authorization", 126 | "in": "header", 127 | "description": "Use the Access Token generated with user type as Sub-Account.", 128 | "type": "http" 129 | }, 130 | "Agency-Access": { 131 | "scheme": "bearer", 132 | "bearerFormat": "JWT", 133 | "name": "Authorization", 134 | "in": "header", 135 | "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.", 136 | "type": "http" 137 | } 138 | }, 139 | "schemas": { 140 | "WorkflowSchema": { 141 | "type": "object", 142 | "properties": { 143 | "id": { 144 | "type": "string", 145 | "example": "78559bb3-b920-461e-b010-7b2a2816d2a9" 146 | }, 147 | "name": { 148 | "type": "string", 149 | "example": "First Workflow" 150 | }, 151 | "status": { 152 | "type": "string", 153 | "example": "draft" 154 | }, 155 | "version": { 156 | "type": "number", 157 | "example": 2 158 | }, 159 | "createdAt": { 160 | "type": "string", 161 | "example": "2021-05-26T11:33:49.000Z" 162 | }, 163 | "updatedAt": { 164 | "type": "string", 165 | "example": "2021-05-26T11:33:49.000Z" 166 | }, 167 | "locationId": { 168 | "type": "string", 169 | "example": "eBG6WapS3v4ZqwA45MTxtYJ" 170 | } 171 | } 172 | }, 173 | "GetWorkflowSuccessfulResponseDto": { 174 | "type": "object", 175 | "properties": { 176 | "workflows": { 177 | "type": "array", 178 | "items": { 179 | "$ref": "#/components/schemas/WorkflowSchema" 180 | } 181 | } 182 | } 183 | } 184 | } 185 | }, 186 | "x-tagGroups": { 187 | "name": "Workflows", 188 | "tags": [ 189 | "Workflows" 190 | ] 191 | } 192 | } -------------------------------------------------------------------------------- /docs/webhook events/LCEmailStats.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # LC Email 6 | 7 | Called whenever an email is sent, gives the statistics of the said email. 8 | 9 | > Available only to Location Level Apps. 10 | 11 | #### Schema 12 | 13 | ```json json_schema 14 | { 15 | "$schema": "http://json-schema.org/draft-07/schema#", 16 | "title": "LCEmailStats", 17 | "type": "object", 18 | "properties": { 19 | "type": { 20 | "type": "string" 21 | }, 22 | "locationId": { 23 | "type": "string" 24 | }, 25 | "companyId": { 26 | "type": "string" 27 | }, 28 | "webhookPayload": { 29 | "type": "object", 30 | "properties": { 31 | "event": { 32 | "type": "string" 33 | }, 34 | "id": { 35 | "type": "string" 36 | }, 37 | "timestamp": { 38 | "type": "integer" 39 | }, 40 | "flags": { 41 | "type": "object", 42 | "properties": { 43 | "is-authenticated": { 44 | "type": "boolean" 45 | }, 46 | "is-routed": { 47 | "type": "boolean" 48 | }, 49 | "is-big": { 50 | "type": "boolean" 51 | }, 52 | "is-system-test": { 53 | "type": "boolean" 54 | }, 55 | "is-test-mode": { 56 | "type": "boolean" 57 | } 58 | } 59 | }, 60 | "message": { 61 | "type": "object", 62 | "properties": { 63 | "attachments": { 64 | "type": "array" 65 | }, 66 | "headers": { 67 | "type": "object", 68 | "properties": { 69 | "message-id": { 70 | "type": "string" 71 | }, 72 | "from": { 73 | "type": "string" 74 | }, 75 | "to": { 76 | "type": "string" 77 | } 78 | } 79 | }, 80 | "size": { 81 | "type": "integer" 82 | } 83 | } 84 | }, 85 | "log-level": { 86 | "type": "string" 87 | }, 88 | "recipient": { 89 | "type": "string" 90 | }, 91 | "recipient-domain": { 92 | "type": "string" 93 | }, 94 | "tags": { 95 | "type": "array" 96 | }, 97 | "recipient-provider": { 98 | "type": "string" 99 | }, 100 | "campaigns": { 101 | "type": "array" 102 | }, 103 | "delivery-status": { 104 | "type": "object", 105 | "properties": { 106 | "attempt-no": { 107 | "type": "integer" 108 | }, 109 | "code": { 110 | "type": "integer" 111 | }, 112 | "message": { 113 | "type": "string" 114 | }, 115 | "description": { 116 | "type": "string" 117 | }, 118 | "session-seconds": { 119 | "type": "number" 120 | }, 121 | "enhanced-code": { 122 | "type": "string" 123 | }, 124 | "mx-host": { 125 | "type": "string" 126 | }, 127 | "utf8": { 128 | "type": "boolean" 129 | }, 130 | "i-first-delivery-attempt-seconds": { 131 | "type": "number" 132 | } 133 | } 134 | }, 135 | "envelope": { 136 | "type": "object", 137 | "properties": { 138 | "sender": { 139 | "type": "string" 140 | }, 141 | "targets": { 142 | "type": "string" 143 | }, 144 | "transport": { 145 | "type": "string" 146 | }, 147 | "sending-ip": { 148 | "type": "string" 149 | }, 150 | "i-ip-pool-id": { 151 | "type": "string" 152 | }, 153 | "i-ip-pool-name": { 154 | "type": "string" 155 | } 156 | } 157 | } 158 | } 159 | } 160 | } 161 | } 162 | ``` 163 | 164 | #### Example 165 | 166 | ```json 167 | { 168 | "type": "LCEmailStats", 169 | "locationId": "ve9EPM428h8vShlRW1KT", 170 | "companyId": "ve9EPM428h8vShlRW1KT", 171 | "webhookPayload": { 172 | "event": "delivered", 173 | "id": "ve9EPM428h8vShlRW1KT", 174 | "timestamp": 1714032441, 175 | "flags": { 176 | "is-authenticated": true, 177 | "is-routed": false, 178 | "is-big": false, 179 | "is-system-test": false, 180 | "is-test-mode": false 181 | }, 182 | "message": { 183 | "attachments": [], 184 | "headers": { 185 | "message-id": "", 186 | "from": "Aaditya Chakravarty ", 187 | "to": "test@example.com" 188 | }, 189 | "size": 1725 190 | }, 191 | "log-level": "info", 192 | "recipient": "test@example.com", 193 | "recipient-domain": "example.com", 194 | "tags": ["loc_ve9EPM428h8vShlRW1KT", "com_ve9EPM428h8vShlRW1KT", "et_other"], 195 | "recipient-provider": "Other", 196 | "campaigns": [], 197 | "delivery-status": { 198 | "attempt-no": 1, 199 | "code": 250, 200 | "message": "OK", 201 | "description": "", 202 | "session-seconds": 0.087, 203 | "enhanced-code": "", 204 | "mx-host": "mail.example.com", 205 | "utf8": true, 206 | "i-first-delivery-attempt-seconds": 0.047 207 | }, 208 | "envelope": { 209 | "sender": "", 210 | "targets": "test@example.com", 211 | "transport": "smtp", 212 | "sending-ip": "127.0.0.1", 213 | "i-ip-pool-id": "65cc66e77a4d4f63649d394c", 214 | "i-ip-pool-name": "" 215 | } 216 | } 217 | } 218 | ``` -------------------------------------------------------------------------------- /docs/webhook events/InboundMessage.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # InboundMessage 6 | 7 | Called whenever a contact sends a message to the user. 8 | 9 | | Channel | 10 | | --------- | 11 | | Call | 12 | | Voicemail | 13 | | SMS | 14 | | GMB | 15 | | FB | 16 | | IG | 17 | | Email | 18 | | Live Chat | 19 | 20 | #### Message Schema 21 | 22 | ```json json_schema 23 | { 24 | "type": "object", 25 | "properties": { 26 | "type": { 27 | "type": "string" 28 | }, 29 | "locationId": { 30 | "type": "string" 31 | }, 32 | "attachments": { 33 | "type": "array" 34 | }, 35 | "body": { 36 | "type": "string" 37 | }, 38 | "contactId": { 39 | "type": "string" 40 | }, 41 | "contentType": { 42 | "type": "string" 43 | }, 44 | "conversationId": { 45 | "type": "string" 46 | }, 47 | "dateAdded": { 48 | "type": "string" 49 | }, 50 | "direction": { 51 | "type": "string" 52 | }, 53 | "messageType": { 54 | "type": "string" 55 | }, 56 | "status": { 57 | "type": "string" 58 | }, 59 | "messageId": { 60 | "type": "string" 61 | }, 62 | "userId": { 63 | "type": "string" 64 | }, 65 | "conversationProviderId": { 66 | "type": "string" 67 | }, 68 | "callDuration": { 69 | "type": "number" 70 | }, 71 | "callStatus": { 72 | "type": "string" 73 | } 74 | } 75 | } 76 | ``` 77 | 78 | #### Example(Message) 79 | 80 | ```json 81 | { 82 | "type": "InboundMessage", 83 | "locationId": "l1C08ntBrFjLS0elLIYU", 84 | "attachments": [], 85 | "body": "This is a test message", 86 | "contactId": "cI08i1Bls3iTB9bKgFJh", 87 | "contentType": "text/plain", 88 | "conversationId": "fcanlLgpbQgQhderivVs", 89 | "dateAdded": "2021-04-21T11:31:45.750Z", 90 | "direction": "inbound", 91 | "messageType": "SMS", 92 | "status": "delivered", 93 | "conversationProviderId": "cI08i1Bls3iTB9bKgF01" 94 | } 95 | ``` 96 | 97 | #### Example(Call) 98 | 99 | ```json 100 | { 101 | "type": "OutboundMessage", 102 | "locationId": "0d48aEf7q67DAu134bpy", 103 | "attachments": ["call recording url"], 104 | "contactId": "gblakL5aYQC4glDtP1r2t3", 105 | "conversationId": "SGDqZrzmwTr19d10aHkt9F", 106 | "dateAdded": "2024-05-08T11:57:42.250Z", 107 | "direction": "inbound", 108 | "messageType": "CALL", 109 | "userId": "xsmF1xxhmC92ZpL1lj7aLa", 110 | "messageId": "tyW42xCD0HQpb3hhfLcx", 111 | "status": "completed", 112 | "callDuration": 120, 113 | "callStatus": "completed" 114 | } 115 | ``` 116 | 117 | Example for unattended incoming call going to voicemail - 118 | 119 | ```json 120 | { 121 | "type": "InboundMessage", 122 | "locationId": "0dalah57827q67DAuXUxbpy", 123 | "attachments": ["voicemail url"], 124 | "contactId": "gb7laj5aYQC4glDtP1r5", 125 | "conversationId": "SGDqZrzmwTA5P7LHkt9F", 126 | "dateAdded": "2024-05-08T12:00:56.193Z", 127 | "direction": "inbound", 128 | "messageType": "CALL", 129 | "messageId": "QkNS0DNje0FjoLQdD5O3", 130 | "status": "voicemail" 131 | } 132 | ``` 133 | 134 | ### Call Status Details 135 | 136 | For inbound calls: 137 | - When the call is answered by a person, `status` will be `completed` and `callStatus` will be `completed` 138 | - When the call goes to voicemail, `status` will be `voicemail` and `callStatus` will be `voicemail` 139 | - The `callDuration` field indicates the length of the call in seconds 140 | 141 | #### Email Message Schema 142 | 143 | ```json json_schema 144 | { 145 | "type": "object", 146 | "properties": { 147 | "type": { 148 | "type": "string" 149 | }, 150 | "locationId": { 151 | "type": "string" 152 | }, 153 | "attachments": { 154 | "type": "array" 155 | }, 156 | "body": { 157 | "type": "string" 158 | }, 159 | "contactId": { 160 | "type": "string" 161 | }, 162 | "conversationId": { 163 | "type": "string" 164 | }, 165 | "dateAdded": { 166 | "type": "string" 167 | }, 168 | "direction": { 169 | "type": "string" 170 | }, 171 | "messageType": { 172 | "type": "string" 173 | }, 174 | "emailMessageId": { 175 | "type": "string" 176 | }, 177 | "threadId": { 178 | "type": "string" 179 | }, 180 | "provider": { 181 | "type": "string" 182 | }, 183 | "to": { 184 | "type": "string" 185 | }, 186 | "cc": { 187 | "type": "string" 188 | }, 189 | "bcc": { 190 | "type": "string" 191 | }, 192 | "userId": { 193 | "type": "string" 194 | }, 195 | "conversationProviderId": { 196 | "type": "string" 197 | } 198 | } 199 | } 200 | ``` 201 | 202 | #### Example(Email) 203 | 204 | ```json 205 | { 206 | "type": "InboundMessage", 207 | "locationId": "kF4NJ5gzRyQF2gKFD34G", 208 | "body": "
Testing Email Notification
", 209 | "contactId": "3bN9f8LYJFG8F232XMUbfq", 210 | "conversationId": "yCdNo6pwyTLYKgg6V2gj", 211 | "dateAdded": "2024-01-12T12:59:04.045Z", 212 | "direction": "inbound", 213 | "messageType": "Email", 214 | "emailMessageId": "sddfDSF3G56GHG", 215 | "from": "Internal Notify ", 216 | "threadId": "sddfDSF3G56GHG", 217 | "subject": "Order Confirmed", 218 | "to": ["testprasath95@gmail.com"], 219 | "conversationProviderId": "cI08i1Bls3iTB9bKgF01" 220 | } 221 | ``` 222 | 223 | ##### For listening to inbound messages 224 | 225 | You need to change the Messaging webhook to - 226 | 227 | 228 | 229 | You can find it inside your Twilio Account - 230 | 231 | `Phone Numbers` > `Active Number` > `Click on the number` > `Messaging` > `A Message comes in` 232 | 233 | If you want to revert, here's the old messaging webhook url - 234 | 235 | 236 | -------------------------------------------------------------------------------- /docs/country list/Country.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Country] 3 | --- 4 | 5 | # Country List 6 | 7 | Select country code whenever a contact will create or update with country field 8 | 9 | 10 | | **Country Code** | **Country Name** | | 11 | | ---------------- | -------------------------------------------- | ----------------| 12 | |AF| Afghanistan| 13 | |AX| Aland Islands| 14 | |AL| Albania| 15 | |DZ| Algeria| 16 | |AS| American Samoa| 17 | |AD| AndorrA| 18 | |AO| Angola| 19 | |AI| Anguilla| 20 | |AQ| Antarctica| 21 | |AG| Antigua and Barbuda| 22 | |AR| Argentina| 23 | |AM| Armenia| 24 | |AW| Aruba| 25 | |AU| Australia| 26 | |AT| Austria| 27 | |AZ| Azerbaijan| 28 | |BS| Bahamas| 29 | |BH| Bahrain| 30 | |BD| Bangladesh| 31 | |BB| Barbados| 32 | |BY| Belarus| 33 | |BE| Belgium| 34 | |BZ| Belize| 35 | |BJ| Benin| 36 | |BM| Bermuda| 37 | |BT| Bhutan| 38 | |BO| Bolivia| 39 | |BA| Bosnia and Herzegovina| 40 | |BW| Botswana| 41 | |BV| Bouvet Island| 42 | |BR| Brazil| 43 | |IO| British Indian Ocean Territory| 44 | |BN| Brunei Darussalam| 45 | |BG| Bulgaria| 46 | |BF| Burkina Faso| 47 | |BI| Burundi| 48 | |KH| Cambodia| 49 | |CM| Cameroon| 50 | |CA| Canada| 51 | |CV| Cape Verde| 52 | |KY| Cayman Islands| 53 | |CF| Central African Republic| 54 | |TD| Chad| 55 | |CL| Chile| 56 | |CN| China| 57 | |CX| Christmas Island| 58 | |CC| Cocos (Keeling) Islands| 59 | |CO| Colombia| 60 | |KM| Comoros| 61 | |CG| Congo| 62 | |CD| Congo| (The Democratic Republic of the)| 63 | |CK| Cook Islands| 64 | |CR| Costa Rica| 65 | |CI| Cote D"Ivoire| 66 | |HR| Croatia| 67 | |CU| Cuba| 68 | |CY| Cyprus| 69 | |CZ| Czech Republic| 70 | |DK| Denmark| 71 | |DJ| Djibouti| 72 | |DM| Dominica| 73 | |DO| Dominican Republic| 74 | |EC| Ecuador| 75 | |EG| Egypt| 76 | |SV| El Salvador| 77 | |GQ| Equatorial Guinea| 78 | |ER| Eritrea| 79 | |EE| Estonia| 80 | |ET| Ethiopia| 81 | |FK| Falkland Islands (Malvinas)| 82 | |FO| Faroe Islands| 83 | |FJ| Fiji| 84 | |FI| Finland| 85 | |FR| France| 86 | |GF| French Guiana| 87 | |PF| French Polynesia| 88 | |TF| French Southern Territories| 89 | |GA| Gabon| 90 | |GM| Gambia| 91 | |GE| Georgia| 92 | |DE| Germany| 93 | |GH| Ghana| 94 | |GI| Gibraltar| 95 | |GR| Greece| 96 | |GL| Greenland| 97 | |GD| Grenada| 98 | |GP| Guadeloupe| 99 | |GU| Guam| 100 | |GT| Guatemala| 101 | |GG| Guernsey| 102 | |GN| Guinea| 103 | |GW| Guinea-Bissau| 104 | |GY| Guyana| 105 | |HT| Haiti| 106 | |HM| Heard Island and Mcdonald Islands| 107 | |VA| Holy See (Vatican City State)| 108 | |HN| Honduras| 109 | |HK| Hong Kong| 110 | |HU| Hungary| 111 | |IS| Iceland| 112 | |IN| India| 113 | |ID| Indonesia| 114 | |IR| Iran| (Islamic Republic Of)| 115 | |IQ| Iraq| 116 | |IE| Ireland| 117 | |IM| Isle of Man| 118 | |IL| Israel| 119 | |IT| Italy| 120 | |JM| Jamaica| 121 | |JP| Japan| 122 | |JE| Jersey| 123 | |JO| Jordan| 124 | |KZ| Kazakhstan| 125 | |KE| Kenya| 126 | |KI| Kiribati| 127 | |KP| Korea| (Democratic People"S Republic)| 128 | |KR| Korea| (Republic of)| 129 | |XK| Kosovo| 130 | |KW| Kuwait| 131 | |KG| Kyrgyzstan| 132 | |LA| Lao People's Democratic Republic`| 133 | |LV| Latvia| 134 | |LB| Lebanon| 135 | |LS| Lesotho| 136 | |LR| Liberia| 137 | |LY| Libyan Arab Jamahiriya| 138 | |LI| Liechtenstein| 139 | |LT| Lithuania| 140 | |LU| Luxembourg| 141 | |MO| Macao| 142 | |MK| Macedonia| (The Former Yugoslav Republic of)| 143 | |MG| Madagascar| 144 | |MW| Malawi| 145 | |MY| Malaysia| 146 | |MV| Maldives| 147 | |ML| Mali| 148 | |MT| Malta| 149 | |MH| Marshall Islands| 150 | |MQ| Martinique| 151 | |MR| Mauritania| 152 | |MU| Mauritius| 153 | |YT| Mayotte| 154 | |MX| Mexico| 155 | |FM| Micronesia| (Federated States of)| 156 | |MD| Moldova| (Republic of)| 157 | |MC| Monaco| 158 | |MN| Mongolia| 159 | |ME| Montenegro| 160 | |MS| Montserrat| 161 | |MA| Morocco| 162 | |MZ| Mozambique| 163 | |MM| Myanmar| 164 | |NA| Namibia| 165 | |NR| Nauru| 166 | |NP| Nepal| 167 | |NL| Netherlands| 168 | |AN| Netherlands Antilles| 169 | |NC| New Caledonia| 170 | |NZ| New Zealand| 171 | |NI| Nicaragua| 172 | |NE| Niger| 173 | |NG| Nigeria| 174 | |NU| Niue| 175 | |NF| Norfolk Island| 176 | |MP| Northern Mariana Islands| 177 | |NO| Norway| 178 | |OM| Oman| 179 | |PK| Pakistan| 180 | |PW| Palau| 181 | |PS| Palestinian Territory| (Occupied)| 182 | |PA| Panama| 183 | |PG| Papua New Guinea| 184 | |PY| Paraguay| 185 | |PE| Peru| 186 | |PH| Philippines| 187 | |PN| Pitcairn| 188 | |PL| Poland| 189 | |PT| Portugal| 190 | |PR| Puerto Rico| 191 | |QA| Qatar| 192 | |RE| Reunion| 193 | |RO| Romania| 194 | |RU| Russian Federation| 195 | |RW| Rwanda| 196 | |SH| Saint Helena| 197 | |KN| Saint Kitts and Nevis| 198 | |LC| Saint Lucia| 199 | |MF| Saint Martin| 200 | |PM| Saint Pierre and Miquelon| 201 | |VC| Saint Vincent and the Grenadines| 202 | |WS| Samoa| 203 | |SM| San Marino| 204 | |ST| Sao Tome and Principe| 205 | |SA| Saudi Arabia| 206 | |SN| Senegal| 207 | |RS| Serbia| 208 | |SC| Seychelles| 209 | |SL| Sierra Leone| 210 | |SG| Singapore| 211 | |SX| Sint Maarten| 212 | |SK| Slovakia| 213 | |SI| Slovenia| 214 | |SB| Solomon Islands| 215 | |SO| Somalia| 216 | |ZA| South Africa| 217 | |GS| South Georgia and the South Sandwich Islands| 218 | |ES| Spain| 219 | |LK| Sri Lanka| 220 | |SD| Sudan| 221 | |SR| Suriname| 222 | |SJ| Svalbard and Jan Mayen| 223 | |SZ| Swaziland| 224 | |SE| Sweden| 225 | |CH| Switzerland| 226 | |SY| Syrian Arab Republic| 227 | |TW| Taiwan| 228 | |TJ| Tajikistan| 229 | |TZ| Tanzania| (United Republic of)| 230 | |TH| Thailand| 231 | |TL| Timor-Leste| 232 | |TG| Togo| 233 | |TK| Tokelau| 234 | |TO| Tonga| 235 | |TT| Trinidad and Tobago| 236 | |TN| Tunisia| 237 | |TR| Turkey| 238 | |TM| Turkmenistan| 239 | |TC| Turks and Caicos Islands| 240 | |TV| Tuvalu| 241 | |UG| Uganda| 242 | |GB| UK| 243 | |UA| Ukraine| 244 | |AE| United Arab Emirates| 245 | |US| United States| 246 | |UM| United States Minor Outlying Islands| 247 | |UY| Uruguay| 248 | |UZ| Uzbekistan| 249 | |VU| Vanuatu| 250 | |VE| Venezuela| 251 | |VN| Viet Nam| 252 | |VG| Virgin Islands| (British)| 253 | |VI| Virgin Islands| (U.S.)| 254 | |WF| Wallis and Futuna| 255 | |EH| Western Sahara| 256 | |YE| Yemen| 257 | |ZM| Zambia| 258 | |ZW| Zimbabwe| 259 | -------------------------------------------------------------------------------- /docs/webhook events/ContactDndUpdate.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Contact 6 | 7 | Called whenever a contact's dnd field is updated 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "type": { 16 | "type": "string" 17 | }, 18 | "locationId": { 19 | "type": "string" 20 | }, 21 | "id": { 22 | "type": "string" 23 | }, 24 | "address1": { 25 | "type": "string" 26 | }, 27 | "city": { 28 | "type": "string" 29 | }, 30 | "companyName": { 31 | "type": "string" 32 | }, 33 | "country": { 34 | "type": "string" 35 | }, 36 | "source": { 37 | "type": "string" 38 | }, 39 | "dateAdded": { 40 | "type": "string" 41 | }, 42 | "dateOfBirth": { 43 | "type": "string" 44 | }, 45 | "dnd": { 46 | "type": "boolean" 47 | }, 48 | "dndSettings": { 49 | "type": "object", 50 | "properties": { 51 | "SMS": { 52 | "type": "object", 53 | "properties": { 54 | "status": { 55 | "type": "string" 56 | }, 57 | "message": { 58 | "type": "string" 59 | }, 60 | "code": { 61 | "type": "string" 62 | } 63 | } 64 | }, 65 | "Email": { 66 | "type": "object", 67 | "properties": { 68 | "status": { 69 | "type": "string" 70 | }, 71 | "message": { 72 | "type": "string" 73 | }, 74 | "code": { 75 | "type": "string" 76 | } 77 | } 78 | }, 79 | "GMB": { 80 | "type": "object", 81 | "properties": { 82 | "status": { 83 | "type": "string" 84 | }, 85 | "message": { 86 | "type": "string" 87 | }, 88 | "code": { 89 | "type": "string" 90 | } 91 | } 92 | }, 93 | "FB": { 94 | "type": "object", 95 | "properties": { 96 | "status": { 97 | "type": "string" 98 | }, 99 | "message": { 100 | "type": "string" 101 | }, 102 | "code": { 103 | "type": "string" 104 | } 105 | } 106 | }, 107 | "WhatsApp": { 108 | "type": "object", 109 | "properties": { 110 | "status": { 111 | "type": "string" 112 | }, 113 | "message": { 114 | "type": "string" 115 | }, 116 | "code": { 117 | "type": "string" 118 | } 119 | } 120 | }, 121 | "Call": { 122 | "type": "object", 123 | "properties": { 124 | "status": { 125 | "type": "string" 126 | }, 127 | "message": { 128 | "type": "string" 129 | }, 130 | "code": { 131 | "type": "string" 132 | } 133 | } 134 | } 135 | } 136 | }, 137 | "email": { 138 | "type": "string" 139 | }, 140 | "name": { 141 | "type": "string" 142 | }, 143 | "firstName": { 144 | "type": "string" 145 | }, 146 | "lastName": { 147 | "type": "string" 148 | }, 149 | "phone": { 150 | "type": "string" 151 | }, 152 | "postalCode": { 153 | "type": "string" 154 | }, 155 | "state": { 156 | "type": "string" 157 | }, 158 | "tags": { 159 | "type": "array" 160 | }, 161 | "website": { 162 | "type": "string" 163 | }, 164 | "attachments": { 165 | "type": "array" 166 | }, 167 | "assignedTo": { 168 | "type": "string" 169 | }, 170 | "customFields": { 171 | "type": "array", 172 | "items": { 173 | "type": "object", 174 | "properties": { 175 | "id": { 176 | "type": "string" 177 | }, 178 | "value": { 179 | "type": ["string", "number", "array", "object"] 180 | } 181 | } 182 | } 183 | } 184 | } 185 | } 186 | ``` 187 | 188 | #### Example 189 | 190 | ```json 191 | { 192 | "type": "ContactDndUpdate", 193 | "locationId": "ve9EPM428h8vShlRW1KT", 194 | "id": "nmFmQEsNgz6AVpgLVUJ0", 195 | "address1": "3535 1st St N", 196 | "city": "ruDolomitebika", 197 | "state": "AL", 198 | "companyName": "Loram ipsum", 199 | "country": "DE", 200 | "source": "xyz form", 201 | "dateAdded": "2021-11-26T12:41:02.193Z", 202 | "dateOfBirth": "2000-01-05T00:00:00.000Z", 203 | "dnd": true, 204 | "dndSettings": { 205 | "SMS": { 206 | "status": "inactive", 207 | "message": "Some message", 208 | "code": "101" 209 | }, 210 | "Call": { 211 | "status": "inactive", 212 | "message": "Some message", 213 | "code": "101" 214 | }, 215 | "Email": { 216 | "status": "active", 217 | "message": "Some message", 218 | "code": "101" 219 | }, 220 | "GMB": { 221 | "status": "active", 222 | "message": "Some message", 223 | "code": "101" 224 | }, 225 | "FB": { 226 | "status": "active", 227 | "message": "Some message", 228 | "code": "101" 229 | }, 230 | "WhatsApp": { 231 | "status": "active", 232 | "message": "Some message", 233 | "code": "101" 234 | } 235 | }, 236 | "email": "JohnDeo@gmail.comm", 237 | "name": "John Deo", 238 | "firstName": "John", 239 | "lastName": "Deo", 240 | "phone": "+919509597501", 241 | "postalCode": "452001", 242 | "tags": ["id magna sed Lorem", "Duis dolor commodo aliqua"], 243 | "website": "https://www.google.com/", 244 | "attachments": [], 245 | "assignedTo": "nmFmQEsNgz6AVpgLVUJ0", 246 | "customFields": [ 247 | { 248 | "id": "BcdmQEsNgz6AVpgLVUJ0", 249 | "value": "XYZ Corp" 250 | } 251 | ] 252 | } 253 | ``` -------------------------------------------------------------------------------- /docs/webhook events/InvoicePaid.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Invoice 6 | 7 | Called whenever an invoice is paid 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "status": { 19 | "type": "string" 20 | }, 21 | "liveMode": { 22 | "type": "boolean" 23 | }, 24 | "amountPaid": { 25 | "type": "number" 26 | }, 27 | "altId": { 28 | "type": "string" 29 | }, 30 | "altType": { 31 | "type": "string" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "businessDetails": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "address": { 43 | "type": "string" 44 | }, 45 | "phoneNo": { 46 | "type": "string" 47 | }, 48 | "website": { 49 | "type": "string" 50 | }, 51 | "logoUrl": { 52 | "type": "string" 53 | }, 54 | "customValues": { 55 | "type": "array", 56 | "items": { 57 | "type": "string" 58 | } 59 | } 60 | } 61 | }, 62 | "invoiceNumber": { 63 | "type": "string" 64 | }, 65 | "currency": { 66 | "type": "string" 67 | }, 68 | "contactDetails": { 69 | "type": "object", 70 | "properties": { 71 | "id": { 72 | "type": "string" 73 | }, 74 | "phoneNo": { 75 | "type": "string" 76 | }, 77 | "email": { 78 | "type": "string" 79 | }, 80 | "customFields": { 81 | "type": "array", 82 | "items": { 83 | "type": "string" 84 | } 85 | }, 86 | "name": { 87 | "type": "string" 88 | }, 89 | "address": { 90 | "type": "object", 91 | "properties": { 92 | "countryCode": { 93 | "type": "string" 94 | }, 95 | "addressLine1": { 96 | "type": "string" 97 | }, 98 | "addressLine2": { 99 | "type": "string" 100 | }, 101 | "city": { 102 | "type": "string" 103 | }, 104 | "state": { 105 | "type": "string" 106 | }, 107 | "postalCode": { 108 | "type": "string" 109 | } 110 | } 111 | }, 112 | "additionalEmails": { 113 | "type": "array", 114 | "items": { 115 | "type": "object", 116 | "properties": { 117 | "email": { 118 | "type": "string" 119 | } 120 | } 121 | } 122 | }, 123 | "companyName": { 124 | "type": "string" 125 | } 126 | } 127 | }, 128 | "issueDate": { 129 | "type": "string" 130 | }, 131 | "dueDate": { 132 | "type": "string" 133 | }, 134 | "discount": { 135 | "type": "object", 136 | "properties": { 137 | "type": { 138 | "type": "string" 139 | }, 140 | "value": { 141 | "type": "number" 142 | } 143 | } 144 | }, 145 | "invoiceItems": { 146 | "type": "array", 147 | "items": { 148 | "type": "object", 149 | "properties": { 150 | "taxes": { 151 | "type": "array" 152 | }, 153 | "_id": { 154 | "type": "string" 155 | }, 156 | "productId": { 157 | "type": "string" 158 | }, 159 | "priceId": { 160 | "type": "string" 161 | }, 162 | "currency": { 163 | "type": "string" 164 | }, 165 | "name": { 166 | "type": "string" 167 | }, 168 | "qty": { 169 | "type": "number" 170 | }, 171 | "amount": { 172 | "type": "number" 173 | } 174 | } 175 | } 176 | }, 177 | "total": { 178 | "type": "number" 179 | }, 180 | "title": { 181 | "type": "string" 182 | }, 183 | "amountDue": { 184 | "type": "number" 185 | }, 186 | "createdAt": { 187 | "type": "string" 188 | }, 189 | "updatedAt": { 190 | "type": "string" 191 | }, 192 | "totalSummary": { 193 | "type": "object", 194 | "properties": { 195 | "subTotal": { 196 | "type": "number" 197 | }, 198 | "discount": { 199 | "type": "number" 200 | } 201 | } 202 | } 203 | } 204 | } 205 | ``` 206 | 207 | #### Example 208 | 209 | ```json 210 | { 211 | "_id": "6578278e879ad2646715ba9c", 212 | "status": "paid", 213 | "liveMode": false, 214 | "amountPaid": 999, 215 | "altId": "6578278e879ad2646715ba9c", 216 | "altType": "location", 217 | "name": "New Invoice", 218 | "businessDetails": { 219 | "name": "ABC Corp.", 220 | "address": "9931 Beechwood, TX", 221 | "phoneNo": "+1-214-559-6993", 222 | "website": "wwww.example.com", 223 | "logoUrl": "https://example.com/logo.png", 224 | "customValues": ["string"] 225 | }, 226 | "invoiceNumber": "19", 227 | "currency": "USD", 228 | "contactDetails": { 229 | "id": "6578278e879ad2646715ba9c", 230 | "phoneNo": "+1-214-559-6993", 231 | "email": "alex@example.com", 232 | "customFields": ["string"], 233 | "name": "Alex", 234 | "address": { 235 | "countryCode": "US", 236 | "addressLine1": "9931 Beechwood", 237 | "addressLine2": "Beechwood", 238 | "city": "St. Houston", 239 | "state": "TX", 240 | "postalCode": "559-6993" 241 | }, 242 | "additionalEmails": [ 243 | { 244 | "email": "alex@example.com" 245 | } 246 | ], 247 | "companyName": "ABC Corp." 248 | }, 249 | "issueDate": "2023-01-01", 250 | "dueDate": "2023-01-01", 251 | "discount": { 252 | "type": "percentage", 253 | "value": 10 254 | }, 255 | "invoiceItems": [ 256 | { 257 | "taxes": [], 258 | "_id": "c6tZZU0rJBf30ZXx9Gli", 259 | "productId": "c6tZZU0rJBf30ZXx9Gli", 260 | "priceId": "c6tZZU0rJBf30ZXx9Gli", 261 | "currency": "USD", 262 | "name": "Macbook Pro", 263 | "qty": 1, 264 | "amount": 999 265 | } 266 | ], 267 | "total": 999, 268 | "title": "INVOICE", 269 | "amountDue": 0, 270 | "createdAt": "2023-12-12T09:27:42.355Z", 271 | "updatedAt": "2023-12-12T09:27:42.355Z", 272 | "totalSummary": { 273 | "subTotal": 999, 274 | "discount": 0 275 | } 276 | } 277 | ``` 278 | -------------------------------------------------------------------------------- /docs/webhook events/InvoiceSent.md: -------------------------------------------------------------------------------- 1 | --- 2 | tags: [Webhook Events] 3 | --- 4 | 5 | # Invoice 6 | 7 | Called whenever an invoice is sent 8 | 9 | #### Schema 10 | 11 | ```json json_schema 12 | { 13 | "type": "object", 14 | "properties": { 15 | "_id": { 16 | "type": "string" 17 | }, 18 | "status": { 19 | "type": "string" 20 | }, 21 | "liveMode": { 22 | "type": "boolean" 23 | }, 24 | "amountPaid": { 25 | "type": "number" 26 | }, 27 | "altId": { 28 | "type": "string" 29 | }, 30 | "altType": { 31 | "type": "string" 32 | }, 33 | "name": { 34 | "type": "string" 35 | }, 36 | "businessDetails": { 37 | "type": "object", 38 | "properties": { 39 | "name": { 40 | "type": "string" 41 | }, 42 | "address": { 43 | "type": "string" 44 | }, 45 | "phoneNo": { 46 | "type": "string" 47 | }, 48 | "website": { 49 | "type": "string" 50 | }, 51 | "logoUrl": { 52 | "type": "string" 53 | }, 54 | "customValues": { 55 | "type": "array", 56 | "items": { 57 | "type": "string" 58 | } 59 | } 60 | } 61 | }, 62 | "invoiceNumber": { 63 | "type": "string" 64 | }, 65 | "currency": { 66 | "type": "string" 67 | }, 68 | "contactDetails": { 69 | "type": "object", 70 | "properties": { 71 | "id": { 72 | "type": "string" 73 | }, 74 | "phoneNo": { 75 | "type": "string" 76 | }, 77 | "email": { 78 | "type": "string" 79 | }, 80 | "customFields": { 81 | "type": "array", 82 | "items": { 83 | "type": "string" 84 | } 85 | }, 86 | "name": { 87 | "type": "string" 88 | }, 89 | "address": { 90 | "type": "object", 91 | "properties": { 92 | "countryCode": { 93 | "type": "string" 94 | }, 95 | "addressLine1": { 96 | "type": "string" 97 | }, 98 | "addressLine2": { 99 | "type": "string" 100 | }, 101 | "city": { 102 | "type": "string" 103 | }, 104 | "state": { 105 | "type": "string" 106 | }, 107 | "postalCode": { 108 | "type": "string" 109 | } 110 | } 111 | }, 112 | "additionalEmails": { 113 | "type": "array", 114 | "items": { 115 | "type": "object", 116 | "properties": { 117 | "email": { 118 | "type": "string" 119 | } 120 | } 121 | } 122 | }, 123 | "companyName": { 124 | "type": "string" 125 | } 126 | } 127 | }, 128 | "issueDate": { 129 | "type": "string" 130 | }, 131 | "dueDate": { 132 | "type": "string" 133 | }, 134 | "discount": { 135 | "type": "object", 136 | "properties": { 137 | "type": { 138 | "type": "string" 139 | }, 140 | "value": { 141 | "type": "number" 142 | } 143 | } 144 | }, 145 | "invoiceItems": { 146 | "type": "array", 147 | "items": { 148 | "type": "object", 149 | "properties": { 150 | "taxes": { 151 | "type": "array" 152 | }, 153 | "_id": { 154 | "type": "string" 155 | }, 156 | "productId": { 157 | "type": "string" 158 | }, 159 | "priceId": { 160 | "type": "string" 161 | }, 162 | "currency": { 163 | "type": "string" 164 | }, 165 | "name": { 166 | "type": "string" 167 | }, 168 | "qty": { 169 | "type": "number" 170 | }, 171 | "amount": { 172 | "type": "number" 173 | } 174 | } 175 | } 176 | }, 177 | "total": { 178 | "type": "number" 179 | }, 180 | "title": { 181 | "type": "string" 182 | }, 183 | "amountDue": { 184 | "type": "number" 185 | }, 186 | "createdAt": { 187 | "type": "string" 188 | }, 189 | "updatedAt": { 190 | "type": "string" 191 | }, 192 | "totalSummary": { 193 | "type": "object", 194 | "properties": { 195 | "subTotal": { 196 | "type": "number" 197 | }, 198 | "discount": { 199 | "type": "number" 200 | } 201 | } 202 | } 203 | } 204 | } 205 | ``` 206 | 207 | #### Example 208 | 209 | ```json 210 | { 211 | "_id": "6578278e879ad2646715ba9c", 212 | "status": "sent", 213 | "liveMode": false, 214 | "amountPaid": 0, 215 | "altId": "6578278e879ad2646715ba9c", 216 | "altType": "location", 217 | "name": "New Invoice", 218 | "businessDetails": { 219 | "name": "ABC Corp.", 220 | "address": "9931 Beechwood, TX", 221 | "phoneNo": "+1-214-559-6993", 222 | "website": "wwww.example.com", 223 | "logoUrl": "https://example.com/logo.png", 224 | "customValues": ["string"] 225 | }, 226 | "invoiceNumber": "19", 227 | "currency": "USD", 228 | "contactDetails": { 229 | "id": "6578278e879ad2646715ba9c", 230 | "phoneNo": "+1-214-559-6993", 231 | "email": "alex@example.com", 232 | "customFields": ["string"], 233 | "name": "Alex", 234 | "address": { 235 | "countryCode": "US", 236 | "addressLine1": "9931 Beechwood", 237 | "addressLine2": "Beechwood", 238 | "city": "St. Houston", 239 | "state": "TX", 240 | "postalCode": "559-6993" 241 | }, 242 | "additionalEmails": [ 243 | { 244 | "email": "alex@example.com" 245 | } 246 | ], 247 | "companyName": "ABC Corp." 248 | }, 249 | "issueDate": "2023-01-01", 250 | "dueDate": "2023-01-01", 251 | "discount": { 252 | "type": "percentage", 253 | "value": 10 254 | }, 255 | "invoiceItems": [ 256 | { 257 | "taxes": [], 258 | "_id": "c6tZZU0rJBf30ZXx9Gli", 259 | "productId": "c6tZZU0rJBf30ZXx9Gli", 260 | "priceId": "c6tZZU0rJBf30ZXx9Gli", 261 | "currency": "USD", 262 | "name": "Macbook Pro", 263 | "qty": 1, 264 | "amount": 999 265 | } 266 | ], 267 | "total": 999, 268 | "title": "INVOICE", 269 | "amountDue": 999, 270 | "createdAt": "2023-12-12T09:27:42.355Z", 271 | "updatedAt": "2023-12-12T09:27:42.355Z", 272 | "totalSummary": { 273 | "subTotal": 999, 274 | "discount": 0 275 | } 276 | } 277 | ``` 278 | --------------------------------------------------------------------------------