Kepla API

Activities

Activities are any kind of chronological update in Kepla. They're used for things big and small, from recording a click in an email to attending an event or leaving a note. Activities are always associated with records, are assigned a taxonomy and can store metadata (as long as it's registered on the taxonomy). You can list, retrieve, create, update and delete activities using the API.

Activities Overview

{
  "accountId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. Your account ID.

  "createdAt": null,
String (Date-time)

Read only. Datetime the activity was created.

  "date": null,
String (Date-time)

The date the activity occurred

  "id": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The activity ID.

  "meta": {
  "meta": { ... }
Object

Activity metadata. The keys here must match those registered on the taxonomy.

  },
  "recordId": [
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3"
  ],
Array

The record ID to attach the activity to

  "taxonomy": {
  "taxonomy": { ... }
Object

Read only. The full related taxonomy object. Set taxonomyId to change this.

    "accountId": "e1f4cca4-1cbc-42cb-bb2f-5bbbab513f5c",
String
    "id": "2a6bdad4-2f61-4aec-bd6f-8f4ffc626bf9",
String
    "meta": {
    "meta": { ... }
Object

Meta is only supported by "activity" taxonomies.

      "metaKey": {
      "metaKey": { ... }
Object

The object key is the ID for the meta field. It is how it is stored on an activity.

        "name": "Example Meta",
String

Used as a label in the app.

        "primary": false,
Boolean

If true the meta field will show above the activity comment in the app.

        "visible": true
Boolean

If false the meta field will be stored but not shown to the user when viewing a record's activities.

      }
    },
    "name": "Event",
String
    "number": false,
Boolean

Deprecated

    "readonly": false,
Boolean

System use only

    "taxonomy": "activity"
String
  },
  "taxonomyId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The taxonomy ID for the activity

  "typeId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The type ID this activity is part of

  "user": {
  "user": { ... }
Object

Read only. The user object who created the activity.

    "createdAt": "2015-11-02T00:30:23.968Z",
String
    "email": "[email protected]",
String (Email)
    "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String
    "name": "Tom Maitland"
String
  },
  "userId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The ID of the user who created the activity.

  records: [
Array

If extended, includes an array of related record objects.

    {
    { ... }
Object

Condensed

      "{fieldId}": "Field value",
String
      "createdAt": "2015-07-22T19:30:11.203Z",
String
      "id": "5aa2220d-4997-4e47-a651-b9d44b63224f",
String
      "typeId": "7806762b-2b30-4e12-bbe9-fafd6150cf4d",
String
      "updatedAt": "2016-07-19T11:06:54.313Z",
String
      "display": {
      "display": { ... }
Object
        "title": "Joe API",
String

The first value on the record by field order

        "subtitle": "[email protected]"
String

The second value on the record by field order

      }
    }
  ]
}

List Activities

Open in API Explorer
GET /activities

Returns a list of all activities on the account, filtered by the query parameters. You can use this endpoint to get a range of activity across records, or just the activities associated with an individual record.

Example Request

Format:
curl --request GET \
  --url 'https://api.kepla.com/v1/activities?limit=50&offset=42&order=desc&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo&extend=records' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/activities?limit=50&offset=42&order=desc&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo&extend=records")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/activities?limit=50&offset=42&order=desc&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo&extend=records",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE"
    }

