Clio API v2

This API allows third party developers to securely access data and actions in Clio. OAuth 2.0 is used for secure authorization. The API and this document are evolving as needs arise.

Developer Support and Feedback

As we are all aware, the importance of API-level developments is paramount in the cloud-based software industry. Clio’s open API allows you to create valuable add-ons for your clients, and in turn, construct profitable revenue streams for your business.

Please direct any inquiries to the appropriate channel:

We look forward to seeing your developments and creating successful relationships!

Clio Client Library

To get you working with our API even faster we have built a ruby client gem and a sample app to show you how to get started with it.

Application Catalog

Clio has an application catalog that lets developers list their apps. The catalog includes a short description of your app along with a link to installation instructions. If your application is ready to be listed in the catalog please contact api.partnerships@goclio.com.

Authorization with OAuth 2.0

Clio’s API is only exposed through OAuth 2.0. In order to access any of the methods exposed in the API, your application must obtain authorization from the user. The following steps will get you started:

Create a Clio Account

  1. Visit http://www.goclio.com/signup/ and create an account.
  2. If you are only using your account to develop and test applications, contact api.partnerships@goclio.com with your login email and we’ll set your account as a developer.

Create a Clio Application

  1. Login to your new Clio account at https://app.goclio.com/session/new
  2. Visit our developer portal at https://app.goclio.com/settings/developer_applications
  3. Click the Add button to create a new application. Enter details about your application here - these details will be shown to Clio users when they’re asked to authorize your application
  4. Make note of the key and the secret, as these will be used to authorize your application with Clio

Obtaining Authorization

Before your application can make a request, an access token must be granted via authorization from the Clio user. Clio’s API currently supports the authorization code grant type.

Grant Type: Authorization Code

  1. Your application needs to make a request asking for authorization by including the following parameters and values.

If you are building a desktop or mobile application, you may embed this request inside a WebView/WebBrowser control. As a desktop or mobile app does not have a webserver to redirect to, your app may use https://app.goclio.com/oauth/approval for your redirect_uri. This will place the code or error in both the URL and page title, which should be easily parsed out. Intercepting the request will vary from platform to platform. Here are some references to get you started:

Parameters:

response_type:    code
client_id:        application key from above
redirect_uri:     callback URL to redirect to after authorization
state (optional): Can be used by your application to maintain state between the request and the callback

Request:

GET /oauth/authorize?response_type=code&client_id=fzaXZvrLWZX747wQQRNuASeVCBxaXpJaPMDi7F96&redirect_uri=http%3A%2F%2Fyourapp.com%2Fcallback&state=xyz HTTP/1.1
Host: app.goclio.com

Grant Approved:

If the user grants your application access, Clio will redirect their browser to the callback url with an authorization code and any supplied state parameters. This code is only valid for 10 minutes.

If you are building a desktop or mobile application, you will need to intercept the redirect to https://app.goclio.com/oauth/approval inside your WebView/WebBrowser control and extract the code from the page’s title. The title string will look like Success code=5IzZeWL2OmZUxGOGO4WE.

Approved Redirect:

http://yourapp.com/callback?code=s9jGYmL8E00ZyuJP3AEO&state=xyz

Grant Declined:

If the user declines your application access, Clio will redirect their browser to the callback url with an error parameter value of “access_denied”.

If you are building a desktop or mobile application, you will need to intercept the redirect to https://app.goclio.com/oauth/approval inside your WebView/WebBrowser control and extract the error from the page’s title. The title string will look like Failure error=access_denied.

Declined Redirect:

http://yourapp.com/callback?error=access_denied&state=xyz
  1. Your application may now make a POST request for an access token to Clio’s token endpoint with the provided token. For Clio to verify the grant request, you must include your application’s key and secret as well as the redirect_uri from the code request. Parameters:

Parameters:

client_id:     application key from above
client_secret: application secret from above
grant_type:    "authorization_code""
code:          Authorization code from the redirect above
redirect_uri:  Redirect URI used in the authorization request above

Request:

POST /oauth/token HTTP/1.1
Host: app.goclio.com
Content-Type: application/x-www-form-urlencoded

client_id=fzaXZvrLWZX747wQQRNuASeVCBxaXpJaPMDi7F96&client_secret=xVp5wAX05g1oDjV5astg2KZIZ85NX31FKTPV876v&grant_type=authorization_code&code=s9jGYmL8E00ZyuJP3AEO&redirect_uri=http%3A%2F%2Fyourapp.com%2Fcallback

Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "token_type":"bearer",
  "access_token":"WjR8HLdo847Z8kdfUtewJpCvkRX4JYLCIF2dUUul"
}
  1. Your application should save this token for future requests to the API. You should include an Authorization header with a value of Bearer access_token.

Example Authorized Request:

GET /api/v2/users/who_am_i HTTP/1.1
Host: app.goclio.com
Authorization: Bearer WjR8HLdo847Z8kdfUtewJpCvkRX4JYLCIF2dUUul

Example Ruby code for obtaining authorization with the authorization code grant type:

require 'rubygems'
require 'oauth2'
client_key = 'Application key from https://app.goclio.com/'
client_secret = 'Application secret from https://app.goclio.com/'
client = OAuth2::Client.new(client_key, client_secret, :site => 'https://app.goclio.com/')

client.auth_code.authorize_url(:redirect_uri => 'http://yourapp.com/callback')
# Redirect user or paste in the browser
# => "https://app.goclio.com/oauth/authorize?response_type=code&client_id=client_key&redirect_uri=http://yourapp.com/callback"

# redirects to http://yourapp.com/callback?state=&code=secretcode
# Use the code param below to get a token

code = 'secretcode'
token = client.auth_code.get_token(code, :redirect_uri => 'http://yourapp.com/callback')
saved_token = token.token
# => "WjR8HLdo847Z8kdfUtewJpCvkRX4JYLCIF2dUUul"
# Save this value for future requests

Example Ruby request:

require 'rubygems'
require 'oauth2'

# Token saved from above
saved_token = "WjR8HLdo847Z8kdfUtewJpCvkRX4JYLCIF2dUUul"

client_key = 'Application key from https://app.goclio.com/'
client_secret = 'Application secret from https://app.goclio.com/'
client = OAuth2::Client.new(client_key, client_secret, :site => 'https://app.goclio.com/')

token = OAuth2::AccessToken.new(client, saved_token)

response = token.get('/api/v2/users/who_am_i')
response.class.name
# => OAuth2::Response
response.body
# => "{\"account\":{\"owner\":{\"url\":\"/api/v2/users/1\",\"name\":\"Demo User\",\"id\":1},\"created_at\":\"2011-07-13T03:17:52+00:00\",\"name\":\"Clio LLP Attorneys at Law\",\"updated_at\":\"2012-02-08T04:00:28+00:00\"},\"user\":{\"last_name\":\"User\",\"subscription_plan\":\"Attorney\",\"time_zone\":\"Hawaii\",\"enabled\":true,\"first_name\":\"Demo\",\"created_at\":\"2011-07-13T03:17:53+00:00\",\"email\":\"demo@goclio.com\",\"id\":1,\"updated_at\":\"2012-01-18T18:17:38+00:00\"}}"

Deauthorization

Deauthorization can happen in one of two ways: the user has revoked access to your application, or your application has requested to be deauthorized. When a user revokes access to your application, ALL access tokens will be revoked. If your application requests to be deauthorized, only the supplied access token will be revoked.

In both cases Clio will make a POST request to your application’s deauthorization callback URL (if present). The callback will include a JSON object containing the client_id, user_id and the access_token (set to “all” if user revoked).

Deauthorization Callback Request:

POST /deauthorization_callback HTTP/1.1
Host: yourapp.com
Content-Type: application/json

{
  "client_id": "fzaXZvrLWZX747wQQRNuASeVCBxaXpJaPMDi7F96",
  "user_id": 2332,
  "access_token": "all"
}

For your application to deauthorize itself, you need to make an authorized POST request to /oauth/deauthorize. Clio’s response should be a simple 200 status code.

Parameters:

token:         token to be revoked

Request:

POST /oauth/deauthorize HTTP/1.1
Host: app.goclio.com
Authorization: Bearer WjR8HLdo847Z8kdfUtewJpCvkRX4JYLCIF2dUUul

token=WjR8HLdo847Z8kdfUtewJpCvkRX4JYLCIF2dUUul

Response:

HTTP/1.1 200 OK

REST API

Resource Basics

Clio’s API will only return JSON. Every resource in Clio has a few of fields in common:

Common Fields:

id:                    (int, readonly) Unique resource identifier, will never change.
created_at:            (datetime, readonly) Created at date, will never change, represents when the resource was created.
updated_at:            (datetime, readonly) Last modified date, changes each time the resource gets updated.

Note: The exception to the rule is the Account Resource (through /api/v2/users/who_am_i) which has an id string.

List Actions

A list actions response will be a JSON hash with three attributes:

  • records: The total number of resources returned.
  • next_offset: The last ID in this result set, used to query for more records.
  • resource_name: An array named after the resource which all the results.

Example list JSON:

{
  "next_offset": 8,
  "records": 2,
  "activities": [
    {
      "type": "TimeEntry",
      "date": "2011-11-22",
      "note": "Quae aspernatur cupiditate consequatur.",
      "created_at": "2012-02-23T20:11:20+00:00",
      "user": {
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "id": 1
      },
      "activity_description": {
        "url": "/api/v2/activity_descriptions/6",
        "name": "Discovery",
        "id": 6
      },
      "updated_at": "2012-02-23T20:11:20+00:00",
      "quantity": 7.63,
      "price": 400.0,
      "id": 5,
      "total": 3052.0,
      "matter": {
        "url": "/api/v2/matters/7",
        "name": "00007-Zemlak-Roob",
        "id": 7
      }
    },
    {
      "type": "TimeEntry",
      "date": "2011-06-29",
      "note": "Perspiciatis consequatur veritatis voluptatibus fuga doloremque est quibusdam.",
      "created_at": "2012-02-23T20:11:20+00:00",
      "user": {
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "id": 1
      },
      "activity_description": {
        "url": "/api/v2/activity_descriptions/6",
        "name": "Discovery",
        "id": 6
      },
      "updated_at": "2012-02-23T20:11:20+00:00",
      "quantity": 2.69,
      "price": 300.0,
      "id": 8,
      "total": 807.0,
      "matter": {
        "url": "/api/v2/matters/10",
        "name": "00010-Kohler, Kessler and Abernathy",
        "id": 10
      }
    }
  ]
}

New and Updated Records

There are two parameters which can be used to return new or updated records since a checkpoint, which is useful for finding records that have recently changed.

  • Recently created records: “created_since”
  • Recently updated records: “updated_since”

Both parameters take a datetime in ISO 8601 format and are inclusive of the datetime.

Bulk Creates

Clio allows for resources to be created in bulk. The limit of resources per request is 250. When creating in bulk, normal error codes will not be returned - instead, the errors will be included inline.

To do a bulk create, you will POST an array of resources. An array of resources and errors will be returned back to you in the order you POSTed them.

Example request:

POST /api/v2/activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: text/javascript

{
  "activities": [
    {"type": "TimeEntry", "quantity": 2, "price": 600, "matter": {"id": 1}},
    {"type": "TimeEntry", "quantity": 2, "price": 400, "matter": {"id": 1}}
  ]
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "limit": 1000,
  "records": 2,
  "activities": [
    {
      "type": "TimeEntry",
      "date": null,
      "activity_description": null,
      "quantity": 1.0,
      "note": null,
      "price": 200.0,
      "matter": {
        "url": "/api/v2/matters/1",
        "name": "00001-Dicki, Hansen and Donnelly",
        "id": 1
      },
      "created_at": "2012-03-08T02:53:05+00:00",
      "user": {
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "id": 1
      },
      "updated_at": "2012-03-08T02:53:05+00:00",
      "id": 56,
      "total": 200.0
    },
    {
      "type": "TimeEntry",
      "date": null,
      "activity_description": null,
      "quantity": 2.0,
      "note": null,
      "price": 400.0,
      "matter": {
        "url": "/api/v2/matters/1",
        "name": "00001-Dicki, Hansen and Donnelly",
        "id": 1
      },
      "created_at": "2012-03-08T02:53:05+00:00",
      "user": {
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "id": 1
      },
      "updated_at": "2012-03-08T02:53:05+00:00",
      "id": 57,
      "total": 800.0
    }
  ],
  "next_offset": 57
}

Nested Attributes

Occasionally, you will see nested attributes in Clio’s API. Each nested attribute includes:

  • name: the display name
  • url: the location to get more information about the resource
  • id: unique identifier for the resource

The example matter below has one nested attributes, for the client:

{
  "matter": {
    "created_at": "2012-02-23T20:11:16+00:00",
    "closed_date": "2012-02-23",
    "location": null,
    "billable": true,
    "pending_date": null,
    "updated_at": "2012-02-23T20:11:16+00:00",
    "client_reference": null,
    "id": 1,
    "open_date": "2011-03-02",
    "client": {
      "name": "Dicki, Hansen and Donnelly",
      "url": "/api/v2/contacts/1",
      "id": 1
    },
    "responsible_attorney": null,
    "description": "Doloribus animi odit dolor quod veniam ea culpa.",
    "display_number": "00001-Dicki, Hansen and Donnelly",
    "status": "Closed"
  }
}

These are references to other resources with default display data, so you don’t need to query for them. These are references may be changed in two ways:

Nested:

Here we keep the client hash, and need to include the id attribute. The name and url will be ignored.

{
  "matter": {
    "closed_date": "2012-02-23",
    "location": null,
    "billable": true,
    "pending_date": null,
    "client_reference": null,
    "open_date": "2011-03-02",
    "client": {
      "id": 1
    },
    "responsible_attorney": null,
    "description": "Doloribus animi odit dolor quod veniam ea culpa.",
    "display_number": "00001-Dicki, Hansen and Donnelly",
    "status": "Closed"
  }
}

Flattened:

Change the client hash to an attribute named client_id.

{
  "matter": {
    "closed_date": "2012-02-23",
    "location": null,
    "billable": true,
    "pending_date": null,
    "client_reference": null,
    "open_date": "2011-03-02",
    "client_id": 1,
    "responsible_attorney": null,
    "description": "Doloribus animi odit dolor quod veniam ea culpa.",
    "display_number": "00001-Dicki, Hansen and Donnelly",
    "status": "Closed"
  }
}

Activities

Activities are used for both time and expenses entries. You can tell them apart via the type attribute. Time entries are used to keep track of time spent on tasks. The API requires that a quantity (for time entries) and rate (price) is set. You may get a list of common rates for the user through the Activity Descriptions resource. Note that Activity Descriptions are specific to the user and the matter. If using an Activity Description, you should set the activity_description_id field in the activity for reference. See the Activity Descriptions resource for more information.

Fields:

id:                    (int, readonly) Unique identifier
created_at:            (datetime, readonly) Date/time of record creation
updated_at:            (datetime, readonly) Date/time of last modification of record
type:                  (string, required) Type of activity, can be one of [TimeEntry, ExpenseEntry]
date:                  (date) Date the activity took place
quantity:              (integer, required on time entries) Only on time entries, this is the number of seconds.
price:                 (decimal(8,2), required) For time, this is the hourly rate. For expenses, this the unit price.
total:                 (string, readonly) Total amount. Should be (quantity / 3600) * price. Total is equal to the price for expense entries.
note:                  (string) Details about the activity
activity_description:  (hash)  Activity description which describes the type of work
user:                  (hash) User this activity belongs to
matter:                (hash) Matter this activity relates to
communication:         (hash, deprecated) Communication this activity relates to
billed:                (boolean, readonly) A Boolean value of whether an activity is billed; note that a billed activity cannot be modified nor destroyed
bill:                  (hash, readonly) Bill this activity appears on. Null if activity not billed to client
subject:               (hash) Subject of this activity. The subject may be one of the following types

Get All Activities

GET /api/v2/activities

Returns all the activities that match the given query. There are a number of ways to query Clio for activities using the query parameter:

  • All: (Default) Returns all activities that a user has permission to see
  • AssignedToMe: Returns all activities that have been assigned to the current user.
  • Matters: Returns all activities that belong to matters the user has access to.

Example request:

