{"files":{"SKILL.md":"---\nname: associations\ndescription: \"Associations API skill. Use when working with Associations for crm. Covers 10 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Associations\nAPI version: v4\n\n## Auth\nOAuth2 | OAuth2 | ApiKey private-app-legacy in header | ApiKey private-app in header\n\n## Base URL\nhttps://api.hubapi.com\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType} -- retrieve all associations by object type\n3. POST /crm/v4/associations/usage/high-usage-report/{userId} -- create first high-usage-report\n\n## Endpoints\n10 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Crm\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /crm/v4/associations/usage/high-usage-report/{userId} | Report high usage |\n| POST | /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/archive | Remove associations |\n| POST | /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/associate/default | Associate records (default) |\n| POST | /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/create | Associate records (labelled) |\n| POST | /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/labels/archive | Delete specific labels |\n| POST | /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/read | Retrieve associations |\n| PUT | /crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/default/{toObjectType}/{toObjectId} | Associate records (default) |\n| GET | /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType} | Retrieve all associations by object type |\n| PUT | /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId} | Associate records (labelled) |\n| DELETE | /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId} | Delete associations between two records |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a archive?\" -> POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/archive\n- \"Create a default?\" -> POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/associate/default\n- \"Create a create?\" -> POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/create\n- \"Create a read?\" -> POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/read\n- \"Update a default?\" -> PUT /crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/default/{toObjectType}/{toObjectId}\n- \"Get association details?\" -> GET /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}\n- \"Update a association?\" -> PUT /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}\n- \"Delete a association?\" -> DELETE /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Paginated endpoints accept limit/offset or cursor parameters\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Associations\n@base https://api.hubapi.com\n@version v4\n@auth OAuth2 | OAuth2 | ApiKey private-app-legacy in header | ApiKey private-app in header\n@endpoints 10\n@toc crm(10)\n\n@endpoint POST /crm/v4/associations/usage/high-usage-report/{userId}\n@desc Report high usage\n@required {userId: int(int32)}\n@returns(200) {enqueueTime: map{dateOnly: bool, timeZoneShift: int(int32), value: int(int32)}, userEmail: str, userId: int(int32)} # successful operation\n\n@endpoint POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/archive\n@desc Remove associations\n@required {fromObjectType: str, toObjectType: str, inputs: [map{from!: map, to!: [map]}]}\n@returns(200) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [any], startedAt: str(date-time), status: str} # successful operation\n\n@endpoint POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/associate/default\n@desc Associate records (default)\n@required {fromObjectType: str, toObjectType: str, inputs: [map{from!: map, to!: map}]}\n@returns(200) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str} # successful operation\n\n@endpoint POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/create\n@desc Associate records (labelled)\n@required {fromObjectType: str, toObjectType: str, inputs: [map{from!: map, to!: map, types!: [map]}]}\n@returns(201) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str} # successful operation\n\n@endpoint POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/labels/archive\n@desc Delete specific labels\n@required {fromObjectType: str, toObjectType: str, inputs: [map{from!: map, to!: map, types!: [map]}]}\n@returns(200) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [any], startedAt: str(date-time), status: str} # successful operation\n\n@endpoint POST /crm/v4/associations/{fromObjectType}/{toObjectType}/batch/read\n@desc Retrieve associations\n@required {fromObjectType: str, toObjectType: str, inputs: [map{after: str, id!: str}]}\n@returns(201) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str} # successful operation\n\n@endpoint PUT /crm/v4/objects/{fromObjectType}/{fromObjectId}/associations/default/{toObjectType}/{toObjectId}\n@desc Associate records (default)\n@required {fromObjectId: str, fromObjectType: str, toObjectId: str, toObjectType: str}\n@returns(200) {completedAt: str(date-time), errors: [map], links: map, numErrors: int(int32), requestedAt: str(date-time), results: [map], startedAt: str(date-time), status: str} # successful operation\n\n@endpoint GET /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}\n@desc Retrieve all associations by object type\n@required {objectId: str, objectType: str, toObjectType: str}\n@optional {after: str # The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results., limit: int(int32)=500 # The maximum number of results to display per page.}\n@returns(200) {paging: map{next: map{after: str, link: str}}, results: [map]} # successful operation\n\n@endpoint PUT /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}\n@desc Associate records (labelled)\n@required {objectId: str, objectType: str, toObjectId: str, toObjectType: str}\n@returns(201) {fromObjectId: str, fromObjectTypeId: str, labels: [str], toObjectId: str, toObjectTypeId: str} # successful operation\n\n@endpoint DELETE /crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}\n@desc Delete associations between two records\n@required {objectId: str, objectType: str, toObjectId: str, toObjectType: str}\n@returns(204) No content\n\n@end\n"}}