Pipeline

A pipeline is a set of milestones that a prospect moves through, as it progresses from a new lead to a customer. For a full description of the model see the Pipeline model definition.

List pipelines

The collection of pipelines on the Capsule account.

GET
https://api.capsulecrm.com/api/v2/pipelines

Query Parameters

Name Type Description
includeDeleted Boolean

Indicates deleted/archived entities should also be included.

page Integer

The page of results to return. Default: 1

perPage Integer

The number of entities to return per page. Value must be between 1 and 100. Default: 50

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property pipelines which is an array of Pipeline objects. In the case of an invalid request, an error message will be returned, as described in the errors section.

HTTP/1.1 200
Link: <https://api.capsulecrm.com/api/v2/pipelines?page=4>; rel="next"
{
  "pipelines" : [ {
    "id" : 11589,
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }, {
    "id" : 11588,
    "name" : "Sales Pipeline"
  } ]
}

Headers:

Name Type Description
Link String

Links to the next and previous pages, encoded as defined in RFC 5988.

Show pipeline

Show a specific pipeline.

GET
https://api.capsulecrm.com/api/v2/pipelines/{pipelineId}

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property pipeline which is a Pipeline object.

HTTP/1.1 200
{
  "pipeline" : {
    "id" : 11589,
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }
}

Show multiple pipelines

Allows to load a list of pipelines by providing their unique ids. pipelineIds must be a comma separated list of integers and can contain at most 10 values.

GET
https://api.capsulecrm.com/api/v2/pipelines/{pipelineIds}

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property pipelines which is an array of Pipeline objects. The endpoint will return 404 NOT FOUND if any one of the provided ids does not match an existing pipeline. In the case of an invalid request, an error message will be returned, as described in the errors section.

HTTP/1.1 200
{
  "pipelines" : [ {
    "id" : 11589,
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }, {
    "id" : 11588,
    "name" : "Sales Pipeline"
  } ]
}

Create pipeline

Creates a new pipeline. The body must contain an object with a single property pipeline which must be a Pipeline object. Capsule accounts can have at most 10 active pipelines at any one time. This operation requires the authenticated user to have an Administrator role on the Capsule account.

POST
https://api.capsulecrm.com/api/v2/pipelines
          {
  "pipeline" : {
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }
}
        

Response

Returns HTTP status code 201. The body of the response will contain the pipeline as it was stored in Capsule.

HTTP/1.1 201
Location: https://api.capsulecrm.com/api/v2/pipelines/11589
{
  "pipeline" : {
    "id" : 11589,
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }
}

Headers:

Name Type Description
Location String

The URL that identifies the new pipeline.

Duplicate pipeline

Duplicate a specific pipeline. This operation requires the authenticated user to have an Administrator role on the Capsule account.

POST
https://api.capsulecrm.com/api/v2/pipelines/{pipelineId}/duplicate

Response

Returns HTTP status code 201. The body of the response will contain the pipeline as it was stored in Capsule. In the case of an invalid request, an error message will be returned, as described in the errors section.

HTTP/1.1 201
Location: https://api.capsulecrm.com/api/v2/pipelines/11589
{
  "pipeline" : {
    "id" : 11589,
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }
}

Headers:

Name Type Description
Location String

The URL that identifies the new pipeline.

Update pipeline

Update an existing pipeline. The body must contain an object with a single property pipeline which must be a Pipeline object. Fields that are not included in the request will remain unchanged. This operation requires the authenticated user to have an Administrator role on the Capsule account.

PUT
https://api.capsulecrm.com/api/v2/pipelines/{pipelineId}
          {
  "pipeline" : {
    "name" : "SMB clients"
  }
}
        

Response

Returns HTTP status code 200. All good

HTTP/1.1 200
{
  "pipeline" : {
    "id" : 11589,
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }
}

Archive pipeline

Archive the specific pipeline. This operation requires the authenticated user to have an Administrator role on the Capsule account.

DELETE
https://api.capsulecrm.com/api/v2/pipelines/{pipelineId}

Response

Returns HTTP status code 204. Returns status code 204 with an empty body if the pipeline was successfully archived.

HTTP/1.1 204

Restore pipeline

Restore an archived pipeline. This operation requires the authenticated user to have an Administrator role on the Capsule account.

POST
https://api.capsulecrm.com/api/v2/pipelines/{pipelineId}/restore

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property pipeline which is a Pipeline object. In the case of an invalid request, an error message will be returned, as described in the errors section.

HTTP/1.1 200
{
  "pipeline" : {
    "id" : 11589,
    "name" : "SMB clients",
    "description" : "Process for small and medium-sized businesses"
  }
}