GET /api/v2/activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "activities": [
    {
      "id": 42,
      "type": "TimeEntry",
      "user": {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User"
      },
      "matter": {
        "id": 1,
        "url": "/api/v2/matters/1",
        "name": "00001-Schaefer and Sons"
      },
      "activity_description": {
        "id": 3,
        "url": "/api/v2/activity_descriptions/3",
        "name": "Meeting"
      },
      "communication": null,
      "date": "2013-04-18",
      "note": "Expedita rem amet sint.",
      "price": 500.0,
      "total": 3040.0,
      "billed": true,
      "created_at": "2014-07-22T17:39:14+00:00",
      "updated_at": "2014-07-22T17:39:14+00:00",
      "quantity": 21888,
      "bill": {
        "id": 1,
        "url": "/api/v2/bills/1",
        "name": "Invoice #9595"
      }
    },
    {
      "id": 100,
      "type": "TimeEntry",
      "user": {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User"
      },
      "matter": {
        "id": 6,
        "url": "/api/v2/matters/6",
        "name": "00006-Volkman and Sons"
      },
      "activity_description": {
        "id": 5,
        "url": "/api/v2/activity_descriptions/5",
        "name": "Flat Rate"
      },
      "communication": null,
      "date": "2013-06-09",
      "note": "Occaecati aliquam et soluta.",
      "price": 997.0,
      "total": 997.0,
      "billed": true,
      "created_at": "2014-07-22T17:39:20+00:00",
      "updated_at": "2014-07-22T17:39:20+00:00",
      "quantity": 3600,
      "bill": {
        "id": 7,
        "url": "/api/v2/bills/7",
        "name": "Invoice #9194"
      }
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • query – (string) How to query activities, either “All” (default), “AssignedToMe”, or “Matters”
  • type – (string) One of [TimeEntry, ExpenseEntry], returns only activities of that type
  • communication_id – (int, deprecated) Returns all activities belonging to the given communication id
  • matter_id – (int) Returns all activities belonging to the given matter id
  • offset – (int) Returns records with an id greater than the offset
  • from – (date) Returns records with date occurs greater than or equal to the specified date
  • to – (date) Returns records with date occurs less than or equal to the specified date
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • optional_fields – (string) Include data for associated objects. Currently supported: “subject”. A time entry’s subject is the Clio object that the user spends time working on. Subjects may be one of the following types: [Task, CalendarEntry, Note, DocumentVersion, Communication]
Status Codes:
  • 200 – OK, request successful

Get an Activity

GET /api/v2/activities/(int: activity_id)

Returns the activity for the given id.

Example request:

GET /api/v2/activities/11 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "activity": {
    "id": 42,
    "type": "TimeEntry",
    "user": {
      "id": 1,
      "url": "/api/v2/users/1",
      "name": "Demo User"
    },
    "matter": {
      "id": 1,
      "url": "/api/v2/matters/1",
      "name": "00001-Schaefer and Sons"
    },
    "activity_description": {
      "id": 3,
      "url": "/api/v2/activity_descriptions/3",
      "name": "Meeting"
    },
    "communication": null,
    "date": "2013-04-18",
    "note": "Expedita rem amet sint.",
    "price": 500.0,
    "total": 3040.0,
    "billed": true,
    "created_at": "2014-07-22T17:39:14+00:00",
    "updated_at": "2014-07-22T17:39:14+00:00",
    "quantity": 21888,
    "bill": {
      "id": 1,
      "url": "/api/v2/bills/1",
      "name": "Invoice #9595"
    }
  }
}
Parameters:
  • id (integer) – Activity id to look up
Query Parameters:
 
  • optional_fields – (string) Include data for associated objects. Currently supported: “subject”
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Create an Activity

POST /api/v2/activities

Creates an activity record. The activity must have a price, quantity and type set. Returns a json object for the newly created activity.

Example request with single activity:

POST /api/v2/activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "activity": {
    "price": 400,
    "quantity": 120,
    "matter_id": 1,
    "type": "TimeEntry"
  }
}

Example request with Task subject:

POST /api/v2/acivities?optional_fields=subject HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "activity": {
    "price": 400,
    "quantity": 120,
    "matter_id": 1,
    "type": "TimeEntry",
    "subject_type": "Task",
    "subject": {
      "name": "Ratione magni aut quidem exercitationem totam.",
      "assigner_id": 1
    }
  }
}

Example response with single activity:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "activity": {
    "id": 186,
    "type": "TimeEntry",
    "user": {
      "id": 1,
      "url": "/api/v2/users/1",
      "name": "Demo User"
    },
    "matter": {
      "id": 1,
      "url": "/api/v2/matters/1",
      "name": "00001-Strosin-Pollich"
    },
    "activity_description": null,
    "communication": null,
    "date": null,
    "note": null,
    "price": 400.0,
    "quantity": 120,
    "total": 13.33,
    "billed": false,
    "created_at": "2013-09-18T22:37:48+00:00",
    "updated_at": "2013-09-18T22:37:48+00:00"
  }
}

You may also send multiple activities, which will return a json array of the newly created activities in the same order. Any errors will be sent inline inside an errors json hash.

Example request with multiple activities:

POST /api/v2/activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "activities": [
    {
      "price": 200,
      "quantity": 3600,
      "matter_id": 1,
      "type": "TimeEntry"
    },
    {
      "price": 400,
      "quantity": 7200,
      "matter_id": 1,
      "type": "TimeEntry"
    }
  ]
}

Example response with multiple activities:

 HTTP/1.1 201 Created
 Vary: Accept
 Content-Type: text/javascript

