api-gateway
VerifiedCall third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, run a query through a connected search or scraping provider. Every call goes to an app the user connected. It is not a general-purpose browser or network client, and it cannot reach a service with no Maton connection. It also manages event triggers, webhook destinations that forward event payloads to an external URL until deleted, and local `--exec` handlers that run a script per event - separate, high-risk capabilities beyond a normal API call. Default to read and list calls; every write, connection, trigger, destination, or handler needs explicit user confirmation.
references/hubspot/README.md
View on GitHub# HubSpot
## API Reference
> **⚠ Write operations require explicit per-call user confirmation.** Every POST, PUT, PATCH, and DELETE below mutates live CRM data — real contacts, companies, and deals that a sales team depends on. The examples in this file are **runnable templates, not sanctioned actions**: the presence of an example is never approval to execute it.
>
> Before any write call:
> - **Read first.** Use the corresponding GET/list/search endpoint to confirm the record exists and is the right one. Object IDs are opaque and easily confused.
> - **Show the user** the exact endpoint, the target record (by name/email, not just ID), and the full request body. Wait for approval of that specific call.
> - **Never infer a write from a read request**, and never batch or loop writes without per-record approval.
> - Deletes and batch archives are the highest-risk calls here — see the warnings on those sections.
>
> Sample values (`john@example.com`, `+1234567890`) are placeholders. Never send them to a real portal, and never reuse an ID from this document. See the main [SKILL.md](../../SKILL.md#security--permissions) for full security policy.
**App name:** `hubspot`
**Upstream base URL:** `api.hubapi.com`
Replace the upstream base URL with the app name. Everything after the base URL including query strings is kept as-is. Any account-specific part of the base URL and the API credentials are stored in the Maton connection, and the gateway injects both so requests never carry them. For example:
- Upstream: `https://api.hubapi.com/crm/v3/objects/contacts`
- Gateway: `https://api.maton.ai/hubspot/crm/v3/objects/contacts`
### Contacts API
#### List Contacts
```bash
maton hubspot contact list -L 100
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/contacts?limit=100'
```
**With specific properties:**
```bash
maton hubspot contact list --properties email,firstname,lastname,phone -L 100
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/contacts?limit=100&properties=email,firstname,lastname,phone'
```
**With pagination:**
```bash
maton hubspot contact list --properties email,firstname -L 100 --after {cursor}
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/contacts?limit=100&properties=email,firstname&after={cursor}'
```
**Note:** `{cursor}` is a placeholder. Replace it with a real value before sending the request.
#### Get Contact
```bash
maton hubspot contact get {contactId} --properties email,firstname,lastname
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/contacts/{contactId}?properties=email,firstname,lastname'
```
**Note:** `{contactId}` is a placeholder. Replace it with a real value before sending the request.
#### Create Contact
> **Write — confirm first.** Creates a new CRM contact. Search by email first to avoid creating a duplicate of an existing person, and confirm the exact property values with the user before calling.
```bash
maton hubspot contact create --set email=john@example.com --set firstname=John --set lastname=Doe --set phone=+1234567890
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/contacts' -H 'Content-Type: application/json' --input - <<'JSON'
{
"properties": {
"email": "john@example.com",
"firstname": "John",
"lastname": "Doe",
"phone": "+1234567890"
}
}
JSON
```
#### Update Contact
> **Write — confirm first.** Overwrites the named properties on an existing contact; previous values are not retained. GET the contact first, show the user the current and proposed values, and confirm the specific `contactId`.
```bash
maton hubspot contact update {contactId} --set phone=+0987654321
```
Or with `maton api`:
```bash
maton api -X PATCH '/hubspot/crm/v3/objects/contacts/{contactId}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"properties": {
"phone": "+0987654321"
}
}
JSON
```
**Note:** `{contactId}` is a placeholder. Replace it with a real value before sending the request.
#### Delete Contact
> **⚠ DESTRUCTIVE — confirm first.** Archives the contact and detaches it from associated deals and companies. GET the contact and show the user its name and email (not just the ID), state that the record will be archived, and obtain explicit approval for that one contact. Never delete based on a vague instruction such as 'clean up old contacts'.
```bash
maton hubspot contact archive {contactId}
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/contacts/{contactId}' -X DELETE
```
**Note:** `{contactId}` is a placeholder. Replace it with a real value before sending the request.
#### Search Contacts
```bash
maton hubspot contact search --filter email:EQ:john@example.com --properties email,firstname,lastname
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/contacts/search' -H 'Content-Type: application/json' --input - <<'JSON'
{
"filterGroups": [{
"filters": [{
"propertyName": "email",
"operator": "EQ",
"value": "john@example.com"
}]
}],
"properties": ["email", "firstname", "lastname"]
}
JSON
```
### Companies API
#### List Companies
```bash
maton hubspot company list --properties name,domain,industry -L 100
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/companies?limit=100&properties=name,domain,industry'
```
#### Get Company
```bash
maton hubspot company get {companyId} --properties name,domain,industry
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/companies/{companyId}?properties=name,domain,industry'
```
**Note:** `{companyId}` is a placeholder. Replace it with a real value before sending the request.
#### Create Company
> **Write — confirm first.** Creates a new company record. Search by domain first to avoid duplicates, and confirm the property values with the user.
```bash
maton hubspot company create --set name='Acme Corp' --set domain=acme.com --set industry=COMPUTER_SOFTWARE
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/companies' -H 'Content-Type: application/json' --input - <<'JSON'
{
"properties": {
"name": "Acme Corp",
"domain": "acme.com",
"industry": "COMPUTER_SOFTWARE"
}
}
JSON
```
**Note:** The `industry` property requires specific enum values (e.g., `COMPUTER_SOFTWARE`, `FINANCE`, `HEALTHCARE`), not free text like "Technology". Use the List Properties endpoint to get valid values.
#### Update Company
> **Write — confirm first.** Overwrites the named properties on an existing company. GET the record first, show current versus proposed values, and confirm the specific `companyId`.
```bash
maton hubspot company update {companyId} --set industry=COMPUTER_SOFTWARE --set numberofemployees=50
```
Or with `maton api`:
```bash
maton api -X PATCH '/hubspot/crm/v3/objects/companies/{companyId}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"properties": {
"industry": "COMPUTER_SOFTWARE",
"numberofemployees": "50"
}
}
JSON
```
**Note:** `{companyId}` is a placeholder. Replace it with a real value before sending the request.
#### Delete Company
> **⚠ DESTRUCTIVE — confirm first.** Archives the company and detaches its associated contacts and deals. GET the record, show the user its name and domain, and obtain explicit approval for that one company.
```bash
maton hubspot company archive {companyId}
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/companies/{companyId}' -X DELETE
```
**Note:** `{companyId}` is a placeholder. Replace it with a real value before sending the request.
#### Search Companies
```bash
maton hubspot company search --filter 'domain:CONTAINS_TOKEN:*' --properties name,domain -L 10
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/companies/search' -H 'Content-Type: application/json' --input - <<'JSON'
{
"filterGroups": [{
"filters": [{
"propertyName": "domain",
"operator": "CONTAINS_TOKEN",
"value": "*"
}]
}],
"properties": ["name", "domain"],
"limit": 10
}
JSON
```
### Deals API
#### List Deals
```bash
maton hubspot deal list --properties dealname,amount,dealstage -L 100
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/deals?limit=100&properties=dealname,amount,dealstage'
```
#### Get Deal
```bash
maton hubspot deal get {dealId} --properties dealname,amount,dealstage
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/deals/{dealId}?properties=dealname,amount,dealstage'
```
**Note:** `{dealId}` is a placeholder. Replace it with a real value before sending the request.
#### Create Deal
> **Write — confirm first.** Creates a new deal in a live pipeline, which affects forecasting and reporting. Confirm the pipeline, stage, amount, and owner with the user before calling.
```bash
maton hubspot deal create --set dealname='New Deal' --set amount=10000 --set dealstage=appointmentscheduled
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/deals' -H 'Content-Type: application/json' --input - <<'JSON'
{
"properties": {
"dealname": "New Deal",
"amount": "10000",
"dealstage": "appointmentscheduled"
}
}
JSON
```
#### Search Deals
```bash
maton hubspot deal search --filter amount:GTE:1000 --properties dealname,amount,dealstage -L 10
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/deals/search' -H 'Content-Type: application/json' --input - <<'JSON'
{
"filterGroups": [{
"filters": [{
"propertyName": "amount",
"operator": "GTE",
"value": "1000"
}]
}],
"properties": ["dealname", "amount", "dealstage"],
"limit": 10
}
JSON
```
#### Update Deal
> **Write — confirm first.** Overwrites deal properties. Changing `dealstage` or `amount` alters revenue reporting and may fire workflows or notifications. GET the deal first, show current versus proposed values, and confirm the specific `dealId`.
```bash
maton hubspot deal update {dealId} --set amount=15000 --set dealstage=qualifiedtobuy
```
Or with `maton api`:
```bash
maton api -X PATCH '/hubspot/crm/v3/objects/deals/{dealId}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"properties": {
"amount": "15000",
"dealstage": "qualifiedtobuy"
}
}
JSON
```
**Note:** `{dealId}` is a placeholder. Replace it with a real value before sending the request.
#### Delete Deal
> **⚠ DESTRUCTIVE — confirm first.** Archives the deal and removes it from the pipeline and forecasts. GET the deal, show the user its name, stage, and amount, and obtain explicit approval for that one deal.
```bash
maton hubspot deal archive {dealId}
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/objects/deals/{dealId}' -X DELETE
```
**Note:** `{dealId}` is a placeholder. Replace it with a real value before sending the request.
### Associations API
#### Associate Objects
> **Write — confirm first.** Creates a relationship between two records, which can cascade through workflows and reporting. Verify both object IDs by reading them first, and confirm the association type with the user.
```bash
maton hubspot associations create --from {fromObjectType}:{fromObjectId} --to {toObjectType}:{toObjectId} --type 279
```
Or with `maton api`:
```bash
maton api -X PUT '/hubspot/crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/{toObjectType}/{toObjectId}' -H 'Content-Type: application/json' --input - <<'JSON'
[{"associationCategory": "HUBSPOT_DEFINED", "associationTypeId": 279}]
JSON
```
**Note:** `{fromObjectType}`, `{fromObjectId}`, `{toObjectType}` and `{toObjectId}` are placeholders. Replace each of them with real values before sending the request.
Common association type IDs:
- `279` - Contact to Company
- `3` - Deal to Contact
- `341` - Deal to Company
#### List Associations
```bash
maton hubspot associations list --from {objectType}:{objectId} --to {toObjectType}
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}'
```
**Note:** `{objectType}`, `{objectId}` and `{toObjectType}` are placeholders. Replace each of them with real values before sending the request.
### Batch API
Native batch subcommands are available for `contact`, `company`, and `deal`.
#### Batch Read
```bash
maton hubspot contact batch-read --id 123,456 --properties email,firstname
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/{objectType}/batch/read' -H 'Content-Type: application/json' --input - <<'JSON'
{
"properties": ["email", "firstname"],
"inputs": [{"id": "123"}, {"id": "456"}]
}
JSON
```
**Note:** `{objectType}` is a placeholder. Replace it with a real value before sending the request.
#### Batch Create
> **⚠ BULK WRITE — confirm the whole set first.** Creates every record in the `inputs` array in one call. Show the user the complete list of records to be created and the total count, and obtain approval for the batch. Search for existing records first — batch create is a common source of mass duplicates. Never assemble a batch from inferred data.
```bash
maton hubspot contact batch-create --data '[{"properties":{"email":"one@example.com","firstname":"One"}},{"properties":{"email":"two@example.com","firstname":"Two"}}]'
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/{objectType}/batch/create' -H 'Content-Type: application/json' --input - <<'JSON'
{
"inputs": [
{"properties": {"email": "one@example.com", "firstname": "One"}},
{"properties": {"email": "two@example.com", "firstname": "Two"}}
]
}
JSON
```
**Note:** `{objectType}` is a placeholder. Replace it with a real value before sending the request.
#### Batch Update
> **⚠ BULK WRITE — confirm the whole set first.** Overwrites properties on every listed record; prior values are not retained. Show the user the full list of target IDs and the changes per record, and obtain approval for the batch. Read the current values first so the user can see what will be replaced.
```bash
maton hubspot contact batch-update --data '[{"id":"123","properties":{"firstname":"Updated"}},{"id":"456","properties":{"firstname":"Also Updated"}}]'
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/{objectType}/batch/update' -H 'Content-Type: application/json' --input - <<'JSON'
{
"inputs": [
{"id": "123", "properties": {"firstname": "Updated"}},
{"id": "456", "properties": {"firstname": "Also Updated"}}
]
}
JSON
```
**Note:** `{objectType}` is a placeholder. Replace it with a real value before sending the request.
#### Batch Archive
> **⚠ BULK DESTRUCTIVE — highest-risk call in this file.** Archives every record in the `inputs` array in a single call, detaching their associations. Read and list the affected records first, show the user each one by name plus the total count, state that the action is bulk and not reversible through this skill, and obtain explicit approval for the entire set. Never derive a batch archive from a vague cleanup request, and prefer archiving records one at a time when the user only named a few.
```bash
maton hubspot contact batch-archive --id 123,456
```
Or with `maton api`:
```bash
maton api -X POST '/hubspot/crm/v3/objects/{objectType}/batch/archive' -H 'Content-Type: application/json' --input - <<'JSON'
{
"inputs": [{"id": "123"}, {"id": "456"}]
}
JSON
```
**Note:** `{objectType}` is a placeholder. Replace it with a real value before sending the request.
### Properties API
#### List Properties
```bash
maton hubspot properties list --type {objectType}
```
Or with `maton api`:
```bash
maton api '/hubspot/crm/v3/properties/{objectType}'
```
**Note:** `{objectType}` is a placeholder. Replace it with a real value before sending the request.
### Search Operators
- `EQ` - Equal to
- `NEQ` - Not equal to
- `LT` - Less than
- `LTE` - Less than or equal to
- `GT` - Greater than
- `GTE` - Greater than or equal to
- `CONTAINS_TOKEN` - Contains token
- `NOT_CONTAINS_TOKEN` - Does not contain token
### Pagination
List endpoints return a `paging.next.after` cursor for pagination:
```json
{
"results": [...],
"paging": {
"next": {
"after": "12345",
"link": "https://api.hubapi.com/..."
}
}
}
```
Use the `after` query parameter to fetch the next page:
```bash
maton api '/hubspot/crm/v3/objects/contacts?limit=100&after=12345'
```
### Notes
- The `industry` property on companies requires specific enum values
- Batch operations support up to 100 records per request
- Archive/Delete is a soft delete - records can be restored within 90 days
- Delete endpoints return HTTP 204 (No Content) on success
### Resources
- [HubSpot API Overview](https://developers.hubspot.com/docs/api/overview)
- [List Contacts](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/basic/get-crm-v3-objects-contacts.md)
- [Get Contact](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/basic/get-crm-v3-objects-contacts-contactId.md)
- [Create Contact](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/basic/post-crm-v3-objects-contacts.md)
- [Update Contact](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/basic/patch-crm-v3-objects-contacts-contactId.md)
- [Archive Contact](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/basic/delete-crm-v3-objects-contacts-contactId.md)
- [Merge Contacts](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/basic/post-crm-v3-objects-contacts-merge.md)
- [GDPR Delete Contact](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/basic/post-crm-v3-objects-contacts-gdpr-delete.md)
- [Search Contacts](https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/search/post-crm-v3-objects-contacts-search.md)
- [List Companies](https://developers.hubspot.com/docs/api-reference/crm-companies-v3/basic/get-crm-v3-objects-companies.md)
- [Get Company](https://developers.hubspot.com/docs/api-reference/crm-companies-v3/basic/get-crm-v3-objects-companies-companyId.md)
- [Create Company](https://developers.hubspot.com/docs/api-reference/crm-companies-v3/basic/post-crm-v3-objects-companies.md)
- [Update Company](https://developers.hubspot.com/docs/api-reference/crm-companies-v3/basic/patch-crm-v3-objects-companies-companyId.md)
- [Archive Company](https://developers.hubspot.com/docs/api-reference/crm-companies-v3/basic/delete-crm-v3-objects-companies-companyId.md)
- [Merge Companies](https://developers.hubspot.com/docs/api-reference/crm-companies-v3/basic/post-crm-v3-objects-companies-merge.md)
- [Search Companies](https://developers.hubspot.com/docs/api-reference/crm-companies-v3/search/post-crm-v3-objects-companies-search.md)
- [List Deals](https://developers.hubspot.com/docs/api-reference/crm-deals-v3/basic/get-crm-v3-objects-0-3.md)
- [Get Deal](https://developers.hubspot.com/docs/api-reference/crm-deals-v3/basic/get-crm-v3-objects-0-3-dealId.md)
- [Create Deal](https://developers.hubspot.com/docs/api-reference/crm-deals-v3/basic/post-crm-v3-objects-0-3.md)
- [Update Deal](https://developers.hubspot.com/docs/api-reference/crm-deals-v3/basic/patch-crm-v3-objects-0-3-dealId.md)
- [Archive Deal](https://developers.hubspot.com/docs/api-reference/crm-deals-v3/basic/delete-crm-v3-objects-0-3-dealId.md)
- [Merge Deals](https://developers.hubspot.com/docs/api-reference/crm-deals-v3/basic/post-crm-v3-objects-0-3-merge.md)
- [Search Deals](https://developers.hubspot.com/docs/api-reference/crm-deals-v3/search/post-crm-v3-objects-0-3-search.md)
- [List Associations](https://developers.hubspot.com/docs/api-reference/crm-associations-v4/basic/get-crm-v4-objects-objectType-objectId-associations-toObjectType.md)
- [Create Association](https://developers.hubspot.com/docs/api-reference/crm-associations-v4/basic/put-crm-v4-objects-objectType-objectId-associations-toObjectType-toObjectId.md)
- [Delete Association](https://developers.hubspot.com/docs/api-reference/crm-associations-v4/basic/delete-crm-v4-objects-objectType-objectId-associations-toObjectType-toObjectId.md)
- [List Properties](https://developers.hubspot.com/docs/api-reference/crm-properties-v3/core/get-crm-v3-properties-objectType.md)
- [Get Property](https://developers.hubspot.com/docs/api-reference/crm-properties-v3/core/get-crm-v3-properties-objectType-propertyName.md)
- [Create Property](https://developers.hubspot.com/docs/api-reference/crm-properties-v3/core/post-crm-v3-properties-objectType.md)
- [Search Reference](https://developers.hubspot.com/docs/api/crm/search)
- [Maton CLI Manual](https://cli.maton.ai/manual)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |