[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M718GEQ7CXK6XQ21168SPG10":3,"skill-same:01M718GEQ7CXK6XQ21168SPG10":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M718GEQ7CXK6XQ21168SPG10","hubspot-api",null,"Read, create, update, search, and associate HubSpot CRM records — contacts, companies, deals, tickets, and custom objects. Use this whenever the user wants to look up a contact, create a deal, update a company, search the CRM, link two records, or asks \"what's in HubSpot\" — even if they don't say \"API\". Also use it for any URL under app.hubspot.com or a mention of a HubSpot object\u002Frecord ID. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","anthropics\u002Fclaude-tag-plugins","anthropics","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76263028?v=4","01M697XGDPXJAVQ8391V2BCYTE","Anthropic","01M718EH1166C48RNGF6QF9Z14",78,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fhubspot\u002Fskills\u002Fhubspot-api\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"hubspot","hubspot api","api","path","recipes","start","read","scripts","update","crm","create","contacts","URL","when","objects","hubspot crm","up","company","search","app","2026-11-10 10:12:30",false,"---\nname: hubspot-api\ndescription: Read, create, update, search, and associate HubSpot CRM records — contacts, companies, deals, tickets, and custom objects. Use this whenever the user wants to look up a contact, create a deal, update a company, search the CRM, link two records, or asks \"what's in HubSpot\" — even if they don't say \"API\". Also use it for any URL under app.hubspot.com or a mention of a HubSpot object\u002Frecord ID. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.\n---\n\nHubSpot's CRM API (v3) is uniform across object types: every object lives under `https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002F{objectType}` and supports the same basic\u002Fsearch\u002Fbatch\u002Fassociation operations.\n\n(HubSpot is rolling out date-based path versions — `\u002Fcrm\u002Fobjects\u002F2026-03\u002F...` — as the successor naming. The `v3`\u002F`v4` paths below all still work; HubSpot has announced `v4` becomes unsupported on 2027-03-30 and `v3`'s end-of-support date is not yet set. No migration is required for now.)\n\n**Key concepts:**\n\n- **Object types** are identified by name (`contacts`, `companies`, `deals`, `tickets`) or by numeric\n  `objectTypeId` (`0-1`, `0-2`, `0-3`, `0-5`). Custom objects are `2-\u003Cn>` or their `p_\u003Cname>` alias.\n  Either form works in the URL.\n- **Properties are opt-in on reads.** List\u002Fget calls return only a handful of default properties\n  (`hs_object_id`, `createdate`, `lastmodifieddate`, and per-type defaults like `email` \u002F `firstname`\n  for contacts). Always pass `properties=` with a comma-separated list of the fields you actually\n  need, or you'll get records that look empty.\n- **Each object type has its own primary display property and dedup key.** Contacts dedup on `email`;\n  companies on `domain`; deals and tickets have no dedup. Know the key before creating.\n- **Associations are typed.** The common ones (`contact_to_company`, `deal_to_contact`, etc.) have\n  built-in type IDs. You can also define custom association labels.\n\n## Request setup\n\nAuthentication is handled by the runtime — credentials are injected into outbound requests to this\nAPI, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.\nCredential variables exist only to keep requests well-formed; if one is unset, set it to any\nplaceholder value. A persistent `401`\u002F`403` means the credential isn't configured for this workspace\n— report that instead of debugging auth.\n\nEvery request carries a bearer header. The configured credential has a set of scopes\n(`crm.objects.contacts.read`, `crm.objects.deals.write`, etc.) that control what it can touch.\n\n```bash\nexport HUBSPOT_ACCESS_TOKEN=\"placeholder\"   # injected by the runtime; any value works\n```\n\n**Sanity check** — confirm the workspace is wired up:\n\n```bash\ncurl -sS \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts?limit=1\" \\\n  -H \"Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}\" | jq .\n```\n\nA `403` means the request authenticated but the configured credential lacks the scope for what you\ntried.\n\nFor brevity the recipes below use a helper. Define it once, or copy the `-H` flag onto each `curl`:\n\n```bash\nhsapi() { curl -sS \"$@\" -H \"Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}\" -H \"Content-Type: application\u002Fjson\"; }\n```\n\n## Core operations\n\nThe operations below use `contacts`, but the same paths work for `companies`, `deals`, `tickets`,\nand any custom object — just swap the `{objectType}` segment.\n\n### 1. List records\n\nCursor-paginated, property-filtered, no search.\n\n```bash\nhsapi -G \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\" \\\n  --data-urlencode \"limit=50\" \\\n  --data-urlencode \"properties=email,firstname,lastname,lifecyclestage,hubspot_owner_id\" \\\n  --data-urlencode \"archived=false\" | jq '.results[] | {id, props: .properties}'\n```\n\nOn failure the response is `{\"status\":\"error\", \"message\":..., \"category\":...}` and has no `.results`\n— see Error handling. Guard once if scripting (`jq 'if .results then … else . end'`); the recipes\nbelow show the bare projection for clarity.\n\nAdd `associations=companies,deals` to inline association IDs for each record.\n\n### 2. Get one record\n\n```bash\nhsapi -G \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\" \\\n  --data-urlencode \"properties=email,firstname,lastname,phone,company\" \\\n  --data-urlencode \"associations=companies,deals\" | jq .\n```\n\nTo fetch by a unique property instead of internal ID (e.g. by email), add `idProperty=email` and put\nthe email in the path:\n\n```bash\nhsapi -G \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Falice@example.com\" \\\n  --data-urlencode \"idProperty=email\" \\\n  --data-urlencode \"properties=email,firstname,lastname\" | jq .\n```\n\n### 3. Create a record\n\n```bash\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\" \\\n  -d '{\n    \"properties\": {\n      \"email\": \"alice@example.com\",\n      \"firstname\": \"Alice\",\n      \"lastname\": \"Nguyen\",\n      \"lifecyclestage\": \"lead\"\n    }\n  }' | jq 'if .status == \"error\" then . else {id, createdAt} end'\n```\n\nTo create **and associate** in one call, add an `associations` array:\n\n```bash\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fdeals\" \\\n  -d '{\n    \"properties\": {\n      \"dealname\": \"Acme expansion\",\n      \"pipeline\": \"default\",\n      \"dealstage\": \"appointmentscheduled\",\n      \"amount\": \"15000\"\n    },\n    \"associations\": [\n      {\"to\": {\"id\": \"COMPANY_ID\"}, \"types\": [{\"associationCategory\": \"HUBSPOT_DEFINED\", \"associationTypeId\": 341}]}\n    ]\n  }' | jq .\n```\n\n`341` is `deal_to_company`. See the association-type table in `references\u002Fapi.md`, or discover them\nlive (op 8).\n\n### 4. Update a record\n\n`PATCH` only the properties you want to change. Everything else is untouched.\n\n```bash\nhsapi -X PATCH \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\" \\\n  -d '{\"properties\": {\"lifecyclestage\": \"marketingqualifiedlead\", \"phone\": \"+1-555-0100\"}}'\n```\n\nUpdating by unique property works the same as reading — append `?idProperty=email` and put the email\nin the path.\n\n### 5. Archive \u002F delete a record\n\nHubSpot \"deletes\" are soft (the record goes to the recycle bin for ~90 days). Success is a `204`\nwith an empty body, so print the status code:\n\n```bash\nhsapi -X DELETE \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\" -w '\\n%{http_code}\\n'\n```\n\nBatch delete: `POST \u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Fbatch\u002Farchive` with `{\"inputs\": [{\"id\": \"...\"}, ...]}`.\n\n### 6. Search records (`scripts\u002Fhs_search.sh`)\n\nSearch any object type through the bundled script (path is relative to this skill's directory): it\nbuilds the `filterGroups`\u002F`sorts`\u002F`query` body, posts to `\u002Fcrm\u002Fv3\u002Fobjects\u002F{type}\u002Fsearch`, follows\n`paging.next.after` through every page, and emits TSV or JSONL.\n\n```bash\nscripts\u002Fhs_search.sh --object contacts \\\n  --filter lifecyclestage:EQ:lead \\\n  --filter createdate:GTE:2024-01-01T00:00:00Z \\\n  --sort createdate:desc --limit 200\n```\n\n- `--object TYPE` (required) is `contacts`, `companies`, `deals`, `tickets`, or any object type\n  name \u002F `objectTypeId`. Instance specifics come from `HUBSPOT_ACCESS_TOKEN` above.\n- `--filter PROP:OP:VALUE` (repeatable) ANDs filters in one `filterGroup`. `OP` is uppercased;\n  `IN` \u002F `NOT_IN` take a comma list (`dealstage:IN:won,lost` → `values`; for string properties\n  the values must be lowercase), `BETWEEN` takes `low,high` (`amount:BETWEEN:100,500` → `value` +\n  `highValue`), `HAS_PROPERTY` \u002F `NOT_HAS_PROPERTY` take no value. `--query TEXT` adds a free-text\n  phrase match.\n- `--properties LIST` drives both the request and the TSV columns; defaults are per-type\n  (`email,firstname,lastname,createdate` for contacts, etc.) and required for any other type.\n  `--sort PROP[:desc]` orders results.\n- `--limit N` caps fetched rows (default 100, `0` = everything — search hard-caps at 10,000\n  results); `--page-size N` (max 200); `--json` emits one JSON object per record instead of TSV\n  with a header. Total match count and row counts go to stderr.\n- Exit codes: `0` success, `1` request failed or API error (`category` and `message` on stderr) or\n  bad arguments.\n\nIf the script errors, read it — it's plain `curl` + `jq` — and debug against `references\u002Fapi.md`.\n\nThe script emits one ANDed `filterGroup`. For ORed groups, post the raw body via `hsapi` — limits\nare 5 groups, 6 filters per group, **18 filters total**. Search is eventually consistent: a record\ncreated or updated seconds ago may not appear yet — use a direct `GET` by ID for read-after-write.\n\n### 7. Batch read \u002F create \u002F update \u002F upsert\n\nThe `batch\u002F*` endpoints trade one round trip for up to 100 records (some are lower — see\n`references\u002Fapi.md`). All five verbs follow the same `{\"inputs\": [...]}` shape.\n\n```bash\n# batch read by id\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Fbatch\u002Fread\" \\\n  -d '{\"inputs\": [{\"id\": \"101\"}, {\"id\": \"102\"}], \"properties\": [\"email\", \"firstname\"]}'\n\n# upsert by a unique property (create if new, update if the key matches)\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Fbatch\u002Fupsert\" \\\n  -d '{\"inputs\": [{\"idProperty\": \"email\", \"id\": \"a@x.com\", \"properties\": {\"firstname\": \"Alice\"}}]}'\n```\n\n`batch\u002Fcreate` and `batch\u002Fupdate` take `{\"inputs\": [{\"properties\": {...}}]}` and\n`{\"inputs\": [{\"id\": \"...\", \"properties\": {...}}]}` respectively.\n\n### 8. List and create associations\n\nUse the v4 associations endpoints — they're newer and carry the label\u002Ftype info you actually want.\nThey coexist with v3.\n\n```bash\n# what's associated with this contact?\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\u002Fassociations\u002Fcompanies\" | jq '.results'\n\n# discover association type ids between two object types\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fassociations\u002Fcontacts\u002Fcompanies\u002Flabels\" | jq '.results'\n\n# create an association (PUT — idempotent)\nhsapi -X PUT \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\u002Fassociations\u002Fcompanies\u002FCOMPANY_ID\" \\\n  -d '[{\"associationCategory\": \"HUBSPOT_DEFINED\", \"associationTypeId\": 1}]'\n\n# remove (204 on success, empty body)\nhsapi -X DELETE \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\u002Fassociations\u002Fcompanies\u002FCOMPANY_ID\" -w '\\n%{http_code}\\n'\n```\n\n### 9. Discover properties (schema)\n\nRead the property catalog for an object type to learn field names, types, and `options` for\nenumerated fields (pipelines, stages, lifecycle stages, etc.). Do this before creating or filtering\n— guessing property names is the most common source of `400` errors.\n\n```bash\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fproperties\u002Fcontacts\" | \\\n  jq '.results[] | {name, label, type, fieldType, options: (.options | length)}'\n\n# one property with its option values\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fproperties\u002Fdeals\u002Fdealstage\" | jq '{name, options: [.options[] | {label, value}]}'\n```\n\n### 10. Pipelines and stages\n\nDeals and tickets live in pipelines with ordered stages. Stage and pipeline **IDs** (not labels) are\nwhat go in `dealstage` \u002F `hs_pipeline_stage` properties.\n\n```bash\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fpipelines\u002Fdeals\" | \\\n  jq '.results[] | {id, label, stages: [.stages[] | {id, label, displayOrder}]}'\n```\n\n## Pagination\n\nList endpoints (`GET \u002Fcrm\u002Fv3\u002Fobjects\u002F{type}`, property lists, association lists) and search\n(`POST ...\u002Fsearch`) both use cursor pagination: response carries `paging.next.after` when more\nresults exist; pass it back as `after` (query param for GET, body field for search). `limit` maxes\nat 100 for list, 200 for search; search is additionally hard-capped at **10,000 total results** per\nquery — narrow the filter if you need more. An error body has no `.paging` — bound any loop and\nbreak on `.status == \"error\"`.\n\n## Rate limits\n\nPrivate-app tokens get **100 requests per 10 seconds** on Free\u002FStarter accounts and **190 per 10\nseconds** on Professional\u002FEnterprise (plus daily caps that scale with the account tier). Search\nendpoints are limited to **5 requests per second per account** and their responses do not carry the\nrate-limit headers. Every other response carries:\n\n```\nX-HubSpot-RateLimit-Max          requests allowed per interval\nX-HubSpot-RateLimit-Remaining    requests left in the current interval\nX-HubSpot-RateLimit-Interval-Milliseconds   interval length\nX-HubSpot-RateLimit-Daily \u002F -Daily-Remaining\n```\n\nOn `429`, sleep for `X-HubSpot-RateLimit-Interval-Milliseconds` (or ~10s if absent) and retry.\nPrefer batch endpoints — one batch call of 100 records counts as one request.\n\n## Error handling\n\nErrors are JSON: `{\"status\": \"error\", \"message\": \"...\", \"correlationId\": \"...\", \"category\": \"...\"}`.\nCheck `.status` before projecting `.results` \u002F `.id` — the error envelope has neither and a bare\nprojection prints nulls. Always surface `message` and `category`.\n\n- **`400` `VALIDATION_ERROR`** — Bad property name\u002Fvalue, malformed filter, wrong enum value. Read `errors[]` — it names the offending field. Check the property catalog (op 9).\n- **`401` `INVALID_AUTHENTICATION`** — Credential missing or rejected. Check `HUBSPOT_ACCESS_TOKEN` is set at all; if it persists, the credential isn't configured for this workspace — report it.\n- **`403` `MISSING_SCOPES`** — The configured credential lacks the scope for this endpoint. The message names the missing scope — report it.\n- **`404` `OBJECT_NOT_FOUND`** — Bad ID, wrong `objectType`, or record was deleted\u002Farchived. Try `archived=true`.\n- **`409` `CONFLICT`** — Duplicate on a unique key (e.g., creating a contact with an existing email). Switch to upsert or patch the existing record.\n- **`429` `RATE_LIMITS`** — The body's `policyName` says which limit you hit: a secondly\u002Fburst policy → sleep per `X-HubSpot-RateLimit-Interval-Milliseconds`, retry; `DAILY` → stop, it resets at midnight account-local time.\n- **`5xx`** — Transient. Retry with backoff.\n\n## Going deeper\n\n`references\u002Fapi.md` has the fuller endpoint catalog — the complete default-property lists per object\ntype, the built-in association type ID table, batch limits, the owners\u002Fpipelines\u002Fproperties\nmanagement endpoints, custom object schemas, lists, and the engagement object types (notes, calls,\ntasks, meetings, emails). Read it when you need an endpoint or ID not covered above.\n","HubSpot's CRM API (v3) is uniform across object types: every object lives under `https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002F{objectType}` and supports the same basic\u002Fsearch\u002Fbatch\u002Fassociation operations.\n\n(HubSpot is rolling out date-based path versions — `\u002Fcrm\u002Fobjects\u002F2026-03\u002F...` — as the successor naming. The `v3`\u002F`v4` paths below all still work; HubSpot has announced `v4` becomes unsupported on 2027-03-30 and `v3`'s end-of-support date is not yet set. No migration is required for now.)\n\n**Key concepts:**\n\n- **Object types** are identified by name (`contacts`, `companies`, `deals`, `tickets`) or by numeric\n  `objectTypeId` (`0-1`, `0-2`, `0-3`, `0-5`). Custom objects are `2-\u003Cn>` or their `p_\u003Cname>` alias.\n  Either form works in the URL.\n- **Properties are opt-in on reads.** List\u002Fget calls return only a handful of default properties\n  (`hs_object_id`, `createdate`, `lastmodifieddate`, and per-type defaults like `email` \u002F `firstname`\n  for contacts). Always pass `properties=` with a comma-separated list of the fields you actually\n  need, or you'll get records that look empty.\n- **Each object type has its own primary display property and dedup key.** Contacts dedup on `email`;\n  companies on `domain`; deals and tickets have no dedup. Know the key before creating.\n- **Associations are typed.** The common ones (`contact_to_company`, `deal_to_contact`, etc.) have\n  built-in type IDs. You can also define custom association labels.\n\n## Request setup\n\nAuthentication is handled by the runtime — credentials are injected into outbound requests to this\nAPI, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.\nCredential variables exist only to keep requests well-formed; if one is unset, set it to any\nplaceholder value. A persistent `401`\u002F`403` means the credential isn't configured for this workspace\n— report that instead of debugging auth.\n\nEvery request carries a bearer header. The configured credential has a set of scopes\n(`crm.objects.contacts.read`, `crm.objects.deals.write`, etc.) that control what it can touch.\n\n```bash\nexport HUBSPOT_ACCESS_TOKEN=\"placeholder\"   # injected by the runtime; any value works\n```\n\n**Sanity check** — confirm the workspace is wired up:\n\n```bash\ncurl -sS \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts?limit=1\" \\\n  -H \"Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}\" | jq .\n```\n\nA `403` means the request authenticated but the configured credential lacks the scope for what you\ntried.\n\nFor brevity the recipes below use a helper. Define it once, or copy the `-H` flag onto each `curl`:\n\n```bash\nhsapi() { curl -sS \"$@\" -H \"Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}\" -H \"Content-Type: application\u002Fjson\"; }\n```\n\n## Core operations\n\nThe operations below use `contacts`, but the same paths work for `companies`, `deals`, `tickets`,\nand any custom object — just swap the `{objectType}` segment.\n\n### 1. List records\n\nCursor-paginated, property-filtered, no search.\n\n```bash\nhsapi -G \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\" \\\n  --data-urlencode \"limit=50\" \\\n  --data-urlencode \"properties=email,firstname,lastname,lifecyclestage,hubspot_owner_id\" \\\n  --data-urlencode \"archived=false\" | jq '.results[] | {id, props: .properties}'\n```\n\nOn failure the response is `{\"status\":\"error\", \"message\":..., \"category\":...}` and has no `.results`\n— see Error handling. Guard once if scripting (`jq 'if .results then … else . end'`); the recipes\nbelow show the bare projection for clarity.\n\nAdd `associations=companies,deals` to inline association IDs for each record.\n\n### 2. Get one record\n\n```bash\nhsapi -G \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\" \\\n  --data-urlencode \"properties=email,firstname,lastname,phone,company\" \\\n  --data-urlencode \"associations=companies,deals\" | jq .\n```\n\nTo fetch by a unique property instead of internal ID (e.g. by email), add `idProperty=email` and put\nthe email in the path:\n\n```bash\nhsapi -G \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Falice@example.com\" \\\n  --data-urlencode \"idProperty=email\" \\\n  --data-urlencode \"properties=email,firstname,lastname\" | jq .\n```\n\n### 3. Create a record\n\n```bash\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\" \\\n  -d '{\n    \"properties\": {\n      \"email\": \"alice@example.com\",\n      \"firstname\": \"Alice\",\n      \"lastname\": \"Nguyen\",\n      \"lifecyclestage\": \"lead\"\n    }\n  }' | jq 'if .status == \"error\" then . else {id, createdAt} end'\n```\n\nTo create **and associate** in one call, add an `associations` array:\n\n```bash\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fdeals\" \\\n  -d '{\n    \"properties\": {\n      \"dealname\": \"Acme expansion\",\n      \"pipeline\": \"default\",\n      \"dealstage\": \"appointmentscheduled\",\n      \"amount\": \"15000\"\n    },\n    \"associations\": [\n      {\"to\": {\"id\": \"COMPANY_ID\"}, \"types\": [{\"associationCategory\": \"HUBSPOT_DEFINED\", \"associationTypeId\": 341}]}\n    ]\n  }' | jq .\n```\n\n`341` is `deal_to_company`. See the association-type table in `references\u002Fapi.md`, or discover them\nlive (op 8).\n\n### 4. Update a record\n\n`PATCH` only the properties you want to change. Everything else is untouched.\n\n```bash\nhsapi -X PATCH \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\" \\\n  -d '{\"properties\": {\"lifecyclestage\": \"marketingqualifiedlead\", \"phone\": \"+1-555-0100\"}}'\n```\n\nUpdating by unique property works the same as reading — append `?idProperty=email` and put the email\nin the path.\n\n### 5. Archive \u002F delete a record\n\nHubSpot \"deletes\" are soft (the record goes to the recycle bin for ~90 days). Success is a `204`\nwith an empty body, so print the status code:\n\n```bash\nhsapi -X DELETE \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\" -w '\\n%{http_code}\\n'\n```\n\nBatch delete: `POST \u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Fbatch\u002Farchive` with `{\"inputs\": [{\"id\": \"...\"}, ...]}`.\n\n### 6. Search records (`scripts\u002Fhs_search.sh`)\n\nSearch any object type through the bundled script (path is relative to this skill's directory): it\nbuilds the `filterGroups`\u002F`sorts`\u002F`query` body, posts to `\u002Fcrm\u002Fv3\u002Fobjects\u002F{type}\u002Fsearch`, follows\n`paging.next.after` through every page, and emits TSV or JSONL.\n\n```bash\nscripts\u002Fhs_search.sh --object contacts \\\n  --filter lifecyclestage:EQ:lead \\\n  --filter createdate:GTE:2024-01-01T00:00:00Z \\\n  --sort createdate:desc --limit 200\n```\n\n- `--object TYPE` (required) is `contacts`, `companies`, `deals`, `tickets`, or any object type\n  name \u002F `objectTypeId`. Instance specifics come from `HUBSPOT_ACCESS_TOKEN` above.\n- `--filter PROP:OP:VALUE` (repeatable) ANDs filters in one `filterGroup`. `OP` is uppercased;\n  `IN` \u002F `NOT_IN` take a comma list (`dealstage:IN:won,lost` → `values`; for string properties\n  the values must be lowercase), `BETWEEN` takes `low,high` (`amount:BETWEEN:100,500` → `value` +\n  `highValue`), `HAS_PROPERTY` \u002F `NOT_HAS_PROPERTY` take no value. `--query TEXT` adds a free-text\n  phrase match.\n- `--properties LIST` drives both the request and the TSV columns; defaults are per-type\n  (`email,firstname,lastname,createdate` for contacts, etc.) and required for any other type.\n  `--sort PROP[:desc]` orders results.\n- `--limit N` caps fetched rows (default 100, `0` = everything — search hard-caps at 10,000\n  results); `--page-size N` (max 200); `--json` emits one JSON object per record instead of TSV\n  with a header. Total match count and row counts go to stderr.\n- Exit codes: `0` success, `1` request failed or API error (`category` and `message` on stderr) or\n  bad arguments.\n\nIf the script errors, read it — it's plain `curl` + `jq` — and debug against `references\u002Fapi.md`.\n\nThe script emits one ANDed `filterGroup`. For ORed groups, post the raw body via `hsapi` — limits\nare 5 groups, 6 filters per group, **18 filters total**. Search is eventually consistent: a record\ncreated or updated seconds ago may not appear yet — use a direct `GET` by ID for read-after-write.\n\n### 7. Batch read \u002F create \u002F update \u002F upsert\n\nThe `batch\u002F*` endpoints trade one round trip for up to 100 records (some are lower — see\n`references\u002Fapi.md`). All five verbs follow the same `{\"inputs\": [...]}` shape.\n\n```bash\n# batch read by id\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Fbatch\u002Fread\" \\\n  -d '{\"inputs\": [{\"id\": \"101\"}, {\"id\": \"102\"}], \"properties\": [\"email\", \"firstname\"]}'\n\n# upsert by a unique property (create if new, update if the key matches)\nhsapi -X POST \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fobjects\u002Fcontacts\u002Fbatch\u002Fupsert\" \\\n  -d '{\"inputs\": [{\"idProperty\": \"email\", \"id\": \"a@x.com\", \"properties\": {\"firstname\": \"Alice\"}}]}'\n```\n\n`batch\u002Fcreate` and `batch\u002Fupdate` take `{\"inputs\": [{\"properties\": {...}}]}` and\n`{\"inputs\": [{\"id\": \"...\", \"properties\": {...}}]}` respectively.\n\n### 8. List and create associations\n\nUse the v4 associations endpoints — they're newer and carry the label\u002Ftype info you actually want.\nThey coexist with v3.\n\n```bash\n# what's associated with this contact?\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\u002Fassociations\u002Fcompanies\" | jq '.results'\n\n# discover association type ids between two object types\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fassociations\u002Fcontacts\u002Fcompanies\u002Flabels\" | jq '.results'\n\n# create an association (PUT — idempotent)\nhsapi -X PUT \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\u002Fassociations\u002Fcompanies\u002FCOMPANY_ID\" \\\n  -d '[{\"associationCategory\": \"HUBSPOT_DEFINED\", \"associationTypeId\": 1}]'\n\n# remove (204 on success, empty body)\nhsapi -X DELETE \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv4\u002Fobjects\u002Fcontacts\u002FCONTACT_ID\u002Fassociations\u002Fcompanies\u002FCOMPANY_ID\" -w '\\n%{http_code}\\n'\n```\n\n### 9. Discover properties (schema)\n\nRead the property catalog for an object type to learn field names, types, and `options` for\nenumerated fields (pipelines, stages, lifecycle stages, etc.). Do this before creating or filtering\n— guessing property names is the most common source of `400` errors.\n\n```bash\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fproperties\u002Fcontacts\" | \\\n  jq '.results[] | {name, label, type, fieldType, options: (.options | length)}'\n\n# one property with its option values\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fproperties\u002Fdeals\u002Fdealstage\" | jq '{name, options: [.options[] | {label, value}]}'\n```\n\n### 10. Pipelines and stages\n\nDeals and tickets live in pipelines with ordered stages. Stage and pipeline **IDs** (not labels) are\nwhat go in `dealstage` \u002F `hs_pipeline_stage` properties.\n\n```bash\nhsapi \"https:\u002F\u002Fapi.hubapi.com\u002Fcrm\u002Fv3\u002Fpipelines\u002Fdeals\" | \\\n  jq '.results[] | {id, label, stages: [.stages[] | {id, label, displayOrder}]}'\n```\n\n## Pagination\n\nList endpoints (`GET \u002Fcrm\u002Fv3\u002Fobjects\u002F{type}`, property lists, association lists) and search\n(`POST ...\u002Fsearch`) both use cursor pagination: response carries `paging.next.after` when more\nresults exist; pass it back as `after` (query param for GET, body field for search). `limit` maxes\nat 100 for list, 200 for search; search is additionally hard-capped at **10,000 total results** per\nquery — narrow the filter if you need more. An error body has no `.paging` — bound any loop and\nbreak on `.status == \"error\"`.\n\n## Rate limits\n\nPrivate-app tokens get **100 requests per 10 seconds** on Free\u002FStarter accounts and **190 per 10\nseconds** on Professional\u002FEnterprise (plus daily caps that scale with the account tier). Search\nendpoints are limited to **5 requests per second per account** and their responses do not carry the\nrate-limit headers. Every other response carries:\n\n```\nX-HubSpot-RateLimit-Max          requests allowed per interval\nX-HubSpot-RateLimit-Remaining    requests left in the current interval\nX-HubSpot-RateLimit-Interval-Milliseconds   interval length\nX-HubSpot-RateLimit-Daily \u002F -Daily-Remaining\n```\n\nOn `429`, sleep for `X-HubSpot-RateLimit-Interval-Milliseconds` (or ~10s if absent) and retry.\nPrefer batch endpoints — one batch call of 100 records counts as one request.\n\n## Error handling\n\nErrors are JSON: `{\"status\": \"error\", \"message\": \"...\", \"correlationId\": \"...\", \"category\": \"...\"}`.\nCheck `.status` before projecting `.results` \u002F `.id` — the error envelope has neither and a bare\nprojection prints nulls. Always surface `message` and `category`.\n\n- **`400` `VALIDATION_ERROR`** — Bad property name\u002Fvalue, malformed filter, wrong enum value. Read `errors[]` — it names the offending field. Check the property catalog (op 9).\n- **`401` `INVALID_AUTHENTICATION`** — Credential missing or rejected. Check `HUBSPOT_ACCESS_TOKEN` is set at all; if it persists, the credential isn't configured for this workspace — report it.\n- **`403` `MISSING_SCOPES`** — The configured credential lacks the scope for this endpoint. The message names the missing scope — report it.\n- **`404` `OBJECT_NOT_FOUND`** — Bad ID, wrong `objectType`, or record was deleted\u002Farchived. Try `archived=true`.\n- **`409` `CONFLICT`** — Duplicate on a unique key (e.g., creating a contact with an existing email). Switch to upsert or patch the existing record.\n- **`429` `RATE_LIMITS`** — The body's `policyName` says which limit you hit: a secondly\u002Fburst policy → sleep per `X-HubSpot-RateLimit-Interval-Milliseconds`, retry; `DAILY` → stop, it resets at midnight account-local time.\n- **`5xx`** — Transient. Retry with backoff.\n\n## Going deeper\n\n`references\u002Fapi.md` has the fuller endpoint catalog — the complete default-property lists per object\ntype, the built-in association type ID table, batch limits, the owners\u002Fpipelines\u002Fproperties\nmanagement endpoints, custom object schemas, lists, and the engagement object types (notes, calls,\ntasks, meetings, emails). Read it when you need an endpoint or ID not covered above.\n",{"name":5,"description":7},"main","b6ee25f8f00a291cbdf31eb75bd7cc1a987d6782","hubspot\u002Fskills\u002Fhubspot-api",23,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins","https:\u002F\u002Fgithub.com\u002Fanthropics","https:\u002F\u002Fanthropic.com","2026-11-10 23:54:27",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add anthropics\u002Fclaude-tag-plugins --skill hubspot-api",{"tool":58,"command":59},"bunx","bunx skills add anthropics\u002Fclaude-tag-plugins --skill hubspot-api",{"tool":61,"command":62},"pnpm","pnpm dlx skills add anthropics\u002Fclaude-tag-plugins --skill hubspot-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fhubspot\u002Fskills\u002Fhubspot-api\u002FSKILL.md",true,[66,72],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fapi.md","REFERENCE","参考文档",11732,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fhubspot\u002Fskills\u002Fhubspot-api\u002Freferences\u002Fapi.md",{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fhs_search.sh","SCRIPT","脚本",10072,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fhubspot\u002Fskills\u002Fhubspot-api\u002Fscripts\u002Fhs_search.sh",[79,104,126,139,153,167],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":39},"01M718HA4DD1CEJ82ZS5NJTA15","snowflake-api","Run SQL against Snowflake — submit statements, poll async handles, fetch result partitions, cancel, and browse warehouses\u002Fdatabases\u002Fschemas\u002Ftables. Use this whenever the user wants to query Snowflake, ask \"what tables are in this schema\", check a warehouse's status, or mentions `snowflakecomputing.com`, `\u002Fapi\u002Fv2\u002Fstatements`, or a Snowflake account identifier (like `xy12345.us-east-1`). Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fsnowflake\u002Fskills\u002Fsnowflake-api\u002FSKILL.md",[],[86,21,87,88,89,90,91,92,93,94,95,32,96,97,98,99,100,101,102,103],"snowflake","snowflake api","warehouse","databases","fetch","browse","submit","async","schema","use","query","cancel","ask","partitions","check","with","bundled scripts","result",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":39},"01M718H6HMYYVCR43872FMJR8Q","sentry-api","Query and manage Sentry error-tracking data — list and search issues, drill into events and stack traces, inspect projects and releases, resolve\u002Fignore issues, and pull stats. Use this whenever the user mentions a Sentry issue, crash, error group, or exception; pastes a sentry.io or self-hosted Sentry URL; asks \"why is this erroring\", \"how many times has this happened\", \"what's the top error in {project}\", \"resolve this issue\", or wants a Sentry-based digest — even if they don't say \"API\". Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fsentry\u002Fskills\u002Fsentry-api\u002FSKILL.md",[],[21,111,112,113,114,115,116,37,117,118,32,31,96,119,120,121,122,123,124,125],"sentry","sentry api","error","projects","project","inspect","issues","drill","io","self","stack","top","releases","how","why",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":39},"01M718H3C9JFC86FY6ZQB69FHX","salesforce-api","Query, read, create, update, and describe Salesforce records — Accounts, Contacts, Opportunities, Leads, Cases, and custom objects. Use this whenever the user wants to look up a Salesforce record, run a SOQL query, update an Opportunity, check an object's fields, or asks \"what's in Salesforce\" — even if they don't say \"API\". Also use it for any URL under *.salesforce.com \u002F *.lightning.force.com or a mention of a Salesforce record ID or SOQL. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fsalesforce\u002Fskills\u002Fsalesforce-api\u002FSKILL.md",[],[133,21,134,35,33,135,32,31,96,30,29,136,27,26,25,24,137,23,22,138],"salesforce","salesforce api","opportunity","run","describe","leads",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":39},"01M718GZPG1GAP5T1Z9NVDFDV5","redshift-api","Run SQL against Amazon Redshift — submit statements, poll status, page through results, and browse databases\u002Fschemas\u002Ftables. Use this whenever the user wants to query Redshift (provisioned cluster or Serverless), ask \"what tables are in this schema\", check a query's status, or mentions `redshift-data`, a Redshift cluster identifier \u002F workgroup name, or a `redshift-data.{region}.amazonaws.com` endpoint. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fredshift\u002Fskills\u002Fredshift-api\u002FSKILL.md",[],[146,21,147,89,148,91,92,149,94,95,32,96,98,100,101,150,102,151,136,152],"redshift","redshift api","cluster","page","amazon","results","name",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":39},"01M718GW82ADW06AQS4PVQ1NHQ","pagerduty-api","Query and manage PagerDuty — find out who's on call, list and manage incidents, read escalation policies and schedules, trace who got paged and why, acknowledge\u002Fresolve\u002Fsnooze\u002Fescalate incidents, and create or update services. Use this whenever the user mentions PagerDuty, on-call, paging, escalation, an incident ID like `PXXXXXX` or `Q...`, asks \"who's on call\", \"page the on-call\", \"ack this incident\", \"why wasn't I paged\", or pastes a pagerduty.com URL — even if they don't say \"API\". Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fpagerduty\u002Fskills\u002Fpagerduty-api\u002FSKILL.md",[],[21,160,161,162,32,31,96,29,163,125,27,26,25,24,164,23,22,165,149,166],"pagerduty","pagerduty api","incident","ack","list","escalation","manage",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":39},"01M718GSATK9BT3X2J9WKNAR2P","notion-api","Search, read, and write Notion pages, databases, and blocks. Use this whenever the user wants to find a page in Notion, read a database, add a row, create or append content to a page, or asks \"what's in my Notion\" — even if they don't say \"API\". Also use it for any URL under notion.so or a mention of a Notion page\u002Fdatabase ID. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.","https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Fblob\u002Fmain\u002Fnotion\u002Fskills\u002Fnotion-api\u002FSKILL.md",[],[174,175,21,176,89,37,177,32,31,29,26,25,178,24,179,23,180,181,22,182],"notion","notion api","notion pages","database","write","my","add","append","for"]