{
  "activities": [
    {
      "id": 187,
      "type": "TimeEntry",
      "user": {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User"
      },
      "matter": {
        "id": 1,
        "url": "/api/v2/matters/1",
        "name": "00001-Strosin-Pollich"
      },
      "activity_description": null,
      "communication": null,
      "date": null,
      "note": null,
      "price": 200.0,
      "quantity": 3600,
      "total": 200.0,
      "billed": false,
      "created_at": "2013-09-18T22:38:57+00:00",
      "updated_at": "2013-09-18T22:38:57+00:00"
    },
    {
      "id": 188,
      "type": "TimeEntry",
      "user": {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User"
      },
      "matter": {
        "id": 1,
        "url": "/api/v2/matters/1",
        "name": "00001-Strosin-Pollich"
      },
      "activity_description": null,
      "communication": null,
      "date": null,
      "note": null,
      "price": 400.0,
      "quantity": 7200,
      "total": 800.0,
      "billed": false,
      "created_at": "2013-09-18T22:38:57+00:00",
      "updated_at": "2013-09-18T22:38:57+00:00"
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • optional_fields – (string) Associate the new time entry with its subject. Currently supported: “subject”. Subjects must have one of the following types: [Task, CalendarEntry, Note, DocumentVersion, Communication]
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update an Activity

PUT /api/v2/activities/(int: activity_id)

Updates an activity record. Do partial updates by only including the fields you want to change. Returns a json object for the updated activity.

The type of an activity cannot be changed.

Example request:

PUT /api/v2/activities/31 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "activity": {
    "quantity": 8280
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "activity": {
    "id": 42,
    "type": "TimeEntry",
    "user": {
      "id": 1,
      "url": "/api/v2/users/1",
      "name": "Demo User"
    },
    "matter": {
      "id": 1,
      "url": "/api/v2/matters/1",
      "name": "00001-Schaefer and Sons"
    },
    "activity_description": {
      "id": 3,
      "url": "/api/v2/activity_descriptions/3",
      "name": "Meeting"
    },
    "communication": null,
    "date": "2013-04-18",
    "note": "Expedita rem amet sint.",
    "price": 500.0,
    "total": 3040.0,
    "billed": true,
    "created_at": "2014-07-22T17:39:14+00:00",
    "updated_at": "2014-07-22T17:39:14+00:00",
    "quantity": 21888,
    "bill": {
      "id": 1,
      "url": "/api/v2/bills/1",
      "name": "Invoice #9595"
    }
  }
}
Parameters:
  • activity_id (integer) – Activity id to look up
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete an Activity

DELETE /api/v2/activities/(int: activity_id)

Deletes an activity record.

Example request:

DELETE /api/v2/activities/4 HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found

Activity Descriptions

An ActivityDesription is used to suggest a rate for a user for a commonly used activity. Activity Descriptions are defined by a name, describing the activity, a rate and which users or groups the activity can be used by. The rate can either inherit the users default rate, be a custom rate or a flat fee rate. A rate can be further overriden based on the user, the client or the matter. Passing in a matter_id parameter to this API will return the suggested rates for the users for the specific matter.

It is recommended that you review and understand the following support articles before integrating with this API end point. https://support.goclio.com/forums/139703-Activities-Time-Expenses-

Note about activity_rate_default:

  • If not set, then the users default rate should be used for hourly activities created with this activity description on hourly billed matters. Exception if there is a client or matter rate set for the user.
  • If set and the flat_rate value is false, then this rate should be used for hourly activities created with this activity description on hourly billed matters. Exception if there is a client or matter rate set for the user.
  • If set and the flat_rate value is true, then this rate should be used for flat rate activities created with this activity description on flat rate billed matters.

Note about rates: This field is a colleciton of activity rates for each user in the account. When matter_id param is provided, the rate will be based on a given matter and each user. This field is still in an experimental phase and subject to change.

Fields:

id:                     (int, readonly) Unique identifier
name:                   (string) Name of Activity Description
created_at:             (datetime, readonly) Date/time of record creation
updated_at:             (datetime, readonly) Date/time of last modification of record
activity_rate_default:  (hash) default Activity Rate set for this activity description
rates:                  (Array of hashes) Collection of activity rates for each user in the account
  rate:                 (decimal(8,2)) monitary value of this rate. Either hourly value or flat rate value
  user_id:              (int) user id of this activity rate
  source:               (string) source of activity rate, can be one of [activity_description, matter, client, user]
  flat_rate:            (boolean) boolean value of whether this activity rate is flat rate

Get All Activity Descriptions

GET /api/v2/activity_descriptions

Return all activity descriptions that the authorized user has permission to view. As activity description rates may be overriden per user, per client and per matter, it is important to query this API with a matter_id parameter set to get the correct per-matter rates.

It is also important to note that not all Activity Description rates may be visibile to all users and this API will only return Activity Description rates that the authorized user has access to see.

Example request:

GET /api/v2/activity_descriptions HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "activity_descriptions": [
    {
      "id": 1,
      "name": "Phone Call",
      "created_at": "2014-07-22T17:39:10+00:00",
      "updated_at": "2014-07-22T17:39:10+00:00",
      "activity_rate_default": {
        "id": 1,
        "created_at": "2014-07-22T17:39:10+00:00",
        "updated_at": "2014-07-22T17:39:10+00:00",
        "user": null,
        "group": {
          "id": 1,
          "url": "/api/v2/groups/1",
          "name": "Firm"
        },
        "rate": 200.0,
        "flat_rate": false
      },
      "rates": [
        {
          "user_id": 1,
          "rate": 200.0,
          "source": "activity_description",
          "flat_rate": false
        },
        {
          "user_id": 2,
          "rate": 200.0,
          "source": "activity_description",
          "flat_rate": false
        },
        {
          "user_id": 3,
          "rate": 200.0,
          "source": "activity_description",
          "flat_rate": false
        }
      ]
    },
    {
      "id": 2,
      "name": "Letter Writing",
      "created_at": "2014-07-22T17:39:10+00:00",
      "updated_at": "2014-07-22T17:39:10+00:00",
      "activity_rate_default": {
        "id": 2,
        "created_at": "2014-07-22T17:39:10+00:00",
        "updated_at": "2014-07-22T17:39:10+00:00",
        "user": null,
        "group": {
          "id": 1,
          "url": "/api/v2/groups/1",
          "name": "Firm"
        },
        "rate": 200.0,
        "flat_rate": false
      },
      "rates": [
        {
          "user_id": 1,
          "rate": 200.0,
          "source": "activity_description",
          "flat_rate": false
        },
        {
          "user_id": 2,
          "rate": 200.0,
          "source": "activity_description",
          "flat_rate": false
        },
        {
          "user_id": 3,
          "rate": 200.0,
          "source": "activity_description",
          "flat_rate": false
        }
      ]
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • matter_id – (int) Returns activity descriptions in the context of the given matter id
  • account_wide – (bool) Returns activity descriptions for all users in the account. This flag can be used only by an admin user
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
Status Codes:
  • 200 – OK, request successful

Bills

Bills for client and associated matters. Outstanding bills remain “Open” status until such time as full payment is received. You are able to get a list of bills for current user but not able to cretae or update a bill yet.

Fields:

id:                     (int, readonly) Unique identifier.
type:                   (string, readonly) "Bill" or "Interest".
original_bill_id:       (int, readonly) For the "Bill" type, it is null. For the "Interest" type, it is the ID of the bill that this interest bill belongs to.
created_at:             (datetime, readonly) Date/time of record creation.
updated_at:             (datetime, readonly) Date/time of last modification of record.
pdf_url:                (string, readonly) URL to a pdf of the bill. Note
number:                 (string) Bill number (not necessarily numeric).
subject:                (string) Bill subject.
currency:               (string) Currency of the bill.
purchase_order:         (string) Purchase order.
memo:                   (string) Bill memo.
start_at:               (datetime) Starting date/time used to generate the bill. After bill creation, the user may modify line items to be outside of this date.
end_at:                 (datetime) Ending date/time used to generate the bill. After bill creation, the user may modify line items to be outside of this date.
issued_at:              (datetime) Date/time the bill was issued.
due_at:                 (datetime) Date/time the bill is due.
tax_rate:               (decimal) Primary tax rate.
secondary_tax_rate:     (decimal) Secondary tax rate.
discount:               (decimal) Discount on the bill. How this discount is applied depends on the discount_type.
discount_type:          (string) Type of discount, one of [absolute, percent]. Absolute discounts are dollar amounts applied to the bill. Percent represents a percentage discount to the bill.
discount_note:          (string) The note associated with the discount, presented to the client.
balance:                (decimal) Balance outstanding on the bill.
balance_with_interest:  (decimal) Total balance outstanding on the bill and all of its interest bills.
total:                  (decimal) Total amount of bill (not including interest).
total_with_interest:    (decimal) Total amount of this bill and all of its interest bills.
status:                 (string, readonly) One of "Open", "Past Due", or "Paid". This field will be obsoleted in the next version of the API.
matters:                (array of hashes) Matters associated with the bill.
client:                 (hash) Client associated with the bill.
state:                  (string) State of the bill. One of "Draft", "Pending Approval", "Awaiting Payment", "Paid".

Get All Bills

GET /api/v2/bills

Return all bills belonging to the account.

Example request:

GET /api/v2/bills HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "bills": [
    {
      "id": 4,
      "pdf_url": "/api/v2/bills/4.pdf",
      "number": "7179",
      "subject": null,
      "currency": "USD",
      "purchase_order": null,
      "memo": null,
      "start_at": null,
      "end_at": null,
      "issued_at": "2014-07-06",
      "due_at": "2014-08-05",
      "type": "Bill",
      "original_bill_id": null,
      "tax_rate": 0.0,
      "secondary_tax_rate": 0.0,
      "discount": 0.0,
      "discount_type": null,
      "discount_note": null,
      "balance": 31368.0,
      "balance_with_interest": 31368.0,
      "total": 31368.0,
      "total_with_interest": 31368.0,
      "status": "Open",
      "state": "Draft",
      "matters": [
        {
          "id": 3,
          "url": "/api/v2/matters/3",
          "name": "00003-Lang, Goyette and McGlynn"
        }
      ],
      "client": {
        "id": 3,
        "url": "/api/v2/contacts/3",
        "name": "Lang, Goyette and McGlynn"
      },
      "created_at": "2014-07-22T17:39:17+00:00",
      "updated_at": "2014-07-22T17:39:18+00:00"
    },
    {
      "id": 5,
      "pdf_url": "/api/v2/bills/5.pdf",
      "number": "6444",
      "subject": null,
      "currency": "USD",
      "purchase_order": null,
      "memo": null,
      "start_at": null,
      "end_at": null,
      "issued_at": "2014-03-17",
      "due_at": "2014-04-16",
      "type": "Bill",
      "original_bill_id": null,
      "tax_rate": 0.0,
      "secondary_tax_rate": 0.0,
      "discount": 0.0,
      "discount_type": null,
      "discount_note": null,
      "balance": 30763.0,
      "balance_with_interest": 30763.0,
      "total": 30763.0,
      "total_with_interest": 30763.0,
      "status": "Past Due",
      "state": "Draft",
      "matters": [
        {
          "id": 3,
          "url": "/api/v2/matters/3",
          "name": "00003-Lang, Goyette and McGlynn"
        }
      ],
      "client": {
        "id": 3,
        "url": "/api/v2/contacts/3",
        "name": "Lang, Goyette and McGlynn"
      },
      "created_at": "2014-07-22T17:39:18+00:00",
      "updated_at": "2014-07-22T17:39:19+00:00"
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • client_id – (int) Returns bills for a given client
  • status – (string) Status of the bill, either “all” (default), “open”, “past_due”, “paid”. This field will be obsoleted in the next version of the API.
  • state – (string) Returns only those bills with the given state. One of “draft”, “awaiting_approval”, “awaiting_payment”, “paid”.
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful

Get a Bill

GET /api/v2/bills/(int: bill_id)

Returns the bill for the given id.

Example request:

GET /api/v2/bills/11 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "bills": [
    {
      "id": 4,
      "pdf_url": "/api/v2/bills/4.pdf",
      "number": "7179",
      "subject": null,
      "currency": "USD",
      "purchase_order": null,
      "memo": null,
      "start_at": null,
      "end_at": null,
      "issued_at": "2014-07-06",
      "due_at": "2014-08-05",
      "type": "Bill",
      "original_bill_id": null,
      "tax_rate": 0.0,
      "secondary_tax_rate": 0.0,
      "discount": 0.0,
      "discount_type": null,
      "discount_note": null,
      "balance": 31368.0,
      "balance_with_interest": 31368.0,
      "total": 31368.0,
      "total_with_interest": 31368.0,
      "status": "Open",
      "state": "Draft",
      "matters": [
        {
          "id": 3,
          "url": "/api/v2/matters/3",
          "name": "00003-Lang, Goyette and McGlynn"
        }
      ],
      "client": {
        "id": 3,
        "url": "/api/v2/contacts/3",
        "name": "Lang, Goyette and McGlynn"
      },
      "created_at": "2014-07-22T17:39:17+00:00",
      "updated_at": "2014-07-22T17:39:18+00:00"
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Bill id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Calendar Entries

You can get a list of calendar entries, create, update and destroy entries that you have permissions to. A calendar entry belongs to one calendar and you can add attendees on the calendar entry by using attending_calendars field. A calendar entry can be either all day event (which will have start_date, end_date filled in) or a timed event (start_date_time and end_date_time fields filled in). You need to provide either start_date_time and end_date_time or start_date and end_date at POST and PUT. You can set the appointment to repeat on a daily, weekly, monthly or yearly basis using RFC 2445 recurrence rule. Recurrence events could have exceptions; for example, a user moved a single meeting time in a weekly recurring meeting event. This case a new event is created and links back to its parent event by parent_calendar_entry_id field.

Fields:

id:                        (int, readonly) Unique identifier
created_at:                (datetime, readonly) Date/time of record creation
updated_at:                (datetime, readonly) Date/time of last modification of record
start_date_time:           (datetime) If a timed event, date and time of the start of the calendar entry. Must include either a start_date_time or start_date.
end_date_time:               (datetime) If a timed event, date and time of the end of the calendar entry. Must include either a end_date_time or end_date.
start_date:                (date) If an all day event, date of the start of the calendar entry. Must include either a start_date_time or start_date.
end_date:                    (date) If an all day event, date of the end of the calendar entry. Must include either a end_date_time or end_date.
summary:                   (string) Name of the calendar entry.
description:               (string) Description of the calendar entry.
location:                  (string) Location of the calendar entry.
matter:                    (hash) Matter this calendar entry relates to.
permission:                (string, readonly) Maximum permissions the authorized user has to the calendar entry.
calendar:                  (hash) Calendar this calendar entry belongs to.
attending_calendars:       (array of calendar hashes) List of calendars that are attendees on the calendar entry.
recurrence_rule:           (string) Recurrence rule of th calendar entry. Must be a valid RFC 2445 recurrence rule.
parent_calendar_entry_id:  (int) Parent calendar entry if this event is an exception to a recurrence rule.
original_event_start_at:   (date or datetime) Parent calendar entry recurrence start at that has been overridden.
reminders:                 (Array of hashes) Collection of reminders for a task
  minutes:                 (int, required) time in minutes when a reminder will appear prior to due date
  method:                  (string, required) a notification method for a reminder. Currently it only supports "Popup"
activities:                (array of hashes)  Collection of activities associated with the calendar entry. These will be of type TimeEntry.

Get All CalendarEntries

GET /api/v2/calendar_entries

Return all calendar_entries that the user has permission to view.

Example request:

GET /api/v2/calendar_entries HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "calendar_entries": [
    {
      "id": 2,
      "recurrence_rule": "FREQ=YEARLY;WKST=SU",
      "parent_calendar_entry_id": null,
      "created_at": "2014-07-22T17:39:06+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "calendar": {
        "id": 1,
        "url": "/api/v2/calendars/1",
        "name": "Firm"
      },
      "attending_calendars": [

      ],
      "start_date": "2014-11-20",
      "end_date": "2014-11-21",
      "original_event_start_date": null,
      "permission": "owner",
      "summary": "Quis unde officia sit exercitationem modi est.",
      "description": "Tempora voluptatum aut pariatur ipsam blanditiis accusantium ea. Esse doloremque et error. Est voluptates ipsam et deserunt quis praesentium fuga. Autem quibusdam sapiente nisi ea natus.",
      "location": null,
      "matter": {
        "id": 9,
        "url": "/api/v2/matters/9",
        "name": "00009-Schulist, Pagac and O'Reilly"
      },
      "reminders": [

      ]
    },
    {
      "id": 6,
      "recurrence_rule": "FREQ=WEEKLY;WKST=SU",
      "parent_calendar_entry_id": null,
      "created_at": "2014-07-22T17:39:06+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "calendar": {
        "id": 1,
        "url": "/api/v2/calendars/1",
        "name": "Firm"
      },
      "attending_calendars": [

      ],
      "start_date_time": "2014-10-10T02:00:00+00:00",
      "end_date_time": "2014-10-10T03:00:00+00:00",
      "original_event_start_date_time": null,
      "permission": "owner",
      "summary": "Voluptatem sint culpa est quia.",
      "description": "Deserunt voluptas nihil. Repellendus vel a quisquam harum. Officiis nostrum et vero.",
      "location": null,
      "matter": {
        "id": 4,
        "url": "/api/v2/matters/4",
        "name": "00004-Sanford LLC"
      },
      "reminders": [

      ]
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater than the offset
  • matter_id – (int) Limit the Calendar Entries to only those belonging to this matter
  • from – (date) Returns records that occur between from date and to date. Note that you need to provide both from and to params for this query or else an exception will be raised
  • to – (date) Returns records that occur between from date and to date. Note that you need to provide both from and to params for this query or else an exception will be raised. Note that a date range of from and to has a maximum of 93 days
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • optional_fields – (string) Include data for associated objects. Currently supported: “activities”
Status Codes:
  • 200 – OK, request successful
  • 404 – returned if the client is not found

Get a CalendarEntry

GET /api/v2/calendar_entries/(int: calendar_entry_id)

Returns the calendar_entry for the given id.

Example request:

GET /api/v2/calendar_entries/1 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "calendar_entries": [
    {
      "id": 2,
      "recurrence_rule": "FREQ=YEARLY;WKST=SU",
      "parent_calendar_entry_id": null,
      "created_at": "2014-07-22T17:39:06+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "calendar": {
        "id": 1,
        "url": "/api/v2/calendars/1",
        "name": "Firm"
      },
      "attending_calendars": [

      ],
      "start_date": "2014-11-20",
      "end_date": "2014-11-21",
      "original_event_start_date": null,
      "permission": "owner",
      "summary": "Quis unde officia sit exercitationem modi est.",
      "description": "Tempora voluptatum aut pariatur ipsam blanditiis accusantium ea. Esse doloremque et error. Est voluptates ipsam et deserunt quis praesentium fuga. Autem quibusdam sapiente nisi ea natus.",
      "location": null,
      "matter": {
        "id": 9,
        "url": "/api/v2/matters/9",
        "name": "00009-Schulist, Pagac and O'Reilly"
      },
      "reminders": [

      ]
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – CalendarEntry id to look up
Query Parameters:
 
  • optional_fields – (string) Include data for associated objects. Currently supported: “activities”
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Create a CalendarEntry

POST /api/v2/calendar_entries

Creates a calendar_entry record. Returns a json object for the newly created calendar entry.

Example request with single calendar entry:

POST /api/v2/calendar_entries HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "calendar_entry": {
    "summary": "Civil Litigation",
    "calendar": {
      "id": 2
    },
    "start_date_time": "2013-09-19T20:00:00Z",
    "end_date_time": "2013-09-19T21:00:00Z"
  }
}

Example request optional_fields:

POST /api/v2/calendar_entries?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "calendar_entry": {
    "summary": "Civil Litigation",
    "calendar": {
      "id": 2
    },
    "start_date_time": "2013-09-19T20:00:00Z",
    "end_date_time": "2013-09-19T21:00:00Z",
    "activities": [
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Saepe aut impedit soluta."
      }
    ]
  }
}

Example response with single calendar entry:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "calendar_entry": {
    "id": 137,
    "recurrence_rule": null,
    "parent_calendar_entry_id": null,
    "created_at": "2013-09-19T20:13:17+00:00",
    "updated_at": "2013-09-19T20:13:17+00:00",
    "calendar": {
      "id": 2,
      "url": "/api/v2/calendars/2",
      "name": "Demo User"
    },
    "attending_calendars": [

    ],
    "start_date_time": "2013-09-19T20:00:00+00:00",
    "end_date_time": "2013-09-19T21:00:00+00:00",
    "original_event_start_date_time": null,
    "permission": "owner",
    "summary": "Civil Litigation",
    "description": null,
    "location": null,
    "matter": null,
    "reminders": [

    ]
  }
}
Query Parameters:
 
  • optional_fields – (string) Create associated objects. Currently supported: “activities”. Activities must have type TimeEntry.
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Calendar Entry

PUT /api/v2/calendar_entries/(int: calendar_entry_id)

Updates a calendar entry record. Do partial updates by only including the fields you want to change. Returns a json object for the updated calendar entry.

Example request:

PUT /api/v2/calendar_entries/13 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "calendar_entry": {
    "name": "Corporate"
  }
}

Example request with optional fields (1 created, 1 updated):

PUT /api/v2/calendar_entries/4?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "calendar_entry": {
    "name": "Corporate",
    "activities": [
      {
        "type": "TimeEntry",
        "id": 1,
        "note": "Nam unde aut voluptas."
      },
      {
        "quantity": 1,
        "note": "Tempora ut et vero eos magni."
      }
    ]
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "calendar_entry": {
    "id": 137,
    "recurrence_rule": null,
    "parent_calendar_entry_id": null,
    "created_at": "2013-09-19T20:13:17+00:00",
    "updated_at": "2013-09-19T20:16:50+00:00",
    "calendar": {
      "id": 2,
      "url": "/api/v2/calendars/2",
      "name": "Demo User"
    },
    "attending_calendars": [

    ],
    "start_date_time": "2013-09-19T20:00:00+00:00",
    "end_date_time": "2013-09-19T21:00:00+00:00",
    "original_event_start_date_time": null,
    "permission": "owner",
    "summary": "Corporate",
    "description": null,
    "location": null,
    "matter": null,
    "reminders": [

    ]
  }
}
Parameters:
  • calendar_entry_id (integer) – Calendar Entry id to look up
Query Parameters:
 
  • optional_fields – (string) Update (or create) associated objects. Currently supported: “activities”. Activities must have type TimeEntry. Changes to the list of activities provided will be persisted. ie. existing activities not provided in the activities list will be deleted, activities that exist will be updated, and new activities will be created. Exclusion of this field will result in no change to the associated activities.
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Calendar Entry

DELETE /api/v2/calendar_entries/(int: calendar_entry_id)

Deletes a calendar entry record.

Example request:

DELETE /api/v2/calendar_entries/(int:calendar_entry_id) HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or permission denied

Calendars

Calendars that are visible to the current user. In firms with more than one user, calendar permissions allows you to authorize your calendar for viewing by others, and to select which calendar is visible at a given time. Please see permission field for more detail. This API endpoint is readonly and creating/updaitng calendars will come in later versions.

Fields:

id:          (int, readonly) Unique identifier
created_at:  (datetime, readonly) Date/time of record creation
updated_at:  (datetime, readonly) Date/time of last modification of record
name:        (string, required) Calendar Name
permission:  (string, readonly) Users permission to the calendar. One of "owner", "editor", "viewer", "limited_viewer" or null. Owner is able to read and write to the calendar as well as change calendar permissions for others. Editor is able to read and write to the calendar. Viewer is only able to read the calendar. Limited viewer is only able to see booked time on the calendar but not any event details. Null value means the user does not have permission to read or write the calendar, but can still invite this calendar to an event.

Get All Calendars

GET /api/v2/calendars

Return all calendars that the user has permission to view AND all calendars that may be calendar entry attendees.

Example request:

GET /api/v2/calendars HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "calendars": [
    {
      "id": 1,
      "name": "Firm",
      "type": "AccountCalendar",
      "created_at": "2014-07-22T17:38:58+00:00",
      "updated_at": "2014-07-22T17:39:09+00:00",
      "permission": "owner",
      "color": "#da6666"
    },
    {
      "id": 2,
      "name": "Demo User",
      "type": "UserCalendar",
      "created_at": "2014-07-22T17:38:59+00:00",
      "updated_at": "2014-07-22T17:39:09+00:00",
      "permission": "owner",
      "color": "#658cda"
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful
  • 404 – returned if the client is not found

Get a Calendar

GET /api/v2/calendars/(int: calendar_id)

Returns the calendar for the given id.

Example request:

GET /api/v2/calendars/1 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "calendars": [
    {
      "id": 1,
      "name": "Firm",
      "type": "AccountCalendar",
      "created_at": "2014-07-22T17:38:58+00:00",
      "updated_at": "2014-07-22T17:39:09+00:00",
      "permission": "owner",
      "color": "#da6666"
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Calendar id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Communications

Communications are used to record emails, phone calls and secure messages. This API endpoint is only used to record email and phone communications. The API for secure messaging is coming soon.

A communication has a date, subject, body, list of senders and a list of receivers. Senders and Receivers are can either be Users or Contacts. Before creating a communication or retrieving a list of communications for a person, you will have to first look up (or create) a Contact (or User) representing the person. The query paramater in the Contacts and Users APIs can be useful for finding a person by email or phone number.

Fields:

id:          (int, readonly) Unique identifier
type:        (string, required) Communication type, can be one of [EmailCommunication or PhoneCommunication]
created_at:  (datetime, readonly) Date/time of record creation
updated_at:  (datetime, readonly) Date/time of last modification of record
subject:     (string) Subject of the communication
body:        (text) Body of the communication
date:        (date) Date of the communication
matter:      (hash) Matter this communication relates to
senders:     (array of hashes) Polymorphic collection of senders. These will consist of Contacts and/or Users.
receivers:   (array of hashes) Polymorphic collection of receivers. These will either be Contacts or Users.
activities:  (array of hashes)  Collection of activities associated with the communication. These will be of type TimeEntry.

Get All Communications

GET /api/v2/communications

Returns all the communications (visible to the authorized user) that match the given query. A communication is visible to the user if the user is one of the senders or receivers, or the user has permission to the matter the communication is related to.

Example request:

GET /api/v2/communications HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "communications": [
    {
      "id": 1,
      "type": "EmailCommunication",
      "date": "2014-03-15",
      "subject": "Meeting proceedings",
      "body": "Est sunt voluptates atque magnam perspiciatis possimus. Nesciunt maiores suscipit aliquid esse. Veniam sequi autem qui laborum omnis ratione.",
      "matter": {
        "id": 10,
        "url": "/api/v2/matters/10",
        "name": "00010-Hirthe, Stanton and Walsh"
      },
      "senders": [
        {
          "id": 1,
          "url": "/api/v2/users/1",
          "name": "Demo User",
          "type": "User"
        }
      ],
      "receivers": [
        {
          "id": 2,
          "url": "/api/v2/contacts/2",
          "name": "Dare and Sons",
          "type": "Contact"
        },
        {
          "id": 7,
          "url": "/api/v2/contacts/7",
          "name": "Considine Group",
          "type": "Contact"
        }
      ],
      "created_at": "2014-07-22T17:39:13+00:00",
      "updated_at": "2014-07-22T17:39:13+00:00"
    },
    {
      "id": 2,
      "type": "EmailCommunication",
      "date": "2013-03-25",
      "subject": "Draft body of letter",
      "body": "Necessitatibus id distinctio error eos nihil. Dolorem ad aut qui aspernatur. Officiis praesentium minus aperiam. Voluptas et architecto.",
      "matter": {
        "id": 6,
        "url": "/api/v2/matters/6",
        "name": "00006-Volkman and Sons"
      },
      "senders": [
        {
          "id": 4,
          "url": "/api/v2/users/4",
          "name": "Antonette Douglas",
          "type": "User"
        }
      ],
      "receivers": [
        {
          "id": 1,
          "url": "/api/v2/contacts/1",
          "name": "Schaefer and Sons",
          "type": "Contact"
        },
        {
          "id": 16,
          "url": "/api/v2/contacts/16",
          "name": "Cara Feil",
          "type": "Contact"
        }
      ],
      "created_at": "2014-07-22T17:39:13+00:00",
      "updated_at": "2014-07-22T17:39:13+00:00"
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • type – (string) Returns communications by type, can be one of [EmailCommunication’, PhoneCommunication’]
  • contact_id – (int) Returns all communications where the given contact is either a sender or receiver.
  • user_id – (int) Returns all communications where the given user is either a sender or receiver.
  • matter_id – (int) Returns all communications relating to the given matter id
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • optional_fields – (string) Include data for associated objects. Currently supported: “activities”
Status Codes:
  • 200 – OK, request successful

Get a Communication

GET /api/v2/communications/(int: communication_id)

Returns the communication with the given communication_id, if it is visible to the authorized user. A communication is visible to the authorized user if the user is one of the senders or receivers, or the user has permission to the matter that the communication is related to.

Example request:

GET /api/v2/communications/1 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "communications": [
    {
      "id": 1,
      "type": "EmailCommunication",
      "date": "2014-03-15",
      "subject": "Meeting proceedings",
      "body": "Est sunt voluptates atque magnam perspiciatis possimus. Nesciunt maiores suscipit aliquid esse. Veniam sequi autem qui laborum omnis ratione.",
      "matter": {
        "id": 10,
        "url": "/api/v2/matters/10",
        "name": "00010-Hirthe, Stanton and Walsh"
      },
      "senders": [
        {
          "id": 1,
          "url": "/api/v2/users/1",
          "name": "Demo User",
          "type": "User"
        }
      ],
      "receivers": [
        {
          "id": 2,
          "url": "/api/v2/contacts/2",
          "name": "Dare and Sons",
          "type": "Contact"
        },
        {
          "id": 7,
          "url": "/api/v2/contacts/7",
          "name": "Considine Group",
          "type": "Contact"
        }
      ],
      "created_at": "2014-07-22T17:39:13+00:00",
      "updated_at": "2014-07-22T17:39:13+00:00"
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Communication id to look up
Query Parameters:
 
  • optional_fields – (string) Include data for associated objects. Currently supported: “activities”
Status Codes:
  • 200 – No error
  • 404 – Record not found or permission denied

Create a Communication

POST /api/v2/communications

Creates a communication record. The request must include the “type” field for the communication. Returns a json object for the newly creation communication record.

The senders and receivers collections can either be nested ({“id”: 1, “type”: “User”}) or flattened ({“user_id”: 1}).

Example request with single communication:

POST /api/v2/communications HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "communication": {
    "type": "EmailCommunication",
    "subject": "api",
    "body": "api test",
    "senders": [
      {
        "user_id": 1
      }
    ],
    "receivers": [
      {
        "contact_id": 2
      }
    ],
    "date": "2012-03-24"
  }
}

Example request optional_fields:

POST /api/v2/communications?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "communication": {
    "type": "EmailCommunication",
    "subject": "api",
    "body": "api test",
    "senders": [
      {
        "user_id": 1
      }
    ],
    "receivers": [
      {
        "contact_id": 2
      }
    ],
    "date": "2012-03-24",
    "activities": [
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Saepe aut impedit soluta."
      }
    ]
  }
}

Example response with single communication:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "communication": {
    "type": "EmailCommunication",
    "updated_at": "2012-04-18T21:32:52+00:00",
    "senders": [
      {
        "type": "User",
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "id": 1
      }
    ],
    "date": "2012-03-24",
    "matter": null,
    "receivers": [
      {
        "type": "Contact",
        "url": "/api/v2/contacts/2",
        "name": "McClure Group",
        "id": 2
      }
    ],
    "subject": "api",
    "id": 30,
    "created_at": "2012-04-18T21:32:52+00:00",
    "body": "api test"
  }
}
Query Parameters:
 
  • optional_fields – (string) Create associated objects. Currently supported: “activities”. Activities must have type TimeEntry.
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Communication

PUT /api/v2/communications/(int: communication_id)

Updates a communication record. Do partial updates by only including the fields you want to change. Returns a json object for the updated communication. If a senders or receivers collection is supplied, it will overwrite the old senders or receivers.

  • You may not update the type.
  • The senders and receivers collections can either be nested ({“id”: 1, “type”: “User”}) or flattened ({“user_id”: 1}).

Example request:

PUT /api/v2/communications/30 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "communication": {
    "body": "The Clio API is great!"
  }
}

Example request with optional fields (1 created, 1 updated):

PUT /api/v2/communications/4?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "communication": {
    "body": "The Clio API is great!",
    "activities": [
      {
        "id": 1,
        "note": "Nam unde aut voluptas."
      },
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Tempora ut et vero eos magni."
      }
    ]
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "communication": {
    "type": "EmailCommunication",
    "updated_at": "2012-04-18T21:42:08+00:00",
    "senders": [
      {
        "type": "User",
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "id": 1
      }
    ],
    "date": "2012-03-24",
    "matter": null,
    "receivers": [
      {
        "type": "Contact",
        "url": "/api/v2/contacts/2",
        "name": "McClure Group",
        "id": 2
      }
    ],
    "subject": "api",
    "id": 30,
    "created_at": "2012-04-18T21:32:52+00:00",
    "body": "The Clio API is great!"
  }
}
Parameters:
  • communication_id (integer) – Communication id to look up
Query Parameters:
 
  • optional_fields – (string) Update (or create) associated objects. Currently supported: “activities”. Activities must have type TimeEntry. Changes to the list of activities provided will be persisted. ie. existing activities not provided in the activities list will be deleted, activities that exist will be updated, and new activities will be created. Exclusion of this field will result in no change to the associated activities.
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Communication

DELETE /api/v2/communications/(int: communication_id)

Deletes a communication record.

Example request:

DELETE /api/v2/communications/3 HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or no permission to communication

Contacts

Fields:

id:                              (int, readonly) Unique identifier
type:                            (string, required) Contact type, can be one of [Company, Person]
created_at:                      (datetime, readonly) Date/time of record creation
updated_at:                      (datetime, readonly) Date/time of last modification of record
phone_numbers:                   (array of hashes) Collection of phone numbers. The first phone number listed is the default
  id:                            (int, readonly) Unique identifier
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  name:                          (string) Phone name (e.g. Work, Office, Home)
  number:                        (string) Phone number
  default_number:                (boolean) Default number flag (only can be set on one phone number)
email_addresses:                 (array of hashes) Collection of email addresses# field_def
  id:                            (int, readonly) Unique identifier
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  name:                          (string) Email name (e.g. Work, Office, Home)
  address:                       (string) Email address
addresses:                       (array of hashes) Collection of mailing addresses
  id:                            (int, readonly) Unique identifier
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  name:                          (string) Address name (e.g. Work, Office, Home)
  street:                        (string) Address street
  city:                          (string) Address city
  province:                      (string) Address province
  postal_code:                   (string) Address postal or zip code
  country:                       (string) Address country
web_sites:                       (array of hashes) Collection of web sites
  name:                          (string) web site name (e.g. Work, Office, Home)
  id:                            (int, readonly) Unique identifier
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  address:                       (string) web address
instant_messengers:              (array of hashes) Collection of instant messengers' addresses
  name:                          (string) instant messenger's name (e.g. Work, Office, Home)
  id:                            (int, readonly) Unique identifier
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  address:                       (string) Email address
[Company] name:                  (string, required) Company's name
[Person] prefix:                 (string) Person's prefix (e.g. Mr, Mrs, etc)
[Person] first_name:             (string, required) Person's given name
[Person] last_name:              (string, required) Person's surname
[Person] name:                   (string, readonly) Person's full display name
[Person] title:                  (string) Person's title
[Person] company:                (hash) Company the person belongs to.
custom_field_values:             (array of hashes) A polymorphic collect of custom field values set on this contact. You can get a list of custom fields from the custom fields and custom field sets end points.
  id:                            (int, readonly) Unique identifier. Note
  type:                          (string, required) Type of custom field value, one of [CustomFieldCheckboxValue, CustomFieldContactValue, CustomFieldCurrencyValue, CustomFieldDateValue, CustomFieldTimeValue, CustomFieldEmailValue, CustomFieldMatterValue, CustomFieldNumericValue, CustomFieldPicklistValue, CustomFieldTextAreaValue, CustomFieldTextLineValue, CustomFieldUrlValue].
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  custom_field:                  (hash, required) The custom field of the custom field value
  value:                         (depending on type) The data of the custom field value. The data must be valid based on the type. For CustomFieldContactValue this is the id of the Contact. For CustomFieldMatterValue this is the id of the Matter. For CustomFieldPicklistOptionValue this is the id of the picklist option.
  contact:                       (hash, readonly, only for CustomFieldContactValue) The contact of the custom field contact value
  matter:                        (hash, readonly, only for CustomFieldMatterValue) The matter of the custom field matter value
  custom_field_picklist_option:  (hash, readonly, only for CustomFieldPicklistValue) The option of the custom field picklist value
activity_rates:                  (array of hashes) A collection of firm-wide and/or attorney specific rates
  id:                           (int, readonly) Unique identifier
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  user:                          (hash) user of this rate assigned to
  group:                         (hash) group of this rate assigned to
  rate:                          (float, required) rate of this activity rate
  flat_rate:                     (boolean, readonly) whether this activity rate is a flat rate. Note that this will be always false for contact rate.

Get All Contacts

GET /api/v2/contacts

Return all contacts belonging to the account.

Example request:

GET /api/v2/contacts HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "contacts": [
    {
      "id": 1,
      "type": "Company",
      "created_at": "2014-07-22T17:39:01+00:00",
      "updated_at": "2014-07-22T17:39:02+00:00",
      "custom_field_values": [

      ],
      "name": "Schaefer and Sons",
      "phone_numbers": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "231.157.0997",
          "default_number": false
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "1-514-579-7676",
          "default_number": false
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "417.944.5189 x59072",
          "default_number": false
        }
      ],
      "email_addresses": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Other",
          "address": "schaeferandsons@bashirian.com"
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Other",
          "address": "schaeferandsons@weinat.name"
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "schaeferandsons@dibbert.info"
        }
      ],
      "addresses": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "4298 Taya Circle",
          "city": "East Johanview",
          "postal_code": "46740-2515",
          "province": "Rhode Island",
          "country": "United States"
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "9274 Jayne Glen",
          "city": "Langfurt",
          "postal_code": "47946",
          "province": "Virginia",
          "country": "United States"
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "2428 Christina Fall Apt. 307",
          "city": "North Francescoville",
          "postal_code": "57392",
          "province": "Nevada",
          "country": "United States"
        }
      ],
      "web_sites": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "bashirian.com"
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "cole.org"
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "mann.name"
        }
      ],
      "instant_messengers": [

      ],
      "activity_rates": [

      ]
    },
    {
      "id": 2,
      "type": "Company",
      "created_at": "2014-07-22T17:39:02+00:00",
      "updated_at": "2014-07-22T17:39:02+00:00",
      "custom_field_values": [

      ],
      "name": "Dare and Sons",
      "phone_numbers": [
        {
          "id": 4,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "1-574-435-7006",
          "default_number": false
        },
        {
          "id": 5,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "671-259-3497 x68805",
          "default_number": false
        },
        {
          "id": 6,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "(689)637-2387",
          "default_number": false
        }
      ],
      "email_addresses": [
        {
          "id": 4,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Other",
          "address": "dareandsons@steuber.biz"
        },
        {
          "id": 5,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Home",
          "address": "dareandsons@ebert.com"
        },
        {
          "id": 6,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Home",
          "address": "dareandsons@daresporer.info"
        }
      ],
      "addresses": [
        {
          "id": 4,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "692 Williamson Stravenue",
          "city": "Cartwrightburgh",
          "postal_code": "68857",
          "province": "South Dakota",
          "country": "United States"
        },
        {
          "id": 5,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "868 Yolanda Ports",
          "city": "Mylesport",
          "postal_code": "70499",
          "province": "New Mexico",
          "country": "United States"
        },
        {
          "id": 6,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "828 Watsica Squares Apt. 369",
          "city": "North Arielport",
          "postal_code": "74850-0233",
          "province": "Maryland",
          "country": "United States"
        }
      ],
      "web_sites": [
        {
          "id": 4,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "address": "steuber.biz"
        },
        {
          "id": 5,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "address": "swift.org"
        },
        {
          "id": 6,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "address": "jewe.net"
        }
      ],
      "instant_messengers": [

      ],
      "activity_rates": [

      ]
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • query – (string) Wildcard search for contacts matching the query string. Fields searched are name, first_name, last_name, title, phone_numbers, email_addresses and addresses.
  • type – (string) One of [Company, Person], returns only contacts of that type
  • first_name – (string) Wildcard search for person first_name matching first_name string. param[:type] should be present and set to ‘Person’.
  • last_name – (string) Wildcard search for person last_name matching last_name string. param[:type] should be present and set to ‘Person’.
  • name – (string) Wildcard search for company name matching name string. param[:type] should be present and set to ‘Company’.
  • company_id – (int) Returns employees that belong to the given company id
  • matters_status – (string) One of [All, Open, Closed, Pending, None], returns only contacts which are clients that have a least one matter of the given matter status. If “None” is specified then only contacts which are not clients of any matter are returned.
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful

Get a contact

GET /api/v2/contacts/(int: contact_id)

Returns the contact for the given id.

Example request:

GET /api/v2/contacts/11 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "contacts": [
    {
      "id": 1,
      "type": "Company",
      "created_at": "2014-07-22T17:39:01+00:00",
      "updated_at": "2014-07-22T17:39:02+00:00",
      "custom_field_values": [

      ],
      "name": "Schaefer and Sons",
      "phone_numbers": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "231.157.0997",
          "default_number": false
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "1-514-579-7676",
          "default_number": false
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "number": "417.944.5189 x59072",
          "default_number": false
        }
      ],
      "email_addresses": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Other",
          "address": "schaeferandsons@bashirian.com"
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Other",
          "address": "schaeferandsons@weinat.name"
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "schaeferandsons@dibbert.info"
        }
      ],
      "addresses": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "4298 Taya Circle",
          "city": "East Johanview",
          "postal_code": "46740-2515",
          "province": "Rhode Island",
          "country": "United States"
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "9274 Jayne Glen",
          "city": "Langfurt",
          "postal_code": "47946",
          "province": "Virginia",
          "country": "United States"
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:02+00:00",
          "updated_at": "2014-07-22T17:39:02+00:00",
          "name": "Work",
          "street": "2428 Christina Fall Apt. 307",
          "city": "North Francescoville",
          "postal_code": "57392",
          "province": "Nevada",
          "country": "United States"
        }
      ],
      "web_sites": [
        {
          "id": 1,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "bashirian.com"
        },
        {
          "id": 2,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "cole.org"
        },
        {
          "id": 3,
          "created_at": "2014-07-22T17:39:01+00:00",
          "updated_at": "2014-07-22T17:39:01+00:00",
          "name": "Work",
          "address": "mann.name"
        }
      ],
      "instant_messengers": [

      ],
      "activity_rates": [

      ]
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Contact id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Create a contact

