Activity Type

These endpoints allow you to retrieve and configure activity types used to categorise entries to easily see different types of notes on the history of records in Capsule and also to assist in reporting.

Capsule comes with a range of built in Activity Types that are available to all editions of Capsule. Accounts on the teams edition can configure additional custom types.

List activity types

The collection of all the activity types on this Capsule account.

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

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 activityTypes which is an array of Activity Type objects.

HTTP/1.1 200
Link: <https://api.capsulecrm.com/api/v2/activitytypes?page=4>; rel="next"
{
  "activityTypes" : [ {
    "id" : -1,
    "name" : "Note",
    "icon" : {
      "order" : 29,
      "id" : "NOTE",
      "displayName" : "Note",
      "iconName" : "note",
      "isSystem" : true
    },
    "updateLastContacted" : true
  }, {
    "id" : -2,
    "name" : "Meeting",
    "icon" : {
      "order" : 18,
      "id" : "MEETING",
      "displayName" : "Meeting",
      "iconName" : "meeting",
      "isSystem" : false
    },
    "updateLastContacted" : true
  }, {
    "id" : -3,
    "name" : "Call",
    "icon" : {
      "order" : 12,
      "id" : "PHONE",
      "displayName" : "Phone",
      "iconName" : "phone",
      "isSystem" : false
    },
    "updateLastContacted" : true
  } ]
}

Headers:

Name Type Description
Link String

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

Show activity type

Show a specific activity type.

GET
https://api.capsulecrm.com/api/v2/activitytypes/{activityTypeId}

Response

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

HTTP/1.1 200
{
  "activityType" : {
    "id" : 2,
    "name" : "Video Conference",
    "icon" : {
      "order" : 12,
      "id" : "PHONE",
      "displayName" : "Phone",
      "iconName" : "phone",
      "isSystem" : false
    },
    "updateLastContacted" : true
  }
}

Create activity type

Creates a new activity type. The body must contain an object with a single property activityType which must be an Activity Type object.

Please be aware that creating an activity type is only possible on a teams edition Capsule account.

POST
https://api.capsulecrm.com/api/v2/activitytypes
          {
  "activityType" : {
    "name" : "Video Conference",
    "icon" : {
      "id" : "PHONE"
    },
    "updateLastContacted" : true
  }
}
        

Response

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

HTTP/1.1 201
Location: https://api.capsulecrm.com/api/v2/activitytypes/2
{
  "activityType" : {
    "id" : 1,
    "name" : "Video Conference",
    "icon" : {
      "order" : 1,
      "id" : "PHONE",
      "displayName" : "Phone",
      "iconName" : "phone",
      "isSystem" : false
    },
    "updateLastContacted" : true
  }
}

Headers:

Name Type Description
Location String

The URL that identifies the new activity type.

Update activity type

Updates an existing activity type. The body must contain an object with a single property activityType which must be an Activity Type object. Fields that are not included in the request will remain unchanged.

PUT
https://api.capsulecrm.com/api/v2/activitytypes/{activityTypeId}
          {
  "activityType" : {
    "name" : "Tele Conference"
  }
}
        

Response

Returns HTTP status code 200. The response contains the object after changes have been applied.

HTTP/1.1 200
{
  "activityType" : {
    "id" : 2,
    "name" : "Tele Conference",
    "icon" : {
      "order" : 12,
      "id" : "PHONE",
      "displayName" : "Phone",
      "iconName" : "phone",
      "isSystem" : false
    },
    "updateLastContacted" : true
  }
}

Delete activity type

Removes an activity type from the Capsule account.

DELETE
https://api.capsulecrm.com/api/v2/activitytypes/{activityTypeId}

Response

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

HTTP/1.1 204

List icons

List of icons that can be associated with activity types.

GET
https://api.capsulecrm.com/api/v2/activitytypes/icons

Response

Returns HTTP status code 200. The body of the response will contain an object with a single property activityTypeIcons which is an array of Icon objects.