conn.request("GET", "/v1/activities?limit=50&offset=42&order=desc&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo&extend=records", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/activities?limit=50&offset=42&order=desc&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo&extend=records",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/activities?limit=50&offset=42&order=desc&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo&extend=records"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
limit Integer Optional

The maximum number of activities to return (for pagination)

50
offset Integer Optional

Number of items to skip from the start of the collection

42
order String Optional

Direction to order results in. Can be asc or desc.

desc
orderBy String Optional

The field to order results by. You can use any field on the activity object.

foo
typeId String (uuid) Optional

Filters the collection to include only activities with the specified type ID

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a
taxonomyId String (uuid) Optional

Filters the collection to include only the specified taxonomy ID

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a
from String (date-time) Optional

Retrieve activities from the specified date

to String (date-time) Optional

Retrieve activities up until the specified date

recordId String (uuid) Optional

Retrieve activities associated with this record ID

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a
search String Optional

Filter the collection to include activities that match the specified term. This will search the entire activity object, and doesn't include any kind of relevance scoring.

foo
extend String (email) Optional

If supplied, will include the related records in each activity object. Note: This does slow down the query for large accounts.

records

Responses

200 Success Activities Envelope
{
  "total": 100,
Integer

Total number of matching activities

  activities: [
Array
    {
    { ... }
Object

List

      "items": {
      "items": { ... }
Object
        "accountId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. Your account ID.

        "createdAt": null,
String (Date-time)

Read only. Datetime the activity was created.

        "date": null,
String (Date-time)

The date the activity occurred

        "id": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The activity ID.

        "meta": {
        "meta": { ... }
Object

Activity metadata. The keys here must match those registered on the taxonomy.

        },
        "recordId": [
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3"
  ],
Array

The record ID to attach the activity to

        "taxonomy": {
        "taxonomy": { ... }
Object

Read only. The full related taxonomy object. Set taxonomyId to change this.

          "accountId": "e1f4cca4-1cbc-42cb-bb2f-5bbbab513f5c",
String
          "id": "2a6bdad4-2f61-4aec-bd6f-8f4ffc626bf9",
String
          "meta": {
          "meta": { ... }
Object

Meta is only supported by "activity" taxonomies.

            "metaKey": {
            "metaKey": { ... }
Object

The object key is the ID for the meta field. It is how it is stored on an activity.

              "name": "Example Meta",
String

Used as a label in the app.

              "primary": false,
Boolean

If true the meta field will show above the activity comment in the app.

              "visible": true
Boolean

If false the meta field will be stored but not shown to the user when viewing a record's activities.

            }
          },
          "name": "Event",
String
          "number": false,
Boolean

Deprecated

          "readonly": false,
Boolean

System use only

          "taxonomy": "activity"
String
        },
        "taxonomyId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The taxonomy ID for the activity

        "typeId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The type ID this activity is part of

        "user": {
        "user": { ... }
Object

Read only. The user object who created the activity.

          "createdAt": "2015-11-02T00:30:23.968Z",
String
          "email": "[email protected]",
String (Email)
          "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String
          "name": "Tom Maitland"
String
        },
        "userId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The ID of the user who created the activity.

        records: [
Array

If extended, includes an array of related record objects.

          {
          { ... }
Object

Condensed

            "{fieldId}": "Field value",
String
            "createdAt": "2015-07-22T19:30:11.203Z",
String
            "id": "5aa2220d-4997-4e47-a651-b9d44b63224f",
String
            "typeId": "7806762b-2b30-4e12-bbe9-fafd6150cf4d",
String
            "updatedAt": "2016-07-19T11:06:54.313Z",
String
            "display": {
            "display": { ... }
Object
              "title": "Joe API",
String

The first value on the record by field order

              "subtitle": "[email protected]"
String

The second value on the record by field order

            }
          }
        ]
      }
    }
  ]
  "options": {
  "options": { ... }
Object
    "limit": 50,
Integer
    "offset": 0
Integer
  }
}

Retrieve an Activity

Open in API Explorer
GET /activities/:activity

Retrieves the specified activity object.

Example Request

Format:
curl --request GET \
  --url https://api.kepla.com/v1/activities/:activity \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/activities/:activity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/activities/:activity",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE"
    }