POST /api/v2/contacts

Creates a contact. The contact must have a type [Person, Company] set. If Company, a name must be set. If Person, it must have a first_name and last_name set. Returns a json object for the newly created contact.

Example request with single contact:

POST /api/v2/contacts HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "contact": {
    "type": "Company",
    "name": "Company API Inc.",
    "phone_numbers": [
      {
        "name": "Work",
        "number": "872-913-0768"
      }
    ]
  }
}

Example response with single contact:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "contact": {
    "id": 84,
    "type": "Company",
    "created_at": "2013-09-19T21:34:41+00:00",
    "updated_at": "2013-09-19T21:34:41+00:00",
    "custom_field_values": [

    ],
    "name": "Company API Inc.",
    "phone_numbers": [
      {
        "id": 88,
        "created_at": "2013-09-19T21:34:41+00:00",
        "updated_at": "2013-09-19T21:34:41+00:00",
        "name": "Work",
        "number": "872-913-0768",
        "default_number": false
      }
    ],
    "email_addresses": [

    ],
    "addresses": [

    ],
    "web_sites": [

    ],
    "instant_messengers": [

    ],
    "activity_rates": [

    ]
  }
}
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Contact

POST /api/v2/contacts/(int: contact_id)

Updates a contact record. Do partial updates by only including the fields you want to change. The addresses, email addresses and phone number arrays are treated as atomic elements. If you update one of these arrays it will create, update and delete the items to match what is sent. Returns a json object for the updated contact.

Note: The type of a contact must not be changed.

Example request:

PUT /api/v2/contacts/31 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "contact": {
    "name": "Company API Inc. 2"
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "contact": {
    "id": 84,
    "type": "Company",
    "created_at": "2013-09-19T21:34:41+00:00",
    "updated_at": "2013-09-19T21:36:32+00:00",
    "custom_field_values": [

    ],
    "name": "Company API Inc. 2",
    "phone_numbers": [
      {
        "id": 88,
        "created_at": "2013-09-19T21:34:41+00:00",
        "updated_at": "2013-09-19T21:34:41+00:00",
        "name": "Work",
        "number": "872-913-0768",
        "default_number": false
      }
    ],
    "email_addresses": [

    ],
    "addresses": [

    ],
    "web_sites": [

    ],
    "instant_messengers": [

    ],
    "activity_rates": [

    ]
  }
}
Parameters:
  • contact_id (integer) – Contact id to look up
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Contact

DELETE /api/v2/contacts/(int: contact_id)

Deletes a contact record.

Example request:

DELETE /api/v2/contacts/(int:contact_id) HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 OK
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or permission denied

Custom Field Sets

Individual custom fields can also be combined to make Custom Field Sets. You can create these sets in our web app https://app.goclio.com/settings/custom_fields. Custom field sets belong to either matter or contact.

Fields:

id:           (int, readonly) Unique identifier
created_at:   (datetime, readonly) Date/time of record creation
updated_at:   (datetime, readonly) Date/time of last modification of record
name:         (string, required) Custom Field name
parent_type:  (string, required) Type of object the custom field set is for, either "Contact" or Matter"
displayed:    (boolean, required) If the custom field set is displayed by default or not
members:      (Array of hashes) Collection of custom fields belonging to this set

Get All Custom Field Sets

GET /api/v2/custom_field_sets

Return all custom field sets defined for this account

Example request:

GET /api/v2/custom_field_sets HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "custom_field_sets": [

  ],
  "records": 0,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • parent_type – (string, either “Contact” or “Matter”) Returns the records for the given parent_type
Status Codes:
  • 200 – OK, request successful
  • 404 – returned if the parent_type is set but is not “Contact” or “Matter”

Get a Custom Field Set

GET /api/v2/custom_field_sets/(int: custom_field_set_id)

Returns the custom field set for the given id.

Example request:

GET /api/v2/custom_field_sets/3 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "custom_field_sets": [

  ],
  "records": 0,
  "limit": 1000
}
Parameters:
  • id (integer) – Custom Field Set id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Custom Fields

Custom field is an area that you can set up in your matter, contact, and used for document automation and you determine the title and any information you want to store with given type. It is recommended to check our support site if you are not familiar with custom fields: https://support.goclio.com/forums/21338943-Custom-Fields

Fields:

