{"files":{"SKILL.md":"---\nname: pipelines\ndescription: \"Pipelines API skill. Use when working with Pipelines for crm. Covers 14 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Pipelines\nAPI version: v3\n\n## Auth\nOAuth2 | 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/v3/pipelines/{objectType} -- retrieve all pipelines\n3. POST /crm/v3/pipelines/{objectType} -- create first pipeline\n\n## Endpoints\n14 endpoints across 1 group. See references/api-spec.lap for full details.\n\n### Crm\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /crm/v3/pipelines/{objectType} | Retrieve all pipelines |\n| POST | /crm/v3/pipelines/{objectType} | Create a pipeline |\n| GET | /crm/v3/pipelines/{objectType}/{pipelineId} | Return a pipeline by ID |\n| PUT | /crm/v3/pipelines/{objectType}/{pipelineId} | Replace a pipeline |\n| DELETE | /crm/v3/pipelines/{objectType}/{pipelineId} | Delete a pipeline |\n| PATCH | /crm/v3/pipelines/{objectType}/{pipelineId} | Perform a partial update of the pipeline identified by `{pipelineId}`. The updated pipeline will be returned in the response. |\n| GET | /crm/v3/pipelines/{objectType}/{pipelineId}/audit | Return an audit of all changes to the pipeline |\n| GET | /crm/v3/pipelines/{objectType}/{pipelineId}/stages | Return all stages of a pipeline |\n| POST | /crm/v3/pipelines/{objectType}/{pipelineId}/stages | Create a pipeline stage |\n| GET | /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId} | Return a pipeline stage by ID |\n| PUT | /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId} | Replace a pipeline stage |\n| DELETE | /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId} | Delete a pipeline stage |\n| PATCH | /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId} |  |\n| GET | /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}/audit | Return a reverse chronological list of all mutations that have occurred on the pipeline stage identified by `{stageId}`. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Get pipeline details?\" -> GET /crm/v3/pipelines/{objectType}\n- \"Update a pipeline?\" -> PUT /crm/v3/pipelines/{objectType}/{pipelineId}\n- \"Delete a pipeline?\" -> DELETE /crm/v3/pipelines/{objectType}/{pipelineId}\n- \"Partially update a pipeline?\" -> PATCH /crm/v3/pipelines/{objectType}/{pipelineId}\n- \"List all audit?\" -> GET /crm/v3/pipelines/{objectType}/{pipelineId}/audit\n- \"List all stages?\" -> GET /crm/v3/pipelines/{objectType}/{pipelineId}/stages\n- \"Create a stage?\" -> POST /crm/v3/pipelines/{objectType}/{pipelineId}/stages\n- \"Get stage details?\" -> GET /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\n- \"Update a stage?\" -> PUT /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\n- \"Delete a stage?\" -> DELETE /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\n- \"Partially update a stage?\" -> PATCH /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\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- 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 Pipelines\n@base https://api.hubapi.com\n@version v3\n@auth OAuth2 | ApiKey private-app-legacy in header | ApiKey private-app in header\n@common_fields {objectType: str}\n@endpoints 14\n@toc crm(14)\n\n@endpoint GET /crm/v3/pipelines/{objectType}\n@desc Retrieve all pipelines\n@returns(200) {results: [map]} # successful operation\n\n@endpoint POST /crm/v3/pipelines/{objectType}\n@desc Create a pipeline\n@required {displayOrder: int(int32) # The order for displaying this pipeline. If two pipelines have a matching `displayOrder`, they will be sorted alphabetically by label., label: str # A unique label used to organize pipelines in HubSpot's UI, stages: [map{displayOrder!: int(int32), label!: str, metadata!: map, stageId: str}] # Pipeline stage inputs used to create the new or replacement pipeline.}\n@optional {pipelineId: str}\n@returns(201) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, stages: [map], updatedAt: str(date-time)} # successful operation\n\n@endpoint GET /crm/v3/pipelines/{objectType}/{pipelineId}\n@desc Return a pipeline by ID\n@required {pipelineId: str}\n@returns(200) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, stages: [map], updatedAt: str(date-time)} # successful operation\n\n@endpoint PUT /crm/v3/pipelines/{objectType}/{pipelineId}\n@desc Replace a pipeline\n@required {pipelineId: str, displayOrder: int(int32) # The order for displaying this pipeline stage. If two pipeline stages have a matching `displayOrder`, they will be sorted alphabetically by label., label: str # A label used to organize pipeline stages in HubSpot's UI. Each pipeline stage's label must be unique within that pipeline., stages: [map{displayOrder!: int(int32), label!: str, metadata!: map, stageId: str}] # The stages associated with the pipeline. They can be retrieved and updated via the pipeline stages endpoints.}\n@optional {validateDealStageUsagesBeforeDelete: bool=false, validateReferencesBeforeDelete: bool=false}\n@returns(200) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, stages: [map], updatedAt: str(date-time)} # successful operation\n\n@endpoint DELETE /crm/v3/pipelines/{objectType}/{pipelineId}\n@desc Delete a pipeline\n@required {pipelineId: str}\n@optional {validateDealStageUsagesBeforeDelete: bool=false, validateReferencesBeforeDelete: bool=false}\n@returns(204) No content\n\n@endpoint PATCH /crm/v3/pipelines/{objectType}/{pipelineId}\n@desc Perform a partial update of the pipeline identified by `{pipelineId}`. The updated pipeline will be returned in the response.\n@required {pipelineId: str}\n@optional {validateDealStageUsagesBeforeDelete: bool=false, validateReferencesBeforeDelete: bool=false, archived: bool # Whether the pipeline is archived. This property should only be provided when restoring an archived pipeline. If it's provided in any other call, the request will fail and a `400 Bad Request` will be returned., displayOrder: int(int32) # The order for displaying this pipeline. If two pipelines have a matching `displayOrder`, they will be sorted alphabetically by label., label: str # A unique label used to organize pipelines in HubSpot's UI}\n@returns(200) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, stages: [map], updatedAt: str(date-time)} # successful operation\n\n@endpoint GET /crm/v3/pipelines/{objectType}/{pipelineId}/audit\n@desc Return an audit of all changes to the pipeline\n@required {pipelineId: str}\n@returns(200) {results: [map]} # successful operation\n\n@endpoint GET /crm/v3/pipelines/{objectType}/{pipelineId}/stages\n@desc Return all stages of a pipeline\n@required {pipelineId: str}\n@returns(200) {results: [map]} # successful operation\n\n@endpoint POST /crm/v3/pipelines/{objectType}/{pipelineId}/stages\n@desc Create a pipeline stage\n@required {pipelineId: str, displayOrder: int(int32) # The order for displaying this pipeline stage. If two pipeline stages have a matching `displayOrder`, they will be sorted alphabetically by label., label: str # A label used to organize pipeline stages in HubSpot's UI. Each pipeline stage's label must be unique within that pipeline., metadata: map # A JSON object containing properties that are not present on all object pipelines.  For `deals` pipelines, the `probability` field is required (`{ \"probability\": 0.5 }`), and represents the likelihood a deal will close. Possible values are between 0.0 and 1.0 in increments of 0.1.  For `tickets` pipelines, the `ticketState` field is optional (`{ \"ticketState\": \"OPEN\" }`), and represents whether the ticket remains open or has been closed by a member of your Support team. Possible values are `OPEN` or `CLOSED`.}\n@optional {stageId: str}\n@returns(201) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, metadata: map, updatedAt: str(date-time), writePermissions: str} # successful operation\n\n@endpoint GET /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\n@desc Return a pipeline stage by ID\n@required {pipelineId: str, stageId: str}\n@returns(200) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, metadata: map, updatedAt: str(date-time), writePermissions: str} # successful operation\n\n@endpoint PUT /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\n@desc Replace a pipeline stage\n@required {pipelineId: str, stageId: str, displayOrder: int(int32) # The order for displaying this pipeline stage. If two pipeline stages have a matching `displayOrder`, they will be sorted alphabetically by label., label: str # A label used to organize pipeline stages in HubSpot's UI. Each pipeline stage's label must be unique within that pipeline., metadata: map # A JSON object containing properties that are not present on all object pipelines.  For `deals` pipelines, the `probability` field is required (`{ \"probability\": 0.5 }`), and represents the likelihood a deal will close. Possible values are between 0.0 and 1.0 in increments of 0.1.  For `tickets` pipelines, the `ticketState` field is optional (`{ \"ticketState\": \"OPEN\" }`), and represents whether the ticket remains open or has been closed by a member of your Support team. Possible values are `OPEN` or `CLOSED`.}\n@returns(200) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, metadata: map, updatedAt: str(date-time), writePermissions: str} # successful operation\n\n@endpoint DELETE /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\n@desc Delete a pipeline stage\n@required {pipelineId: str, stageId: str}\n@returns(204) No content\n\n@endpoint PATCH /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}\n@required {pipelineId: str, stageId: str, metadata: map # A JSON object containing properties that are not present on all object pipelines.  For `deals` pipelines, the `probability` field is required (`{ \"probability\": 0.5 }`), and represents the likelihood a deal will close. Possible values are between 0.0 and 1.0 in increments of 0.1.  For `tickets` pipelines, the `ticketState` field is optional (`{ \"ticketState\": \"OPEN\" }`), and represents whether the ticket remains open or has been closed by a member of your Support team. Possible values are `OPEN` or `CLOSED`.}\n@optional {archived: bool # Whether the pipeline is archived., displayOrder: int(int32) # The order for displaying this pipeline stage. If two pipeline stages have a matching `displayOrder`, they will be sorted alphabetically by label., label: str # A label used to organize pipeline stages in HubSpot's UI. Each pipeline stage's label must be unique within that pipeline.}\n@returns(200) {archived: bool, archivedAt: str(date-time), createdAt: str(date-time), displayOrder: int(int32), id: str, label: str, metadata: map, updatedAt: str(date-time), writePermissions: str} # successful operation\n\n@endpoint GET /crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}/audit\n@desc Return a reverse chronological list of all mutations that have occurred on the pipeline stage identified by `{stageId}`.\n@required {pipelineId: str, stageId: str}\n@returns(200) {results: [map]} # successful operation\n\n@end\n"}}