conn.request("GET", "/v1/activities/:activity", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/activities/:activity",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/activities/:activity"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
activity String (uuid) Required

The activity ID to retrieve

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a

Responses

200 Success Activities Default
{
  "accountId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. Your account ID.

  "createdAt": null,
String (Date-time)

Read only. Datetime the activity was created.

  "date": null,
String (Date-time)

The date the activity occurred

  "id": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The activity ID.

  "meta": {
  "meta": { ... }
Object

Activity metadata. The keys here must match those registered on the taxonomy.

  },
  "recordId": [
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3"
  ],
Array

The record ID to attach the activity to

  "taxonomy": {
  "taxonomy": { ... }
Object

Read only. The full related taxonomy object. Set taxonomyId to change this.

    "accountId": "e1f4cca4-1cbc-42cb-bb2f-5bbbab513f5c",
String
    "id": "2a6bdad4-2f61-4aec-bd6f-8f4ffc626bf9",
String
    "meta": {
    "meta": { ... }
Object

Meta is only supported by "activity" taxonomies.

      "metaKey": {
      "metaKey": { ... }
Object

The object key is the ID for the meta field. It is how it is stored on an activity.

        "name": "Example Meta",
String

Used as a label in the app.

        "primary": false,
Boolean

If true the meta field will show above the activity comment in the app.

        "visible": true
Boolean

If false the meta field will be stored but not shown to the user when viewing a record's activities.

      }
    },
    "name": "Event",
String
    "number": false,
Boolean

Deprecated

    "readonly": false,
Boolean

System use only

    "taxonomy": "activity"
String
  },
  "taxonomyId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The taxonomy ID for the activity

  "typeId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The type ID this activity is part of

  "user": {
  "user": { ... }
Object

Read only. The user object who created the activity.

    "createdAt": "2015-11-02T00:30:23.968Z",
String
    "email": "[email protected]",
String (Email)
    "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String
    "name": "Tom Maitland"
String
  },
  "userId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The ID of the user who created the activity.

  records: [
Array

If extended, includes an array of related record objects.

    {
    { ... }
Object

Condensed

      "{fieldId}": "Field value",
String
      "createdAt": "2015-07-22T19:30:11.203Z",
String
      "id": "5aa2220d-4997-4e47-a651-b9d44b63224f",
String
      "typeId": "7806762b-2b30-4e12-bbe9-fafd6150cf4d",
String
      "updatedAt": "2016-07-19T11:06:54.313Z",
String
      "display": {
      "display": { ... }
Object
        "title": "Joe API",
String

The first value on the record by field order

        "subtitle": "[email protected]"
String

The second value on the record by field order

      }
    }
  ]
}

Export Activity

Open in API Explorer
GET /activity-exports

Generates a CSV file of activities based on the specified filters. You can download this file for offline processing. Like other export endpoints, this export is currently synchronous and can take a while to resolve if you're exporting a large amount of data.

Example Request

Format:
curl --request GET \
  --url 'https://api.kepla.com/v1/activity-exports?order=foo&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/activity-exports?order=foo&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/activity-exports?order=foo&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE"
    }

conn.request("GET", "/v1/activity-exports?order=foo&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/activity-exports?order=foo&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/activity-exports?order=foo&orderBy=foo&typeId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&taxonomyId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&from=&to=&recordId=04fe9a97-a579-43c5-bb1a-58ed29bf0a6a&search=foo"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
order String Optional

The direction to order activity in. Can be asc or desc.

foo
orderBy String Optional

The key to order activity on

foo
typeId String (uuid) Optional

The type ID to filter activity by

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a
taxonomyId String (uuid) Optional

The taxonomy ID to filter activity by

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a
from String (date-time) Optional

The date to include activities from

to String (date-time) Optional

The date to include activities up until

recordId String (uuid) Optional

The record ID to filter activities by

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a
search String Optional

A string to search all matching activities by. This searches all of the fields on an activity, and doesn't include relevancy (the same as the list endpoint).

foo

Responses

200 Success Activities Export
{
  "url": "https://withtempo-production-v2.s3.amazonaws.com/exports/activities-xxx.csv"
String (Url)
}

Create an Activity

Open in API Explorer
POST /activities

Creates an activity object with the specified data.

Example Request

Format:
curl --request POST \
  --url https://api.kepla.com/v1/activities \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE' \
  --header 'content-type: application/json' \
  --data '{"recordId":"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a","typeId":"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a","taxonomyId":"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a","comment":"My comment","date":null,"meta":{"3259cefa":"Meta value"}}'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/activities")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/activities",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ recordId: '04fe9a97-a579-43c5-bb1a-58ed29bf0a6a',
  typeId: '04fe9a97-a579-43c5-bb1a-58ed29bf0a6a',
  taxonomyId: '04fe9a97-a579-43c5-bb1a-58ed29bf0a6a',
  comment: 'My comment',
  date: null,
  meta: { '3259cefa': 'Meta value' } }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