id:                             (int, readonly) Unique identifier
created_at:                     (datetime, readonly) Date/time of record creation
updated_at:                     (datetime, readonly) Date/time of last modification of record
name:                           (string, required) Custom Field Set name
parent_type:                    (string, required) Type of object the custom field is for, either "Contact" or Matter"
field_type:                     (string, required) Field type of the custom field, one of ["checkbox", "contact", "currency", "date", "time", "email", "matter", "numeric", "picklist", "text_area", "text_line", "url"]
displayed:                      (boolean, required) If the custom field is displayed by default or not
custom_field_picklist_options:  (array of hashes) If the field_type is a "picklist" this field is populated with a collection of options, otherwise nil.
  id:                           (int, readonly) Unique identifier
  created_at:                   (datetime, readonly) Date/time of record creation
  updated_at:                   (datetime, readonly) Date/time of last modification of record
  deleted_at:                   (datetime, readonly) Date/time of record was removed. This option should no longer be shown but may still exist as a custom field value.
  name:                         (string) Name of option

Get All Custom Fields

GET /api/v2/custom_fields

Return all custom fields defined for this account

Example request:

GET /api/v2/custom_fields HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "custom_fields": [
    {
      "account_id": 1,
      "created_at": "2014/07/24 15:56:27 +0000",
      "deleted_at": null,
      "displayed": false,
      "field_type": 3,
      "id": 1,
      "name": "BirthDate",
      "parent_type": 1,
      "updated_at": "2014/07/24 15:56:27 +0000"
    }
  ],
  "records": 1,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • parent_type – (string, either “Contact” or “Matter”) Returns the records for the given parent_type
Status Codes:
  • 200 – OK, request successful
  • 404 – returned if the parent_type is set but is not “Contact” or “Matter”

Get a Custom Field

GET /api/v2/custom_fields/(int: custom_field_id)

Returns the custom field for the given id.

Example request:

GET /api/v2/custom_fields/3 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "custom_fields": [
    {
      "account_id": 1,
      "created_at": "2014/07/24 15:56:27 +0000",
      "deleted_at": null,
      "displayed": false,
      "field_type": 3,
      "id": 1,
      "name": "BirthDate",
      "parent_type": 1,
      "updated_at": "2014/07/24 15:56:27 +0000"
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Custom Field id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Document Categories

Document Categories help Clio users sort and filter their documents.

Fields:

id:          (int, readonly) Unique identifier
name:        (string) The name of the document category
created_at:  (datetime, readonly) Date/time of record creation
updated_at:  (datetime, readonly) Date/time of last modification of record

Get All Document Categories

GET /api/v2/document_categories

Return all document categories that the user has permission to view.

Example request:

GET /api/v2/document_categories HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "document_categories": [
    {
      "id": 1,
      "name": "Agreements",
      "created_at": "2014-07-22T17:38:58+00:00",
      "updated_at": "2014-07-22T17:38:58+00:00"
    },
    {
      "id": 2,
      "name": "Answers",
      "created_at": "2014-07-22T17:38:58+00:00",
      "updated_at": "2014-07-22T17:38:58+00:00"
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful

Document Versions

Clio document_versions. It is a list of Clio document_versions for a specific document.

Fields:

id:                (int, readonly) Unique identifier
version:           (int, readonly) version number of this document_version within its document
created_at:        (datetime, readonly) Date/time of record creation
updated_at:        (datetime, readonly) Date/time of last modification of record
size:              (int, readonly) size of this document version in byte
content_type:      (string, readonly) content type of this document_version
source_url:        (string, readonly) Clio url of this document_version
last_modified_at:  (date) Date/time of last modification of this document_version
filename:          (string) filename of this document_version in UTC
activities:        (array of hashes)  Collection of activities associated with the document version. These will be of type TimeEntry.

Get a DocumentVersion

GET /api/v2/documents/:document_id/document_version/:id/download

When If-Modified-Since request header is provided, it will check with the last updated_at of its document’s version and returns 304 if not modified.

Returns the document for the given document_id and version id.

Example request:

GET /api/v2/documents/3/document_version/1/download HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 303 See Other
Location: https://s3.amazonaws.com/development.documents.goclio.com/document_versions/31/Railsconf%20Notes%20%281%29.pdf?response-content-disposition=attachment%3B%20filename%3D%22Railsconf%20Notes%20%281%29.pdf%22&Signature=KCAOpll%2BJmtN0m8c3AznRzdsIu0%3D&Expires=1370489579&AWSAccessKeyId=AKIAJTSRXGCTDENSHSSA"
Content-Type: application/json; charset=utf-8
Parameters:
  • document_id (integer) – Document id
  • id (integer) – Document version id to look up
Status Codes:
  • 303 – Redirect to actual document URL, follow the Location header
  • 304 – Not Modified
  • 404 – record not found

Create a DocumentVersion

POST /api/v2/documents/(int: document_id)/document_versions/

Creates a document_version. The maximum size for filedata is 100 Mbytes. If last_modified_at is not passed it will default to the current date.

Example request for creating a document_version:

POST /api/v2/documents/31/document_versions HTTP/1.1
Host: app.goclio.com
Content-Type: multipart/form-data

curl https://app.goclio.com/api/v2/documents/31/document_versions \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ACCESS_TOKEN" \
     -F "document_version[last_modified_at]=2013-12-03T23:35:32+00:00" \
     -F "document_version[uploaded_data]=@test.txt"

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "document_version": {
    "id": 3,
    "filename": "test.txt",
    "version": 1,
    "created_at": "2014-07-22T17:39:05+00:00",
    "updated_at": "2014-07-22T17:39:05+00:00",
    "size": 39,
    "content_type": "text/plain",
    "last_modified_at": "2014-07-21T17:39:05+00:00",
    "source_url": "/api/v2/documents/3/document_versions/3/download"
  }
}
Query Parameters:
 
  • optional_fields – (string) Create associated objects. Currently supported: “activities”. Activities must have type TimeEntry.
Status Codes:
  • 201 – Resource Created
  • 400 – Bad Request, could not create the resource, check the response body for error messages

Update a DocumentVersion

PUT /api/v2/documents/(int: document_id)/document_versions/(int: document_version_id)

Updates a document_version. The maximum size for filedata is 100 Mbytes. If last_modified_at is not passed it will default to the current date.

Example request for updating a document_version

PUT /api/v2/documents/31/document_versions/76 HTTP/1.1
Host: app.goclio.com
Content-Type: multipart/form-data

curl https://app.goclio.com/api/v2/documents/31/document_versions/76 \
     -X PUT \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ACCESS_TOKEN" \
     -F "document_version[last_modified_at]=2013-12-03T23:35:32+00:00" \
     -F "document_version[uploaded_data]=@test.txt"

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "document_version": {
    "id": 3,
    "filename": "test.txt",
    "version": 1,
    "created_at": "2014-07-22T17:39:05+00:00",
    "updated_at": "2014-07-22T17:39:05+00:00",
    "size": 39,
    "content_type": "text/plain",
    "last_modified_at": "2014-07-21T17:39:05+00:00",
    "source_url": "/api/v2/documents/3/document_versions/3/download"
  }
}
Query Parameters:
 
  • optional_fields – (string) Update (or create) associated objects. Currently supported: “activities”. Activities must have type TimeEntry. Changes to the list of activities provided will be persisted. ie. existing activities not provided in the activities list will be deleted, activities that exist will be updated, and new activities will be created. Exclusion of this field will result in no change to the associated activities.
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a DocumentVersion

DELETE /api/v2/documents/(int: document_id)/document_versions/(int: document_version_id)

Deletes a document_version record.

Example request:

DELETE /api/v2/documents/31/document_versions/76 HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 OK
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or permission denied

Documents

Documents in Clio are not just files, but a set of meta data associated with a file. Meta data can include a matter, a description about the document, a document category and last modified date. Because this end point is working with files it follows a slightly different pattern compared to the rest of the API. When uploading new documents or document versions one must use a multi-part HTTP request with the meta data set as urlencoded form data instead of JSON.

Please note that these do not include documents from external documents sources like Dropbox, Box, Netdocuments and Google Drive.

Fields:

id:                  (int, readonly) Unique identifier
created_at:          (datetime, readonly) Date/time of record creation
updated_at:          (datetime, readonly) Date/time of last modification of record
description:         (string, readonly) a description of the document
matter:              (hash, readonly) a matter that this document belongs to
user:                (hash, readonly) a user of this document
category:            (string, readonly, deprecated) a name of the document category
document_category:   (hash, readonly) the category of this document
content_type:        (string, readonly) content type of this document
filename:            (string, readonly) filename of this document
size:                (int, readonly) size of this document in byte
last_modified_at:    (datetime, readonly) Date/time of last modification of this document
document_versions:   (array of hashes) A collection of document_versions for this document
  id:                (int, readonly) Unique identifier
  version:           (int, readonly) version number of this document_version within its document
  created_at:        (datetime, readonly) Date/time of record creation
  updated_at:        (datetime, readonly) Date/time of last modification of record
  size:              (int, readonly) size of this document version in byte
  content_type:      (string, readonly) content type of this document_version
  last_modified_at:  (date) Date/time of last modification of this document_version in UTC
  source_url:        (string) Clio url of this document_version
  filename:          (string) filename of this document_version

Get All Documents

GET /api/v2/documents

Return all documents that the authenticated user has permission to view (note that this does not include documents from external documents services: i.e Dropbox, NetDocuments, and Google Drive).

Example request:

GET /api/v2/documents HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "documents": [
    {
      "id": 3,
      "created_at": "2014-07-22T17:39:05+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "description": "Voluptas nobis odio sit voluptas.",
      "matter": {
        "id": 2,
        "url": "/api/v2/matters/2",
        "name": "00002-Dare and Sons"
      },
      "user": {
        "id": 3,
        "url": "/api/v2/users/3",
        "name": "Fraser Newton"
      },
      "document_versions": [
        {
          "id": 3,
          "filename": "test.txt",
          "version": 1,
          "created_at": "2014-07-22T17:39:05+00:00",
          "updated_at": "2014-07-22T17:39:05+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:05+00:00",
          "source_url": "/api/v2/documents/3/document_versions/3/download"
        },
        {
          "id": 11,
          "filename": "test.txt",
          "version": 2,
          "created_at": "2014-07-22T17:39:05+00:00",
          "updated_at": "2014-07-22T17:39:05+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:05+00:00",
          "source_url": "/api/v2/documents/3/document_versions/11/download"
        },
        {
          "id": 14,
          "filename": "test.txt",
          "version": 3,
          "created_at": "2014-07-22T17:39:05+00:00",
          "updated_at": "2014-07-22T17:39:05+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:05+00:00",
          "source_url": "/api/v2/documents/3/document_versions/14/download"
        },
        {
          "id": 17,
          "filename": "test.txt",
          "version": 4,
          "created_at": "2014-07-22T17:39:06+00:00",
          "updated_at": "2014-07-22T17:39:06+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:06+00:00",
          "source_url": "/api/v2/documents/3/document_versions/17/download"
        },
        {
          "id": 22,
          "filename": "test.txt",
          "version": 5,
          "created_at": "2014-07-22T17:39:06+00:00",
          "updated_at": "2014-07-22T17:39:06+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:06+00:00",
          "source_url": "/api/v2/documents/3/document_versions/22/download"
        }
      ],
      "category": "Rules",
      "document_category": {
        "id": 21,
        "url": "/api/v2/document_categories/21",
        "name": "Rules"
      },
      "source_url": "/api/v2/documents/3/download",
      "content_type": "text/plain",
      "filename": "test.txt",
      "size": 39,
      "last_modified_at": "2014-07-21T17:39:06+00:00"
    },
    {
      "id": 6,
      "created_at": "2014-07-22T17:39:05+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "description": "Dolores soluta tempore vero nobis pariatur doloribus.",
      "matter": {
        "id": 3,
        "url": "/api/v2/matters/3",
        "name": "00003-Lang, Goyette and McGlynn"
      },
      "user": {
        "id": 3,
        "url": "/api/v2/users/3",
        "name": "Fraser Newton"
      },
      "document_versions": [
        {
          "id": 6,
          "filename": "test.txt",
          "version": 1,
          "created_at": "2014-07-22T17:39:05+00:00",
          "updated_at": "2014-07-22T17:39:05+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:05+00:00",
          "source_url": "/api/v2/documents/6/document_versions/6/download"
        },
        {
          "id": 15,
          "filename": "test.txt",
          "version": 2,
          "created_at": "2014-07-22T17:39:05+00:00",
          "updated_at": "2014-07-22T17:39:05+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:05+00:00",
          "source_url": "/api/v2/documents/6/document_versions/15/download"
        },
        {
          "id": 28,
          "filename": "test.txt",
          "version": 3,
          "created_at": "2014-07-22T17:39:06+00:00",
          "updated_at": "2014-07-22T17:39:06+00:00",
          "size": 39,
          "content_type": "text/plain",
          "last_modified_at": "2014-07-21T17:39:06+00:00",
          "source_url": "/api/v2/documents/6/document_versions/28/download"
        }
      ],
      "category": "Briefs",
      "document_category": {
        "id": 3,
        "url": "/api/v2/document_categories/3",
        "name": "Briefs"
      },
      "source_url": "/api/v2/documents/6/download",
      "content_type": "text/plain",
      "filename": "test.txt",
      "size": 39,
      "last_modified_at": "2014-07-21T17:39:06+00:00"
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • matter_id – (int) Returns documents in the context of the given matter id.
  • category_name – (string) Returns documents in the context of the given category_name.
Status Codes:
  • 200 – OK, request successful

Get a Document

GET /api/v2/documents/(int: document_id)

Returns the document for the given id.

Example request:

GET /api/v2/documents/1 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "document": {
    "id": 3,
    "created_at": "2014-07-22T17:39:05+00:00",
    "updated_at": "2014-07-22T17:39:06+00:00",
    "description": "Voluptas nobis odio sit voluptas.",
    "matter": {
      "id": 2,
      "url": "/api/v2/matters/2",
      "name": "00002-Dare and Sons"
    },
    "user": {
      "id": 3,
      "url": "/api/v2/users/3",
      "name": "Fraser Newton"
    },
    "document_versions": [
      {
        "id": 3,
        "filename": "test.txt",
        "version": 1,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/3/download"
      },
      {
        "id": 11,
        "filename": "test.txt",
        "version": 2,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/11/download"
      },
      {
        "id": 14,
        "filename": "test.txt",
        "version": 3,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/14/download"
      },
      {
        "id": 17,
        "filename": "test.txt",
        "version": 4,
        "created_at": "2014-07-22T17:39:06+00:00",
        "updated_at": "2014-07-22T17:39:06+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:06+00:00",
        "source_url": "/api/v2/documents/3/document_versions/17/download"
      },
      {
        "id": 22,
        "filename": "test.txt",
        "version": 5,
        "created_at": "2014-07-22T17:39:06+00:00",
        "updated_at": "2014-07-22T17:39:06+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:06+00:00",
        "source_url": "/api/v2/documents/3/document_versions/22/download"
      }
    ],
    "category": "Rules",
    "document_category": {
      "id": 21,
      "url": "/api/v2/document_categories/21",
      "name": "Rules"
    },
    "source_url": "/api/v2/documents/3/download",
    "content_type": "text/plain",
    "filename": "test.txt",
    "size": 39,
    "last_modified_at": "2014-07-21T17:39:06+00:00"
  }
}
Parameters:
  • id (integer) – Document id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Get a Document

GET /api/v2/documents/(int: document_id)/download

When If-Modified-Since request header is provided, it will check with the last updated_at of its document’s latest version and returns 304 if not modified.

Returns the latest document_version of the document with the given document_id.

Example request:

GET /api/v2/documents/3/download HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 303 See Other
Location: https://s3.amazonaws.com/development.documents.goclio.com/document_versions/31/Railsconf%20Notes%20%281%29.pdf?response-content-disposition=attachment%3B%20filename%3D%22Railsconf%20Notes%20%281%29.pdf%22&Signature=KCAOpll%2BJmtN0m8c3AznRzdsIu0%3D&Expires=1370489579&AWSAccessKeyId=AKIAJTSRXGCTDENSHSSA"
Content-Type: application/json; charset=utf-8
Parameters:
  • id (integer) – Document id to look up
Status Codes:
  • 303 – Redirect to actual document URL, follow the Location header
  • 304 – Not Modified
  • 404 – record not found

Create a Document and DocumentVersion

POST /api/v2/documents

Creates a document. When creating a document, it is required to pass the parameters for a document_version as well. Note that the maximum size for filedata is 100 Mbytes. If last_modified_at is not passed it will default to the current date.

Example Request:

 POST /api/v2/documents HTTP/1.1
 Host: app.goclio.com
 Content-Type: multipart/form-data

curl https://app.goclio.com/api/v2/documents \
     -H "Content-Type: multipart/form-data" \
     -H "Authorization: Bearer ACCESS_TOKEN" \
     -F "document[description]=meeting notes" \
     -F "document[matter_id]=123" \
     -F "document[document_category_name]=Offers" \
     -F "document_version[last_modified_at]=2013-12-03T23:35:32+00:00" \
     -F "document_version[uploaded_data]=@test.txt"

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "document": {
    "id": 3,
    "created_at": "2014-07-22T17:39:05+00:00",
    "updated_at": "2014-07-22T17:39:06+00:00",
    "description": "Voluptas nobis odio sit voluptas.",
    "matter": {
      "id": 2,
      "url": "/api/v2/matters/2",
      "name": "00002-Dare and Sons"
    },
    "user": {
      "id": 3,
      "url": "/api/v2/users/3",
      "name": "Fraser Newton"
    },
    "document_versions": [
      {
        "id": 3,
        "filename": "test.txt",
        "version": 1,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/3/download"
      },
      {
        "id": 11,
        "filename": "test.txt",
        "version": 2,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/11/download"
      },
      {
        "id": 14,
        "filename": "test.txt",
        "version": 3,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/14/download"
      },
      {
        "id": 17,
        "filename": "test.txt",
        "version": 4,
        "created_at": "2014-07-22T17:39:06+00:00",
        "updated_at": "2014-07-22T17:39:06+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:06+00:00",
        "source_url": "/api/v2/documents/3/document_versions/17/download"
      },
      {
        "id": 22,
        "filename": "test.txt",
        "version": 5,
        "created_at": "2014-07-22T17:39:06+00:00",
        "updated_at": "2014-07-22T17:39:06+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:06+00:00",
        "source_url": "/api/v2/documents/3/document_versions/22/download"
      }
    ],
    "category": "Rules",
    "document_category": {
      "id": 21,
      "url": "/api/v2/document_categories/21",
      "name": "Rules"
    },
    "source_url": "/api/v2/documents/3/download",
    "content_type": "text/plain",
    "filename": "test.txt",
    "size": 39,
    "last_modified_at": "2014-07-21T17:39:06+00:00"
  }
}
Status Codes:
  • 201 – Resource Created
  • 400 – Bad Request, could not create the resource, check the response body for error messages

Update a Document’s meta data

PUT /api/v2/documents/(int: document_id)

Update a document. Note that this can only update document description, matter_id, and document_category_name. To change a document_version within a document please refer to the Document Versions API.

Example request

PUT /api/v2/documents/31 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "document": {
    "description": "meeting notes",
    "matter_id": "211",
    "document_category_name": "Offers"
  }
}

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "document": {
    "id": 3,
    "created_at": "2014-07-22T17:39:05+00:00",
    "updated_at": "2014-07-22T17:39:06+00:00",
    "description": "Voluptas nobis odio sit voluptas.",
    "matter": {
      "id": 2,
      "url": "/api/v2/matters/2",
      "name": "00002-Dare and Sons"
    },
    "user": {
      "id": 3,
      "url": "/api/v2/users/3",
      "name": "Fraser Newton"
    },
    "document_versions": [
      {
        "id": 3,
        "filename": "test.txt",
        "version": 1,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/3/download"
      },
      {
        "id": 11,
        "filename": "test.txt",
        "version": 2,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/11/download"
      },
      {
        "id": 14,
        "filename": "test.txt",
        "version": 3,
        "created_at": "2014-07-22T17:39:05+00:00",
        "updated_at": "2014-07-22T17:39:05+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:05+00:00",
        "source_url": "/api/v2/documents/3/document_versions/14/download"
      },
      {
        "id": 17,
        "filename": "test.txt",
        "version": 4,
        "created_at": "2014-07-22T17:39:06+00:00",
        "updated_at": "2014-07-22T17:39:06+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:06+00:00",
        "source_url": "/api/v2/documents/3/document_versions/17/download"
      },
      {
        "id": 22,
        "filename": "test.txt",
        "version": 5,
        "created_at": "2014-07-22T17:39:06+00:00",
        "updated_at": "2014-07-22T17:39:06+00:00",
        "size": 39,
        "content_type": "text/plain",
        "last_modified_at": "2014-07-21T17:39:06+00:00",
        "source_url": "/api/v2/documents/3/document_versions/22/download"
      }
    ],
    "category": "Rules",
    "document_category": {
      "id": 21,
      "url": "/api/v2/document_categories/21",
      "name": "Rules"
    },
    "source_url": "/api/v2/documents/3/download",
    "content_type": "text/plain",
    "filename": "test.txt",
    "size": 39,
    "last_modified_at": "2014-07-21T17:39:06+00:00"
  }
}
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a document