HTTP/1.1 200
{
  "activityTypeIcons" : [ {
    "order" : 0,
    "id" : "BARCHART",
    "displayName" : "Bar chart",
    "iconName" : "bar-chart",
    "isSystem" : false
  }, {
    "order" : 1,
    "id" : "PIECHART",
    "displayName" : "Pie chart",
    "iconName" : "pie-chart",
    "isSystem" : false
  }, {
    "order" : 2,
    "id" : "MONEY",
    "displayName" : "Money",
    "iconName" : "money",
    "isSystem" : false
  }, {
    "order" : 3,
    "id" : "TAG",
    "displayName" : "Tag",
    "iconName" : "tag",
    "isSystem" : false
  }, {
    "order" : 4,
    "id" : "CAMERA",
    "displayName" : "Camera",
    "iconName" : "camera",
    "isSystem" : false
  }, {
    "order" : 5,
    "id" : "PICTURE",
    "displayName" : "Picture",
    "iconName" : "picture",
    "isSystem" : false
  }, {
    "order" : 6,
    "id" : "BELL",
    "displayName" : "Bell",
    "iconName" : "bell",
    "isSystem" : false
  }, {
    "order" : 7,
    "id" : "CAR",
    "displayName" : "Car",
    "iconName" : "car",
    "isSystem" : false
  }, {
    "order" : 8,
    "id" : "PLANE",
    "displayName" : "Plane",
    "iconName" : "plane",
    "isSystem" : false
  }, {
    "order" : 9,
    "id" : "DOCUMENT",
    "displayName" : "Document",
    "iconName" : "document",
    "isSystem" : false
  }, {
    "order" : 10,
    "id" : "DOCUMENT2",
    "displayName" : "Document 2",
    "iconName" : "document-2",
    "isSystem" : false
  }, {
    "order" : 11,
    "id" : "SPREADSHEET",
    "displayName" : "Spreadsheet",
    "iconName" : "spreadsheet",
    "isSystem" : false
  }, {
    "order" : 12,
    "id" : "PHONE",
    "displayName" : "Phone",
    "iconName" : "phone",
    "isSystem" : false
  }, {
    "order" : 13,
    "id" : "PERSONWALKING",
    "displayName" : "Person Walking",
    "iconName" : "person-walking",
    "isSystem" : false
  }, {
    "order" : 14,
    "id" : "SHOPPINGCART",
    "displayName" : "Shopping Cart",
    "iconName" : "shopping-cart",
    "isSystem" : false
  }, {
    "order" : 15,
    "id" : "LOCATION",
    "displayName" : "Location",
    "iconName" : "location",
    "isSystem" : false
  }, {
    "order" : 16,
    "id" : "CLIPBOARD",
    "displayName" : "Clipboard",
    "iconName" : "clipboard",
    "isSystem" : false
  }, {
    "order" : 17,
    "id" : "MIC",
    "displayName" : "Mic",
    "iconName" : "mic",
    "isSystem" : false
  }, {
    "order" : 18,
    "id" : "MEETING",
    "displayName" : "Meeting",
    "iconName" : "meeting",
    "isSystem" : false
  }, {
    "order" : 19,
    "id" : "PACKAGE",
    "displayName" : "Package",
    "iconName" : "package",
    "isSystem" : false
  }, {
    "order" : 20,
    "id" : "CLOCK",
    "displayName" : "Clock",
    "iconName" : "clock",
    "isSystem" : false
  }, {
    "order" : 21,
    "id" : "DOUBLESPEECHBUBBLE",
    "displayName" : "Double Speech Bubble",
    "iconName" : "double-speech-bubble",
    "isSystem" : false
  }, {
    "order" : 22,
    "id" : "COG",
    "displayName" : "Cog",
    "iconName" : "cog",
    "isSystem" : false
  }, {
    "order" : 23,
    "id" : "LINK",
    "displayName" : "Link",
    "iconName" : "link",
    "isSystem" : false
  }, {
    "order" : 24,
    "id" : "STAR",
    "displayName" : "Star",
    "iconName" : "star",
    "isSystem" : false
  }, {
    "order" : 25,
    "id" : "CREDITCARD",
    "displayName" : "Credit Card",
    "iconName" : "credit-card",
    "isSystem" : false
  }, {
    "order" : 26,
    "id" : "MAIL",
    "displayName" : "Mail",
    "iconName" : "mail",
    "isSystem" : false
  }, {
    "order" : 27,
    "id" : "LINECHART",
    "displayName" : "Line Chart",
    "iconName" : "line-chart",
    "isSystem" : false
  }, {
    "order" : 28,
    "id" : "SHOPPINGBASKET",
    "displayName" : "Shopping Basket",
    "iconName" : "shopping-basket",
    "isSystem" : false
  } ]
}