payload = "{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}"

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("POST", "/v1/activities", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/activities",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/activities"

	payload := strings.NewReader("{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Body

Name Type Required Description Example
payload Object Required
{
  "recordId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The record ID for the activity

  "typeId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The type ID for the activity

  "taxonomyId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Taxonomy ID for the activity.

  "comment": "My comment",
String

A comment to include on the activity. This can be any string, including HTML.

  "date": null,
String (Date-time)

Date/time the activity occured

  "meta": {
  "meta": { ... }
Object

An object with key/value pairs of metadata. Must correspond with metadata registered on the taxonomy.

    "3259cefa": "Meta value"
String
  }
}

Responses

201 Success Activities Default
{
  "accountId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. Your account ID.

  "createdAt": null,
String (Date-time)

Read only. Datetime the activity was created.

  "date": null,
String (Date-time)

The date the activity occurred

  "id": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The activity ID.

  "meta": {
  "meta": { ... }
Object

Activity metadata. The keys here must match those registered on the taxonomy.

  },
  "recordId": [
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3"
  ],
Array

The record ID to attach the activity to

  "taxonomy": {
  "taxonomy": { ... }
Object

Read only. The full related taxonomy object. Set taxonomyId to change this.

    "accountId": "e1f4cca4-1cbc-42cb-bb2f-5bbbab513f5c",
String
    "id": "2a6bdad4-2f61-4aec-bd6f-8f4ffc626bf9",
String
    "meta": {
    "meta": { ... }
Object

Meta is only supported by "activity" taxonomies.

      "metaKey": {
      "metaKey": { ... }
Object

The object key is the ID for the meta field. It is how it is stored on an activity.

        "name": "Example Meta",
String

Used as a label in the app.

        "primary": false,
Boolean

If true the meta field will show above the activity comment in the app.

        "visible": true
Boolean

If false the meta field will be stored but not shown to the user when viewing a record's activities.

      }
    },
    "name": "Event",
String
    "number": false,
Boolean

Deprecated

    "readonly": false,
Boolean

System use only

    "taxonomy": "activity"
String
  },
  "taxonomyId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The taxonomy ID for the activity

  "typeId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The type ID this activity is part of

  "user": {
  "user": { ... }
Object

Read only. The user object who created the activity.

    "createdAt": "2015-11-02T00:30:23.968Z",
String
    "email": "[email protected]",
String (Email)
    "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String
    "name": "Tom Maitland"
String
  },
  "userId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The ID of the user who created the activity.

  records: [
Array

If extended, includes an array of related record objects.

    {
    { ... }
Object

Condensed

      "{fieldId}": "Field value",
String
      "createdAt": "2015-07-22T19:30:11.203Z",
String
      "id": "5aa2220d-4997-4e47-a651-b9d44b63224f",
String
      "typeId": "7806762b-2b30-4e12-bbe9-fafd6150cf4d",
String
      "updatedAt": "2016-07-19T11:06:54.313Z",
String
      "display": {
      "display": { ... }
Object
        "title": "Joe API",
String

The first value on the record by field order

        "subtitle": "[email protected]"
String

The second value on the record by field order

      }
    }
  ]
}

Update an Activity

Open in API Explorer
PUT /activities/:activity

Updates the specified activity with the provided data. Generally you shouldn't need to update activities since they're historical (and history can't be undone) but if you need to the endpoint exists.

Example Request

Format:
curl --request PUT \
  --url https://api.kepla.com/v1/activities/:activity \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE' \
  --header 'content-type: application/json' \
  --data '{"recordId":"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a","typeId":"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a","taxonomyId":"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a","comment":"My comment","date":null,"meta":{"3259cefa":"Meta value"}}'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/activities/:activity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/activities/:activity",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ recordId: '04fe9a97-a579-43c5-bb1a-58ed29bf0a6a',
  typeId: '04fe9a97-a579-43c5-bb1a-58ed29bf0a6a',
  taxonomyId: '04fe9a97-a579-43c5-bb1a-58ed29bf0a6a',
  comment: 'My comment',
  date: null,
  meta: { '3259cefa': 'Meta value' } }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

payload = "{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}"

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("PUT", "/v1/activities/:activity", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/activities/:activity",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/activities/:activity"

	payload := strings.NewReader("{\"recordId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"typeId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"taxonomyId\":\"04fe9a97-a579-43c5-bb1a-58ed29bf0a6a\",\"comment\":\"My comment\",\"date\":null,\"meta\":{\"3259cefa\":\"Meta value\"}}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
activity String (uuid) Required

The activity ID to update

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a

Request Body

Name Type Required Description Example
payload Object Required
{
  "recordId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The record ID for the activity

  "typeId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The type ID for the activity

  "taxonomyId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Taxonomy ID for the activity.

  "comment": "My comment",
String

A comment to include on the activity. This can be any string, including HTML.

  "date": null,
String (Date-time)

Date/time the activity occured

  "meta": {
  "meta": { ... }
Object

An object with key/value pairs of metadata. Must correspond with metadata registered on the taxonomy.

    "3259cefa": "Meta value"
String
  }
}

Responses

200 Success Activities Default
{
  "accountId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. Your account ID.

  "createdAt": null,
String (Date-time)

Read only. Datetime the activity was created.

  "date": null,
String (Date-time)

The date the activity occurred

  "id": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The activity ID.

  "meta": {
  "meta": { ... }
Object

Activity metadata. The keys here must match those registered on the taxonomy.

  },
  "recordId": [
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3",
    "2a6bdad4-2f61-4aec-bd6f-8f4ffc626be3"
  ],
Array

The record ID to attach the activity to

  "taxonomy": {
  "taxonomy": { ... }
Object

Read only. The full related taxonomy object. Set taxonomyId to change this.

    "accountId": "e1f4cca4-1cbc-42cb-bb2f-5bbbab513f5c",
String
    "id": "2a6bdad4-2f61-4aec-bd6f-8f4ffc626bf9",
String
    "meta": {
    "meta": { ... }
Object

Meta is only supported by "activity" taxonomies.

      "metaKey": {
      "metaKey": { ... }
Object

The object key is the ID for the meta field. It is how it is stored on an activity.

        "name": "Example Meta",
String

Used as a label in the app.

        "primary": false,
Boolean

If true the meta field will show above the activity comment in the app.

        "visible": true
Boolean

If false the meta field will be stored but not shown to the user when viewing a record's activities.

      }
    },
    "name": "Event",
String
    "number": false,
Boolean

Deprecated

    "readonly": false,
Boolean

System use only

    "taxonomy": "activity"
String
  },
  "taxonomyId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The taxonomy ID for the activity

  "typeId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

The type ID this activity is part of

  "user": {
  "user": { ... }
Object

Read only. The user object who created the activity.

    "createdAt": "2015-11-02T00:30:23.968Z",
String
    "email": "[email protected]",
String (Email)
    "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String
    "name": "Tom Maitland"
String
  },
  "userId": "04fe9a97-a579-43c5-bb1a-58ed29bf0a6a",
String (Uuid)

Read only. The ID of the user who created the activity.

  records: [
Array

If extended, includes an array of related record objects.

    {
    { ... }
Object

Condensed

      "{fieldId}": "Field value",
String
      "createdAt": "2015-07-22T19:30:11.203Z",
String
      "id": "5aa2220d-4997-4e47-a651-b9d44b63224f",
String
      "typeId": "7806762b-2b30-4e12-bbe9-fafd6150cf4d",
String
      "updatedAt": "2016-07-19T11:06:54.313Z",
String
      "display": {
      "display": { ... }
Object
        "title": "Joe API",
String

The first value on the record by field order

        "subtitle": "[email protected]"
String

The second value on the record by field order

      }
    }
  ]
}

Delete an Activity

Open in API Explorer
DELETE /activities/:activity

Deletes the specified activity. Generally this also shouldn't be needed since activities are historical, but is included here and in the client incase you log an incorrect activity.

Example Request

Format:
curl --request DELETE \
  --url https://api.kepla.com/v1/activities/:activity \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/activities/:activity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/activities/:activity",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE"
    }

conn.request("DELETE", "/v1/activities/:activity", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/activities/:activity",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/activities/:activity"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
activity String (uuid) Required

The activity ID to delete

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a

Responses

204 Success (Empty Response)