DELETE /api/v2/documents/(int: document_id)

Deletes a document record.

Example request:

DELETE /api/v2/document(int:document_id) HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 OK
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or permission denied

Groups

Adding, updating and removing groups is only accessible to users with the Administrator role. Non-Administrator user can only see groups that the user belongs to.

Fields:

id:          (int, readonly) Unique identifier
created_at:  (datetime, readonly) Created at date
updated_at:  (datetime, readonly) Last modified date
name:        (string) Name of the group
users:       (array of hashes, required) List of users belonging to this group

Get All Groups

GET /api/v2/groups

Returns all the groups that match the given query.

Example request:

GET /api/v2/groups HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "groups": [
    {
      "id": 1,
      "name": "Everyone",
      "users": [
        {
          "id": 1,
          "url": "/api/v2/users/1",
          "name": "Demo User",
          "type": "User"
        },
        {
          "id": 2,
          "url": "/api/v2/users/2",
          "name": "Jack Ryan",
          "type": "User"
        },
        {
          "id": 3,
          "url": "/api/v2/users/3",
          "name": "Fraser Newton",
          "type": "User"
        }
      ],
      "created_at": "2014-07-22T17:38:57+00:00",
      "updated_at": "2014-07-22T17:38:57+00:00"
    }
  ],
  "records": 1,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater then the offset
  • limit – (int, default 1000) Number of records to return
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful
  • 403 – Forbidden, if the requesting user does not have the Administrator role

Get a Group

GET /api/v2/groups/(int: group_id)

Returns the group for the given group_id.

Example request:

GET /api/v2/groups/4 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "groups": [
    {
      "id": 1,
      "name": "Everyone",
      "users": [
        {
          "id": 1,
          "url": "/api/v2/users/1",
          "name": "Demo User",
          "type": "User"
        },
        {
          "id": 2,
          "url": "/api/v2/users/2",
          "name": "Jack Ryan",
          "type": "User"
        },
        {
          "id": 3,
          "url": "/api/v2/users/3",
          "name": "Fraser Newton",
          "type": "User"
        }
      ],
      "created_at": "2014-07-22T17:38:57+00:00",
      "updated_at": "2014-07-22T17:38:57+00:00"
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Group id to look up
Status Codes:
  • 200 – No error
  • 403 – Forbidden, if the requesting user does not have the Administrator role
  • 404 – Record not found or permission denied

Create a Group

POST /api/v2/groups

Create a new Group. The group must have a name, and a list of users. Returns a json object for the newly created group.

Example request with single group:

POST /api/v2/groups HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "group": {
    "name": "Criminal Lawyers",
    "users": [
      {
        "user_id": 1
      },
      {
        "user_id": 3
      }
    ]
  }
}

Example response with single group:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "group": {
    "id": 9,
    "name": "Criminal Lawyers",
    "users": [
      {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "type": "User"
      },
      {
        "id": 3,
        "url": "/api/v2/users/3",
        "name": "Fraser Newton",
        "type": "User"
      }
    ],
    "created_at": "2013-09-19T23:54:45+00:00",
    "updated_at": "2013-09-19T23:54:45+00:00"
  }
}
Status Codes:
  • 201 – Resource Created (Note: always returned when creating multiple resources)
  • 403 – Forbidden, if the requesting user does not have the Administrator role
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Group

PUT /api/v2/groups/(int: group_id)

Updates a group in Clio. Do partial updates by only including the fields you want to change. Returns a json object for the updated group.

You may only change the roles on AccountGroups and UserGroups.

Example request:

PUT /api/v2/groups/4 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "group": {
    "name": "New Group"
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "group": {
    "id": 9,
    "name": "New Group",
    "users": [
      {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User",
        "type": "User"
      },
      {
        "id": 3,
        "url": "/api/v2/users/3",
        "name": "Fraser Newton",
        "type": "User"
      }
    ],
    "created_at": "2013-09-19T23:54:45+00:00",
    "updated_at": "2013-09-19T23:55:38+00:00"
  }
}
Parameters:
  • group_id (integer) – Group id to look up
Status Codes:
  • 200 – Resource Updated
  • 403 – Forbidden, if the requesting user does not have the Administrator role
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Group

DELETE /api/v2/groups/(int: group_id)

Deletes an AdhocGroup with the given id.

Example request:

DELETE /api/v2/groups/3 HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 403 – Forbidden, if the requesting user does not have the Administrator role
  • 404 – Record not found

Matters

Fields:

id:                              (int, readonly) Unique identifier
created_at:                      (datetime, readonly) Date/time of record creation
updated_at:                      (datetime, readonly) Date/time of last modification of record
display_number:                  (string, readonly OR required) Matter reference and label. Depending on the account's manual_matter_numbering setting, this is either read only (generated), or customizable.
client:                          (hash, required) The client of the matter
status:                          (string, required) Matter status, this is one of "Pending", "Open" or "Closed"
description:                     (string, required) Detailed description of the matter
client_reference:                (string) Client Reference string for external uses
responsible_attorney:            (hash) The user responsible for the matter
practice_area:                   (hash) The practice area for the matter
location:                        (string) Location of the matter
pending_date:                    (date) Date the matter was set to pending
open_date:                       (date) Date the matter was set to open
closed_date:                     (date) Date the matter was set to closed
billable:                        (boolean) If this matter is billable or not
maildrop_address:                (string, readonly) Unique Maildrop email address for the matter
custom_field_values:             (array of hashes) A polymorphic collect of custom field values set on this matter. You can get a list of custom fields from the custom fields and custom field sets end points.
  id:                            (int, readonly) Unique identifier. Note
  type:                          (string, required) Type of custom field value, one of [CustomFieldCheckboxValue, CustomFieldContactValue, CustomFieldCurrencyValue, CustomFieldDateValue, CustomFieldTimeValue, CustomFieldEmailValue, CustomFieldMatterValue, CustomFieldNumericValue, CustomFieldPicklistValue, CustomFieldTextAreaValue, CustomFieldTextLineValue, CustomFieldUrlValue].
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  custom_field:                  (hash, required) The custom field of the custom field value
  value:                         (depending on type) The data of the custom field value. The data must be valid based on the type. For CustomFieldContactValue this is the id of the Contact. For CustomFieldMatterValue this is the id of the Matter. For CustomFieldPicklistOptionValue this is the id of the picklist option.
  contact:                       (hash, readonly, only for CustomFieldContactValue) The contact of the custom field contact value
  matter:                        (hash, readonly, only for CustomFieldMatterValue) The matter of the custom field matter value
  custom_field_picklist_option:  (hash, readonly, only for CustomFieldPicklistValue) The option of the custom field picklist value
permission:                      (hash) Matter permission will either be everyone in firm, a specific group or the current user; this is a polymorphic relationship to either group or user. Note
billing_method:                  (string) Billing method of this matter, either "flat" or "hourly"
activity_rates:                  (array of hashes) A collection of firm-wide and/or attorney specific rates for this matter
  id:                           (int, readonly) Unique identifier
  created_at:                    (datetime, readonly) Date/time of record creation
  updated_at:                    (datetime, readonly) Date/time of last modification of record
  user:                          (hash) user of this rate assigned to
  group:                         (hash) group of this rate assigned to
  rate:                          (float, required) rate of this activity rate
  flat_rate:                     (boolean) whether this activity rate is a flat rate
flat_rate_activity:              (hash, readonly) the time entry for the flat rate activity, only set if a matter's billing method is flat
flat_rate_rate:                  (float, required if flat rate) flat rate fee. This is a required field if flat rate is chosen
flat_rate_activity_description:  (hash) Flate rate Activity Description, if flat rate is chosen

Get All Matters

GET /api/v2/matters

Return all matters that the user has permission to view.

Example request:

GET /api/v2/matters HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "matters": [
    {
      "id": 1,
      "client": {
        "id": 1,
        "url": "/api/v2/contacts/1",
        "name": "Schaefer and Sons"
      },
      "display_number": "00001-Schaefer and Sons",
      "description": "Quis et est qui temporibus debitis voluptates magnam eum.",
      "status": "Closed",
      "open_date": "2014-07-16",
      "close_date": "2014-07-22",
      "pending_date": null,
      "location": null,
      "client_reference": null,
      "responsible_attorney": null,
      "practice_area": null,
      "billable": true,
      "maildrop_address": "a02132266+matter1@maildrop-development.goclio.com",
      "created_at": "2014-07-22T17:39:04+00:00",
      "updated_at": "2014-07-22T17:39:04+00:00",
      "custom_field_values": [

      ],
      "billing_method": "hourly",
      "permission": {
        "id": 1,
        "url": "/api/v2/groups/1",
        "name": "Firm"
      },
      "activity_rates": [

      ]
    },
    {
      "id": 2,
      "client": {
        "id": 2,
        "url": "/api/v2/contacts/2",
        "name": "Dare and Sons"
      },
      "display_number": "00002-Dare and Sons",
      "description": "Totam a eius quas iusto ex.",
      "status": "Open",
      "open_date": "2011-12-20",
      "close_date": null,
      "pending_date": null,
      "location": null,
      "client_reference": null,
      "responsible_attorney": null,
      "practice_area": null,
      "billable": true,
      "maildrop_address": "a02132266+matter2@maildrop-development.goclio.com",
      "created_at": "2014-07-22T17:39:04+00:00",
      "updated_at": "2014-07-22T17:39:04+00:00",
      "custom_field_values": [

      ],
      "billing_method": "hourly",
      "permission": {
        "id": 1,
        "url": "/api/v2/groups/1",
        "name": "Firm"
      },
      "activity_rates": [

      ]
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • client_id – (int) Returns all matters belonging to the given client id
  • practice_area_id – (int) Returns all matters belonging to the given practice area id
  • status – (string) Returns all matters with a given status; a status must be from the following: “Open”, “Closed” or “Pending”
  • display_number – (string) Wildcard search for display_number matching a given string.
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful
  • 404 – returned if the client is not found

Get a Matter

GET /api/v2/matters/(int: matter_id)

Returns the matter for the given id.

Example request:

GET /api/v2/matters/1 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "matters": [
    {
      "id": 1,
      "client": {
        "id": 1,
        "url": "/api/v2/contacts/1",
        "name": "Schaefer and Sons"
      },
      "display_number": "00001-Schaefer and Sons",
      "description": "Quis et est qui temporibus debitis voluptates magnam eum.",
      "status": "Closed",
      "open_date": "2014-07-16",
      "close_date": "2014-07-22",
      "pending_date": null,
      "location": null,
      "client_reference": null,
      "responsible_attorney": null,
      "practice_area": null,
      "billable": true,
      "maildrop_address": "a02132266+matter1@maildrop-development.goclio.com",
      "created_at": "2014-07-22T17:39:04+00:00",
      "updated_at": "2014-07-22T17:39:04+00:00",
      "custom_field_values": [

      ],
      "billing_method": "hourly",
      "permission": {
        "id": 1,
        "url": "/api/v2/groups/1",
        "name": "Firm"
      },
      "activity_rates": [

      ]
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Matter id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Create a Matter

POST /api/v2/matters

Creates a matter record. Returns a json object for the newly created matter.

Example request with single matter:

POST /api/v2/matters HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "matter": {
    "client_id": 2,
    "description": "Jane and Doe divorce",
    "status": "Open"
  }
}

Example response with single matter:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "matter": {
    "id": 71,
    "client": {
      "id": 2,
      "url": "/api/v2/contacts/2",
      "name": "Vandervort, McDermott and Goodwin"
    },
    "display_number": "00070-Vandervort, McDermott and Goodwin",
    "description": "Jane and Doe divorce",
    "status": "Open",
    "open_date": "2013-09-19",
    "close_date": null,
    "pending_date": null,
    "location": null,
    "client_reference": null,
    "responsible_attorney": null,
    "practice_area": null,
    "billable": true,
    "maildrop_address": "94d1bf4df+matter71@maildrop-development.goclio.com",
    "created_at": "2013-09-19T22:55:18+00:00",
    "updated_at": "2013-09-19T22:55:18+00:00",
    "custom_field_values": [

    ],
    "billing_method": "hourly",
    "permission": {
      "id": 1,
      "url": "/api/v2/groups/1",
      "name": "Firm"
    },
    "activity_rates": [

    ]
  }
}
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Matter

PUT /api/v2/matters/(int: matter_id)

Updates a matter record. Do partial updates by only including the fields you want to change. Returns a json object for the updated matter.

Example request:

PUT /api/v2/matters/13 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "matter": {
    "status": "Closed"
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "matter": {
    "id": 71,
    "client": {
      "id": 2,
      "url": "/api/v2/contacts/2",
      "name": "Vandervort, McDermott and Goodwin"
    },
    "display_number": "00070-Vandervort, McDermott and Goodwin",
    "description": "Jane and Doe divorce",
    "status": "Closed",
    "open_date": "2013-09-19",
    "close_date": "2013-09-19",
    "pending_date": null,
    "location": null,
    "client_reference": null,
    "responsible_attorney": null,
    "practice_area": null,
    "billable": true,
    "maildrop_address": "94d1bf4df+matter71@maildrop-development.goclio.com",
    "created_at": "2013-09-19T22:55:18+00:00",
    "updated_at": "2013-09-19T22:56:18+00:00",
    "custom_field_values": [

    ],
    "billing_method": "hourly",
    "permission": {
      "id": 1,
      "url": "/api/v2/groups/1",
      "name": "Firm"
    },
    "activity_rates": [

    ]
  }
}
Parameters:
  • matter_id (integer) – Matter id to look up
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Matter

DELETE /api/v2/matters/(int: matter_id)

Deletes a matter record.

Example request:

DELETE /api/v2/matters/(int:matter_id) HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or no permission denied

Notes

Fields:

id:          (int, readonly) Unique identifier
created_at:  (datetime, readonly) Date/time of record creation
updated_at:  (datetime, readonly) Date/time of last modification of record
subject:     (string, required) Subject of the note
detail:      (text) Details of the note
regarding:   (hash, required) What the note references. This is a polymorphic hash and includes a type and id. Will be a reference to either a Contact or a Matter.
  type:      (int, required) What type of object does the note reference, one of [Contact, Matter].
  id:        (int, required) Unique identifier of the regarding_type above.
date:        (date) Date of the note
activities:  (array of hashes)  Collection of activities associated with the note. These will be of type TimeEntry.

Get All Notes

GET /api/v2/notes

Returns all the notes that match the given query. The regarding_type parameter must be supplied.

Example request:

GET /api/v2/notes?regarding_type=Contact HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "notes": [
    {
      "id": 11,
      "subject": "Details of phone conversation",
      "detail": "Ut dolor ducimus et consequatur laborum. Est quidem aut rem sunt nisi ipsam et. Dolorem aut autem rerum. Ipsa aut id. Repudiandae et necessitatibus modi hic quod corporis.",
      "date": "2014-07-05",
      "created_at": "2014-07-22T17:39:13+00:00",
      "updated_at": "2014-07-22T17:39:13+00:00",
      "regarding": {
        "id": 9,
        "type": "Contact",
        "name": "Schulist, Pagac and O'Reilly",
        "url": "/api/v2/9"
      }
    },
    {
      "id": 12,
      "subject": "Relevant research on matter",
      "detail": "Et inventore numquam quibusdam dolores nulla illum eius. Id voluptas aut voluptatem incidunt. Sint qui quod.",
      "date": "2014-05-02",
      "created_at": "2014-07-22T17:39:13+00:00",
      "updated_at": "2014-07-22T17:39:13+00:00",
      "regarding": {
        "id": 20,
        "type": "Contact",
        "name": "Ephraim Dibbert",
        "url": "/api/v2/20"
      }
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • regarding_type – (string, required) Object Note regards, can one of [Contact, Matter].
  • regarding_id – (int) Unique identifier of the object the note regards. If used, you must also supply a regarding_type
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • optional_fields – (string) Include data for associated objects. Currently supported: “activities”
Status Codes:
  • 200 – OK, request successful

Get a Note

GET /api/v2/notes/(int: note_id)

Returns the note for the given id. May only find notes that the user has permission to see. A user may see any note belonging to a matter the user has permission for, any note assigned to the user, and any note assigned by the user.

Example request:

GET /api/v2/notes/1 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "notes": [
    {
      "id": 11,
      "subject": "Details of phone conversation",
      "detail": "Ut dolor ducimus et consequatur laborum. Est quidem aut rem sunt nisi ipsam et. Dolorem aut autem rerum. Ipsa aut id. Repudiandae et necessitatibus modi hic quod corporis.",
      "date": "2014-07-05",
      "created_at": "2014-07-22T17:39:13+00:00",
      "updated_at": "2014-07-22T17:39:13+00:00",
      "regarding": {
        "id": 9,
        "type": "Contact",
        "name": "Schulist, Pagac and O'Reilly",
        "url": "/api/v2/9"
      }
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Note id to look up
Query Parameters:
 
  • optional_fields – (string) Include data for associated objects. Currently supported: “activities”
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Create a Note

POST /api/v2/notes

Creates a note record. The note must have a subject, and regarding relationship set. Returns a json object for the newly created note.

Example request with single note regarding Matter 1:

POST /api/v2/notes HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "note": {
    "subject": "Email Dave",
    "regarding": {
      "type": "Matter",
      "id": 10
    }
  }
}

Example request optional_fields:

POST /api/v2/notes?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "note": {
    "subject": "Email Dave",
    "regarding": {
      "type": "Matter",
      "id": 10
    },
    "activities": [
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Saepe aut impedit soluta."
      }
    ]
  }
}

Example response with single note:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "note": {
    "date": "2012-02-13",
    "detail": "Nobis atque asperiores cumque. Temporibus et quo dolores soluta veritatis. Maiores ipsam soluta qui natus vero odio exercitationem voluptatem.",
    "regarding": {
      "type": "Matter",
      "url": "/api/v2/matters/10",
      "name": "00010-Bogisich, Hessel and Feeney",
      "id": 10
    },
    "created_at": "2012-03-16T19:25:23+00:00",
    "id": 1,
    "updated_at": "2012-03-16T19:25:23+00:00",
    "subject": "Details of phone conversation"
  }
}
Query Parameters:
 
  • optional_fields – (string) Create associated objects. Currently supported: “activities”. Activities must have type TimeEntry.
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Note

PUT /api/v2/notes/(int: note_id)

Updates a note record. Do partial updates by only including the fields you want to change. Returns a json object for the updated note.

  • You may not update the assigner.
  • The completed_at date will automatically be updated if you change the value of complete.

Example request:

PUT /api/v2/notes/24 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "note": {
    "subject": "Email Dave Update"
  }
}

Example request with optional fields (1 created, 1 updated):

PUT /api/v2/notes/4?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "note": {
    "subject": "Email Dave Update",
    "activities": [
      {
        "id": 1,
        "note": "Nam unde aut voluptas."
      },
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Tempora ut et vero eos magni."
      }
    ]
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "note": {
    "date": null,
    "detail": null,
    "regarding": {
      "type": "Matter",
      "url": "/api/v2/matters/1",
      "name": "00001-Jakubowski-Bednar",
      "id": 1
    },
    "created_at": "2012-03-29T20:28:04+00:00",
    "id": 24,
    "updated_at": "2012-03-29T20:29:25+00:00",
    "subject": "Email Dave Update"
  }
}
Parameters:
  • note_id (integer) – Note id to look up
