Goal

Goals represent objectives users on the Capsule account should work towards. For a full description of the model see the Goals model definition.

List goals

The collection of all the goals on this Capsule account.

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

Query Parameters

Name Type Description
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 goals which is an array of Goal objects.

HTTP/1.1 200
Link: <https://api.capsulecrm.com/api/v2/goals?page=2>; rel="next"
{
  "goals" : [ {
    "id" : 1,
    "name" : "Q4 2025",
    "frequency" : "FIXED",
    "status" : "ACTIVE",
    "value" : 13666.0,
    "createdAt" : "2025-04-16T13:29:38Z",
    "updatedAt" : "2025-09-18T09:40:46Z",
    "startOn" : "2025-03-12",
    "endOn" : "2025-10-18",
    "currency" : "CAD",
    "type" : "bbc7a4b4-78eb-3bbd-85bb-9f20ec2e3f5d"
  }, {
    "id" : 2,
    "name" : "Sales 2025",
    "frequency" : "MONTHLY",
    "status" : "MISSED",
    "value" : 300000.0,
    "createdAt" : "2025-06-04T16:14:31Z",
    "updatedAt" : "2025-09-05T05:09:11Z",
    "startOn" : "2025-06-04",
    "endOn" : "2025-09-04",
    "currency" : "GBP",
    "pipeline" : {
      "name" : "Main pipeline",
      "id" : 27
    },
    "type" : "1659cb58-2401-30eb-aa82-c42771aea74e"
  } ]
}

Headers:

Name Type Description
Link String

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

List goal periods

The collection of all the goal periods for a specific goal on this Capsule account.

GET
https://api.capsulecrm.com/api/v2/goals/{goalId}/periods

Query Parameters

Name Type Description
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 goalPeriods which is an array of Goal Period objects.

HTTP/1.1 200
Link: <https://api.capsulecrm.com/api/v2/goals/1/periods?page=2>; rel="next"
{
  "goalPeriods" : [ {
    "goal" : {
      "id" : 31
    },
    "startOn" : "2025-03-08",
    "endOn" : "2025-04-08",
    "completedOn" : "2025-04-01",
    "targetValue" : 25.0,
    "id" : 325,
    "currentValue" : 0.0
  }, {
    "goal" : {
      "id" : 31
    },
    "startOn" : "2025-04-08",
    "endOn" : "2025-06-08",
    "targetValue" : 25.0,
    "id" : 326,
    "currentValue" : 0.0
  } ]
}

Headers:

Name Type Description
Link String

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

Show goal

Show a specific goal.

GET
https://api.capsulecrm.com/api/v2/goals/{goalId}

Response

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

HTTP/1.1 200
{
  "goal" : {
    "id" : 1840253,
    "name" : "Q4 2025",
    "frequency" : "FIXED",
    "status" : "ACTIVE",
    "value" : 13666.0,
    "createdAt" : "2025-04-16T13:29:38Z",
    "updatedAt" : "2025-09-18T09:40:46Z",
    "startOn" : "2025-03-12",
    "endOn" : "2025-10-18",
    "currency" : "GBP",
    "type" : "bbc7a4b4-78eb-3bbd-85bb-9f20ec2e3f5d",
    "user" : 3
  }
}

Create goal

Creates a new goal. The body must contain an object with a single property goal which must be a Goal object.

POST
https://api.capsulecrm.com/api/v2/goals
          {
  "goal" : {
    "name" : "Q4 2025",
    "type" : "bbc7a4b4-78eb-3bbd-85bb-9f20ec2e3f5d",
    "frequency" : "FIXED",
    "value" : 13666.0,
    "startOn" : "2025-03-12",
    "endOn" : "2025-10-18",
    "user" : 3,
    "currency" : "GBP"
  }
}
        

Response

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

HTTP/1.1 201
Location: https://api.capsulecrm.com/api/v2/goals/1840253
{
  "goal" : {
    "id" : 1840253,
    "name" : "Q4 2025",
    "frequency" : "FIXED",
    "status" : "ACTIVE",
    "value" : 13666.0,
    "createdAt" : "2025-04-16T13:29:38Z",
    "updatedAt" : "2025-09-18T09:40:46Z",
    "startOn" : "2025-03-12",
    "endOn" : "2025-10-18",
    "currency" : "GBP",
    "type" : "bbc7a4b4-78eb-3bbd-85bb-9f20ec2e3f5d",
    "user" : 3
  }
}

Headers:

Name Type Description
Location String

The URL that identifies the new goal.

Update goal

Update an existing goal. The body must contain an object with a single property goal which must be a Goal object. Goal assignee, type, pipeline and milestone cannot be changed.

PUT
https://api.capsulecrm.com/api/v2/goals/{goalId}
          {
  "goal" : {
    "name" : "Contract Renewal"
  }
}
        

Response

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

HTTP/1.1 200
{
  "goal" : {
    "id" : 3,
    "name" : "Contract Renewal",
    "frequency" : "FIXED",
    "status" : "ACTIVE",
    "value" : 13666.0,
    "createdAt" : "2025-04-16T13:29:38Z",
    "updatedAt" : "2025-09-18T09:40:46Z",
    "startOn" : "2025-03-12",
    "endOn" : "2025-10-18",
    "currency" : "GBP",
    "type" : "bbc7a4b4-78eb-3bbd-85bb-9f20ec2e3f5d",
    "user" : 3
  }
}

Delete goal

Removes a goal from the Capsule account.

DELETE
https://api.capsulecrm.com/api/v2/goals/{goalId}

Response

Returns HTTP status code 204. Returns an empty body if the goal was successfully deleted.

HTTP/1.1 204