Query Parameters:
 
  • optional_fields – (string) Update (or create) associated objects. Currently supported: “activities”. Activities must have type TimeEntry. Changes to the list of activities provided will be persisted. ie. existing activities not provided in the activities list will be deleted, activities that exist will be updated, and new activities will be created. Exclusion of this field will result in no change to the associated activities.
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Note

DELETE /api/v2/notes/(int: note_id)

Deletes a note record.

Example request:

DELETE /api/v2/notes/3 HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or permission denied

Practice Areas

Practice areas for your firm. All users have a get access to a list of practice areas but only admin users have a permission to modify or create a practice area.

Fields:

id:          (int, readonly) Unique identifier
created_at:  (datetime, readonly) Date/time of record creation
updated_at:  (datetime, readonly) Date/time of last modification of record
name:        (string, required) Practice Area Name

Get All PracticeAreas

GET /api/v2/practice_areas

Return all practice_areas that the user has permission to view.

Example request:

GET /api/v2/practice_areas HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "practice_areas": [
    {
      "id": 19,
      "name": "Administrative",
      "created_at": "2014-07-22T17:38:58+00:00",
      "updated_at": "2014-07-22T17:38:58+00:00"
    },
    {
      "id": 20,
      "name": "Bankruptcy",
      "created_at": "2014-07-22T17:38:58+00:00",
      "updated_at": "2014-07-22T17:38:58+00:00"
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful
  • 404 – returned if the client is not found

Get a PracticeArea

GET /api/v2/practice_areas/(int: practice_area_id)

Returns the practice_area for the given id.

Example request:

GET /api/v2/practice_areas/1 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "practice_areas": [
    {
      "id": 19,
      "name": "Administrative",
      "created_at": "2014-07-22T17:38:58+00:00",
      "updated_at": "2014-07-22T17:38:58+00:00"
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – PracticeArea id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Create a PracticeArea

POST /api/v2/practice_areas

Creates a practice_area record. Returns a json object for the newly created practice area. This action can only be performed by an admin user.

Example request with single practice area:

POST /api/v2/practice_areas HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "practice_area": {
    "name": "Civil Litigation"
  }
}

Example response with single practice area:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "practice_area": {
    "id": 73,
    "name": "Civil Litigation",
    "created_at": "2013-01-22T00:06:11+00:00",
    "updated_at": "2013-01-22T00:06:11+00:00"
  }
}
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Practice Area

PUT /api/v2/practice_areas/(int: practice_area_id)

Updates a practice area record. Do partial updates by only including the fields you want to change. Returns a json object for the updated practice area. This action can only be performed by an admin user.

Example request:

PUT /api/v2/practice_areas/13 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "practice_area": {
    "name": "Corporate"
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "practice_area": {
    "id": 73,
    "name": "Corporate",
    "created_at": "2013-01-22T00:06:11+00:00",
    "updated_at": "2013-01-22T00:06:11+00:00"
  }
}
Parameters:
  • practice_area_id (integer) – Practice Area id to look up
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Practice Area

DELETE /api/v2/practice_areas/(int: practice_area_id)

Deletes a practice area record. This action can only be performed by an admin user.

Example request:

DELETE /api/v2/practice_areas/(int:practice_area_id) HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or permission denied

Relationships

There will be people related to a Matter other than the client that you want to link. Relationship lets you track these individuals and companies so that you can quickly see who is related to each Matter.

Fields:

id:           (int, readonly) Unique identifier
created_at:   (datetime, readonly) Created at date
updated_at:   (datetime, readonly) Last modified date
description:  (string,) Name of the relationship
contact:      (hash, required) The contact of the relationship
matter:       (hash, required) The matter of the relationship

Get All Relationships

GET /api/v2/relationships

Returns all the relationships that match the given query.

Example request:

GET /api/v2/relationships HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "relationships": [
    {
      "id": 1,
      "created_at": "2014-07-22T17:39:09+00:00",
      "updated_at": "2014-07-22T17:39:09+00:00",
      "description": "Additional contact",
      "contact": {
        "id": 7,
        "url": "/api/v2/contacts/7",
        "name": "Considine Group"
      },
      "matter": {
        "id": 2,
        "url": "/api/v2/matters/2",
        "name": "00002-Dare and Sons"
      }
    },
    {
      "id": 2,
      "created_at": "2014-07-22T17:39:09+00:00",
      "updated_at": "2014-07-22T17:39:09+00:00",
      "description": "Present at discovery",
      "contact": {
        "id": 15,
        "url": "/api/v2/contacts/15",
        "name": "Reyes Batz"
      },
      "matter": {
        "id": 3,
        "url": "/api/v2/matters/3",
        "name": "00003-Lang, Goyette and McGlynn"
      }
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • contact_id – (int) Returns all relationships belonging to the given contact id
  • matter_id – (int) Returns all relationships belonging to the given matter id
  • offset – (int) Returns records with an id greater then the offset
  • limit – (int, default 1000) Number of records to return
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful

Get a Relationship

GET /api/v2/relationships/(int: relationship_id)

Returns the relationship for the given relationship_id.

Example request:

GET /api/v2/relationships/4 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "relationships": [
    {
      "id": 1,
      "created_at": "2014-07-22T17:39:09+00:00",
      "updated_at": "2014-07-22T17:39:09+00:00",
      "description": "Additional contact",
      "contact": {
        "id": 7,
        "url": "/api/v2/contacts/7",
        "name": "Considine Group"
      },
      "matter": {
        "id": 2,
        "url": "/api/v2/matters/2",
        "name": "00002-Dare and Sons"
      }
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Relationship id to look up
Status Codes:
  • 200 – No error
  • 404 – Record not found or permission denied

Create a Relationship

POST /api/v2/relationships

Create a new Relationship. The relationship must have a description, a contact and a matter. Returns a json object for the newly created relationship.

Example request with single relationship:

POST /api/v2/relationships HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "relationship": {
    "description": "Criminal Lawyer",
    "matter": {
      "id": 71
    },
    "contact": {
      "id": 84
    }
  }
}

Example response with single relationship:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "relationship": {
    "id": 12,
    "created_at": "2013-09-19T23:31:28+00:00",
    "updated_at": "2013-09-19T23:31:28+00:00",
    "description": "Criminal Lawyer",
    "contact": {
      "id": 84,
      "url": "/api/v2/contacts/84",
      "name": "Company API Inc. 2"
    },
    "matter": {
      "id": 71,
      "url": "/api/v2/matters/71",
      "name": "00070-Vandervort, McDermott and Goodwin"
    }
  }
}
Status Codes:
  • 201 – Resource Created (Note: always returned when creating multiple resources)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Relationship

PUT /api/v2/relationships/(int: relationship_id)

Updates a relationship in Clio. Do partial updates by only including the fields you want to change. Returns a json object for the updated relationship.

Example request:

PUT /api/v2/relationships/4 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "relationship": {
    "description": "New Relationship"
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "relationship": {
    "id": 12,
    "created_at": "2013-09-19T23:31:28+00:00",
    "updated_at": "2013-09-19T23:33:01+00:00",
    "description": "New Relationship",
    "contact": {
      "id": 84,
      "url": "/api/v2/contacts/84",
      "name": "Company API Inc. 2"
    },
    "matter": {
      "id": 71,
      "url": "/api/v2/matters/71",
      "name": "00070-Vandervort, McDermott and Goodwin"
    }
  }
}
Parameters:
  • relationship_id (integer) – Relationship id to look up
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Relationship

DELETE /api/v2/relationships/(int: relationship_id)

Example request:

DELETE /api/v2/relationships/3 HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found

Tasks

Fields:

id:                         (int, readonly) Unique identifier
created_at:                 (datetime, readonly) Date/time of record creation
updated_at:                 (datetime, readonly) Date/time of last modification of record
name:                       (string, required) Name of the task
description:                (string) Description of the task
priority:                   (string, required) Priority of the task, one of ("High", "Normal" or "Low"). If not supplied, defaults to "Normal".
user:                       (hash) User this task belongs to
assigner:                   (hash) User this task was assigned by
matter:                     (hash) Matter this task relates to
due_at:                     (date) Date the task is due
complete:                   (boolean) Is the task complete?
completed_at:               (date) Date the task was completed
is_private:                 (boolean) Is the task private?
is_statute_of_limitations:  (boolean) In Clio, a statute of limitations being satisified is represented by the task object. If the statute of limitiations has been satisified the "complete" field will be true. It is important to note there can only be one statute of limitations for each matter.
reminders:                  (Array of hashes) Collection of reminders for a task
  minutes:                  (int, required) time in minutes when a reminder will appear prior to due date
  method:                   (string, required) a notification method for a reminder. Currently it only supports "Popup"
activities:                 (array of hashes)  Collection of activities associated with the task. These will be of type TimeEntry.

Get All Tasks

GET /api/v2/tasks

Returns all the tasks that match the given query. There are a number of ways to query Clio for tasks using the query parameter:

  • All: (Default) Returns all tasks that a user has permission to see
  • AssignedToMe: Returns all tasks that have been assigned to the current user.
  • AssignedByMe: Returns all tasks that have been assigned by the current user.
  • Matters: Returns all tasks that belong to matters the user has access to.

Example request:

GET /api/v2/tasks HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "tasks": [
    {
      "id": 1,
      "name": "Rerum sit expedita qui excepturi ex omnis iusto.",
      "description": null,
      "priority": "Normal",
      "user": {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User"
      },
      "assigner": {
        "id": 3,
        "url": "/api/v2/users/3",
        "name": "Fraser Newton"
      },
      "matter": {
        "id": 2,
        "url": "/api/v2/matters/2",
        "name": "00002-Dare and Sons"
      },
      "due_at": "2015-05-30",
      "complete": true,
      "completed_at": "2014-07-22T17:39:06+00:00",
      "is_private": false,
      "is_statute_of_limitations": false,
      "created_at": "2014-07-22T17:39:06+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "reminders": [

      ]
    },
    {
      "id": 2,
      "name": "In est sequi consequatur eaque velit.",
      "description": null,
      "priority": "Normal",
      "user": {
        "id": 2,
        "url": "/api/v2/users/2",
        "name": "Jack Ryan"
      },
      "assigner": {
        "id": 3,
        "url": "/api/v2/users/3",
        "name": "Fraser Newton"
      },
      "matter": {
        "id": 1,
        "url": "/api/v2/matters/1",
        "name": "00001-Schaefer and Sons"
      },
      "due_at": "2013-08-25",
      "complete": true,
      "completed_at": "2014-07-22T17:39:06+00:00",
      "is_private": false,
      "is_statute_of_limitations": false,
      "created_at": "2014-07-22T17:39:06+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "reminders": [

      ]
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • query – (string) How to query tasks, either “All” (default), “AssignedToMe”, “AssignedByMe” or “Matters”
  • priority – (string) Priority of tasks to show, either “High”, “Normal”, or “Low”.
  • matter_id – (int) Limit the tasks to only those belonging to this matter
  • is_statute_of_limitations – (boolean) If “true” this parameter will filter the tasks which represent if a statute of limitations has been satisified or not. If “false” this parameter will filter the tasks which do NOT represent if a statute of limitations have been satisified.
  • user_id – (int) Scopes the tasks to those belonging to the given user, use “not-me” to return tasks that do not belong to current user.
  • assigner_id – (int) Scopes the tasks to those assigned by the given user, use “not-me” to return tasks that do not belong to current user.
  • date_range – (string) Date range of tasks to show, either “all” (default), “due_this_week”, “due_today”, “due_tomorrow”, “overdue”
  • completed – (boolean) Scopes the tasks to those that are complete (“true”) or incomplete (“false”).
  • task_permission – (string) Scopes the tasks to those that are private only (“private”), or public only (“public”). It returns all tasks by default.
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
  • optional_fields – (string) Include data for associated objects. Currently supported: “time_entries”
Status Codes:
  • 200 – OK, request successful

Get a Task

GET /api/v2/tasks/(int: task_id)

Returns the task for the given id. May only find tasks that the user has permission to see. A user may see any task belonging to a matter the user has permission for, any task assigned to the user, and any task assigned by the user.

Example request:

GET /api/v2/tasks/4 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "tasks": [
    {
      "id": 1,
      "name": "Rerum sit expedita qui excepturi ex omnis iusto.",
      "description": null,
      "priority": "Normal",
      "user": {
        "id": 1,
        "url": "/api/v2/users/1",
        "name": "Demo User"
      },
      "assigner": {
        "id": 3,
        "url": "/api/v2/users/3",
        "name": "Fraser Newton"
      },
      "matter": {
        "id": 2,
        "url": "/api/v2/matters/2",
        "name": "00002-Dare and Sons"
      },
      "due_at": "2015-05-30",
      "complete": true,
      "completed_at": "2014-07-22T17:39:06+00:00",
      "is_private": false,
      "is_statute_of_limitations": false,
      "created_at": "2014-07-22T17:39:06+00:00",
      "updated_at": "2014-07-22T17:39:06+00:00",
      "reminders": [

      ]
    }
  ],
  "records": 1,
  "limit": 1000
}
Parameters:
  • id (integer) – Task id to look up
Query Parameters:
 
  • optional_fields – (string) Include data for associated objects. Currently supported: “time_entries”
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Create a Task

POST /api/v2/tasks

Creates a task record. The task must have a name, and due date set. Returns a json object for the newly created task.

Example request with single task:

POST /api/v2/tasks HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "task": {
    "name": "Email Dave",
    "due_at": "2011-12-08"
  }
}

Example request optional_fields:

POST /api/v2/tasks?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "task": {
    "name": "Email Dave",
    "due_at": "2011-12-08",
    "activities": [
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Saepe aut impedit soluta."
      }
    ]
  }
}

Example response with single task:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "task": {
    "id": 66,
    "name": "Email Dave",
    "description": null,
    "priority": "Normal",
    "user": {
      "id": 1,
      "url": "/api/v2/users/1",
      "name": "Demo User"
    },
    "assigner": {
      "id": 1,
      "url": "/api/v2/users/1",
      "name": "Demo User"
    },
    "matter": null,
    "due_at": "2011-12-08",
    "complete": false,
    "completed_at": null,
    "is_private": false,
    "is_statute_of_limitations": false,
    "created_at": "2013-09-19T23:44:08+00:00",
    "updated_at": "2013-09-19T23:44:08+00:00",
    "reminders": [

    ]
  }
}
Query Parameters:
 
  • optional_fields – (string) Create associated objects. Currently supported: “activities”. Activities must have type TimeEntry.
Status Codes:
  • 201 – Resource Created (Note: 201 always returned when doing Bulk Creates)
  • 400 – Bad Request, could not save the resource, check the response body for error messages

Update a Task

PUT /api/v2/tasks/(int: task_id)

Updates a task record. Do partial updates by only including the fields you want to change. Returns a json object for the updated task.

  • You may not update the assigner.
  • The completed_at date will automatically be updated if you change the value of complete.

Example request:

PUT /api/v2/tasks/4 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "task": {
    "complete": true
  }
}

Example request with optional fields (1 created, 1 updated):

PUT /api/v2/tasks/4?optional_fields=activities HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "task": {
    "complete": true,
    "activities": [
      {
        "id": 1,
        "note": "Nam unde aut voluptas."
      },
      {
        "type": "TimeEntry",
        "quantity": 1,
        "note": "Tempora ut et vero eos magni."
      }
    ]
  }
}

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "task": {
    "id": 66,
    "name": "Email Dave",
    "description": null,
    "priority": "Normal",
    "user": {
      "id": 1,
      "url": "/api/v2/users/1",
      "name": "Demo User"
    },
    "assigner": {
      "id": 1,
      "url": "/api/v2/users/1",
      "name": "Demo User"
    },
    "matter": null,
    "due_at": "2011-12-08",
    "complete": true,
    "completed_at": "2013-09-19T23:46:37+00:00",
    "is_private": false,
    "is_statute_of_limitations": false,
    "created_at": "2013-09-19T23:44:08+00:00",
    "updated_at": "2013-09-19T23:46:37+00:00",
    "reminders": [

    ]
  }
}
Parameters:
  • task_id (integer) – Task id to look up
Query Parameters:
 
  • optional_fields – (string) Update (or create) associated objects. Currently supported: “activities”. Activities must have type TimeEntry. Changes to the list of activities provided will be persisted. ie. existing activities not provided in the activities list will be deleted, activities that exist will be updated, and new activities will be created. Exclusion of this field will result in no change to the associated activities.
Status Codes:
  • 200 – Resource Updated
  • 400 – Bad Request, could not save the resource, check the response body for error messages
  • 404 – Record not found or permission denied

Delete a Task

DELETE /api/v2/tasks/(int: task_id)

Deletes a task record.

Example request:

DELETE /api/v2/tasks/3 HTTP/1.1
Host: app.goclio.com

Example response:

HTTP/1.1 200 Ok
Status Codes:
  • 200 – OK, request successful, resource deleted
  • 404 – Record not found or permission denied

Timeline Events

Timeline Events are a running record of events against objects within Clio. The events are used to display the Firm Feed within Clio. There is a lot of data within this API so care should be taken when using it.

Fields:

id:                 (int, readonly) Unique identifier
created_at:         (datetime, readonly) Date/time of record creation
updated_at:         (datetime, readonly) Date/time of last modification of record
event_type:         (string) Type of timeline event. Example
actor:              (hash, required) Which actor performed this action. This is a polymorphic hash and includes a type, name and id. Will be a reference to either a Contact or User.
  type:             (string, required) What type of object does the actor reference, one of [Contact, User].
  name:             (string, readonly) Name of the actor
  id:               (int, required) Unique identifier of the actor type above.
matter:             (hash) Matter this timeline event relates to.
subject:            (hash, required) Which object this event was performed on. This is a polymorphic hash and includes a type, name and id. It can reference nearly any object within Clio.
  type:             (string, required) What type of object does the subject reference.
  name:             (string, readonly) Name of the subject
  id:               (int, required) Unique identifier of the subject_type above.
secondary_subject:  (hash, required) A secondary subject of the event. This is a polymorphic hash and includes a type and id. It can reference nearly any object within Clio.
  type:             (string, required) What type of object does the econdary subject reference.
  name:             (string, readonly) Name of the secondary subject
  id:               (int, required) Unique identifier of the secondary subject type above.
old_subject_name:   (string) Populated with the old subject.name if the subject.name was changed by this event.

Get All Timeline Events

GET /api/v2/timeline_events

Returns the timeline events the user has permission to see.

NOTE: The timeline events API returns rows in reverse order. You may still use the offset and limit parameters as expected but the offset will return results before the offset value.

Example request:

GET /api/v2/timeline_events HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "timeline_events": [
    {
      "id": 100000,
      "created_at": "2014-07-22T17:41:38+00:00",
      "updated_at": "2014-07-22T17:41:38+00:00",
      "event_type": "firm_feed_create",
      "actor": {
        "id": 1,
        "name": "Demo User",
        "type": "User"
      },
      "matter": null,
      "subject": {
        "id": 25,
        "name": "Ester von Gaza",
        "type": "Person"
      },
      "secondary_subject": null,
      "old_subject_name": null
    },
    {
      "id": 100001,
      "created_at": "2014-07-22T17:41:51+00:00",
      "updated_at": "2014-07-22T17:41:51+00:00",
      "event_type": "firm_feed_create",
      "actor": {
        "id": 1,
        "name": "Demo User",
        "type": "User"
      },
      "matter": null,
      "subject": {
        "id": 26,
        "name": "Emma Zacharias",
        "type": "Person"
      },
      "secondary_subject": null,
      "old_subject_name": null
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • matter_id – (int) Returns timeline events in the context of the given matter id.
  • actor_type – (string) Returns timeline events in the context of the given actor type, must also include the actor_id parameter.
  • actor_id – (int) Returns timeline events in the context of the given actor id, must also include the actor_type parameter.
  • subject_type – (string) Returns timeline events in the context of the given subject type.
  • subject_id – (int) Returns timeline events in the context of the given subject id, must also include the subject_type parameter.
  • offset – (int) Returns records with an id greater than the offset.
  • limit – (int, default 1000) The maximum number of records to be returned.
Status Codes:
  • 200 – OK, request successful

Timer

Timer is a singular resource used to track work in progress for an activity (TimeEntry). Each user can only have a single timer running at any given time. This API will only return the timer for the currently authenticated user.

Note: When a timer is stopped, any time on the timer will be applied its associated activity (TimeEntry). Note: When starting a new timer, if there is currently a running timer the old timer will be stopped and any time on the old timer will be applied its associated activity (TimeEntry).

Fields:

id:          (int, readonly) Unique identifier
created_at:  (datetime, readonly) Date/time of record creation
updated_at:  (datetime, readonly) Date/time of last modification of record
start_time:  (datetime) Date/time the timer was started
activity:    (hash) Activity (TimeEntry) this timer belongs to

Get the currently running timer

GET /api/v2/timer

Returns the running timer for the authenticated user

Example request:

GET /api/v2/timer
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "timer": {
    "id": 21,
    "start_time": "2013-03-20T17:15:00+00:00",
    "created_at": "2013-03-20T17:16:17+00:00",
    "updated_at": "2013-03-20T17:16:17+00:00",
    "activity": {
      "id": 70,
      "url": "/api/v2/activities/70"
    }
  }
}
Status Codes:
  • 200 – OK, request successful, running timer returned
  • 404 – record not found, no timer running

Create a new timer

POST /api/v2/timer

Creates a new timer record for the authenticated user. The timer may have a start_time and activity_id set. If no activity_id is set, then a new activity (TimeEntry) will be created. Returns a json object for the newly created timer.

It is important to note that there can only be a single timer running for the user. If you start a new timer while an existing timer is running, then the old timer will stop and any time associated with it will be applied to the duration of the associated activity (TimeEntry).

Example request:

POST /api/v2/timer HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript
Content-Type: application/json

{
  "timer": {
    "activity_id": 70,
    "start_time": "2013-03-20T17:15:00+00:00"
  }
}

Example response:

HTTP/1.1 201 Created
Vary: Accept
Content-Type: text/javascript

{
  "timer": {
    "id": 21,
    "start_time": "2013-03-20T17:15:00+00:00",
    "created_at": "2013-03-20T17:16:17+00:00",
    "updated_at": "2013-03-20T17:16:17+00:00",
    "activity": {
      "id": 70,
      "url": "/api/v2/activities/70"
    }
  }
}
Status Codes:
  • 201 – Ok, request successful, new timer created
  • 404 – record (activity) not found

Remove the running timer

POST /api/v2/timer

Stops the running timer for the authenticated user. The timer will be removed and any time associated with it will be applied to the duration of the associated activity (TimeEntry).

Example request:

DELETEs /api/v2/timer
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "timer": {
    "id": 6,
    "start_time": "2013/03/19 22:06:36 +0000",
    "created_at": "2013-03-19T22:06:36+00:00",
    "updated_at": "2013-03-19T22:06:36+00:00",
    "activity": {
      "id": 53,
      "url": "/api/v2/activities/53"
    }
  }
}
Status Codes:
  • 200 – OK, request successful, timer stopped
  • 404 – record (running timer) not found

Users

Fields:

id:                                                               (int, readonly) Unique identifier
created_at:                                                       (datetime, readonly) Date/time of record creation
updated_at:                                                       (datetime, readonly) Date/time of last modification of record
subscription_plan:                                                (string, readonly) Type of user, either "Attorney" or "NonAttorney"
time_zone:                                                        (string, readonly) The human readable timezone of the user
iana_time_zone (string, readonly) The IANA timezone of the user:
first_name:                                                       (string, readonly) The user's given name
last_name:                                                        (string, readonly) The user's surname
email:                                                            (string, readonly) The user's email address
enabled:                                                          (boolean, readonly) If the user's account is active or not
rate:                                                             (decimal(8,2), readonly) The billing rate for the user. If the authenticated user does not have permission to view this users rate then the value will be null.
avatar_url:                                                       (string, readonly) URL to the user's avatar. This URL will point to /api/v2/users/(int
authenticated:                                                    (boolean, readonly) If the user is the currently authenticated API user
[Account] id:                                                     (string, readonly) Unique Identifier for the account
[Account] created_at:                                             (datetime, readonly) Date/time of record creation
[Account] updated_at:                                             (datetime, readonly) Date/time of last modification of record
[Account] owner:                                                  (hash, readonly) Owner of the account
[Account] name:                                                   (string, readonly) Account's name
[Account] maildrop_address:                                       (string) Unique Maildrop email address for the account
[Account] manual_matter_numbering:                                (boolean, readonly) If the account uses manual matter numbering

Get All Users

GET /api/v2/users

Returns all enabled users on the account.

Example request:

GET /api/v2/users HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "users": [
    {
      "id": 1,
      "email": "demo@goclio.com",
      "first_name": "Demo",
      "last_name": "User",
      "time_zone": "UTC",
      "iana_time_zone": "Etc/UTC",
      "enabled": true,
      "avatar_url": "/api/v2/users/1/avatar",
      "authenticated": true,
      "subscription_plan": "Attorneys",
      "created_at": "2014-07-22T17:38:59+00:00",
      "updated_at": "2014-07-22T17:39:00+00:00",
      "rate": 700.0,
      "default_activity_description": null
    },
    {
      "id": 2,
      "email": "jack.ryan@goclio.com",
      "first_name": "Jack",
      "last_name": "Ryan",
      "time_zone": "UTC",
      "iana_time_zone": "Etc/UTC",
      "enabled": true,
      "avatar_url": "/api/v2/users/2/avatar",
      "authenticated": false,
      "subscription_plan": "Attorneys",
      "created_at": "2014-07-22T17:39:00+00:00",
      "updated_at": "2014-07-22T17:39:00+00:00",
      "rate": 650.0,
      "default_activity_description": null
    }
  ],
  "records": 2,
  "limit": 1000
}
Query Parameters:
 
  • query – (string) Wildcard search for users matching the query string. Fields searched are first_name, last_name, email.
  • offset – (int) Returns records with an id greater than the offset
  • limit – (int, default 1000) The maximum number of records to be returned
  • created_since – (date, ISO 8601 format) Returns records created on or after the date
  • updated_since – (date, ISO 8601 format) Returns records updated on or after the date
Status Codes:
  • 200 – OK, request successful

Get a User

GET /api/v2/users/(int: user_id)

Returns the user for the given id.

Example request:

GET /api/v2/users/3 HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "user": {
    "id": 1,
    "email": "demo@goclio.com",
    "first_name": "Demo",
    "last_name": "User",
    "time_zone": "UTC",
    "iana_time_zone": "Etc/UTC",
    "enabled": true,
    "avatar_url": "/api/v2/users/1/avatar",
    "authenticated": true,
    "subscription_plan": "Attorneys",
    "created_at": "2014-07-22T17:38:59+00:00",
    "updated_at": "2014-07-22T17:39:00+00:00",
    "rate": 700.0,
    "default_activity_description": null
  }
}
Parameters:
  • id (integer) – User id to look up
Status Codes:
  • 200 – OK, request successful
  • 404 – record not found

Get a User’s Avatar

GET /api/v2/users/(int: user_id)/avatar

Returns the avatar for the given user_id.

Example request:

GET /api/v2/users/3/avatar HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 303 See Other
Location: https://s3.amazonaws.com/development.documents.goclio.com/avatars/1/profile_large.jpg?response-content-disposition=attachment%3B%20filename%3D%22profile_large.jpg%22&Signature=1D%2B9XnOH%2FsYsikTmt%2BW9Gle9Lro%3D&Expires=1359416468&AWSAccessKeyId=AKIAJTSRXGCTDENSHSSA
Content-Type: application/json; charset=utf-8
Parameters:
  • id (integer) – User id to look up
Query Parameters:
 
  • size – (string) Size of avatar to return. One of “small” (32x32), “medium” (128x123), or “large” (256x256)
Status Codes:
  • 303 – Redirect to actual avatar URL, follow the Location header
  • 404 – record not found

Get Account and Current Users Information

GET /api/v2/users/who_am_i

Returns information about the authorized user and their account.

Example request:

GET /api/v2/users/who_am_i HTTP/1.1
Host: app.goclio.com
Accept: application/json, text/javascript

Example response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "account": {
    "owner": {
      "url": "/api/v2/users/1",
      "name": "Demo User",
      "id": 1
    },
    "created_at": "2012-02-23T20:11:13+00:00",
    "updated_at": "2012-02-23T20:11:15+00:00",
    "maildrop_address": "09c0574e8@maildrop.goclio.com",
    "name": "Clio LLP Attorneys at Law",
    "id": "zFeUM0XSBE6acPVQUki/KQ"
  },
  "manual_matter_numbering": false,
  "user": {
    "subscription_plan": "Attorney",
    "time_zone": "Mountain Time (US & Canada)",
    "last_name": "User",
    "enabled": true,
    "created_at": "2012-02-23T20:11:14+00:00",
    "email": "demouser@goclio.com",
    "updated_at": "2012-02-24T16:35:04+00:00",
    "first_name": "Demo",
    "id": 1
  }
}
Status Codes:
  • 200 – OK, request successful

Table Of Contents

Previous topic

Clio API