The Collaborations API provides a simple interface to manage collaborations. The API allows you to create and delete your collaborations. You can retrieve a single collaboration as well as list of all collaborations.

You can assign as many collaborations as you want to any of the resources listed below:

JSON format

NameTypeRead-onlyDescription
idnumbertrueUnique identifier of the collaboration.
creator_idnumbertrueUnique identifier of the user that created the collaboration.
resource_typestringfalseType name of the resource the collaboration is attached to. Possible values: lead, contact, sales_account, deal
resource_idnumberfalseUnique identifier of the resource the collaboration is attached to.
collaborator_idnumberfalseUnique identifier of the collaborator.
created_atstringtrueDate and time of creation in UTC (ISO8601 format).
updated_atstringtrueDate and time of the last update in UTC (ISO8601 format).

Retrieve all Collaborations

GET /v2/collaborations

Returns all collaborations available to the user, according to the parameters provided.

Parameters

NameTypeInRequiredDescription
pagenumberQueryfalsePage number to start from. Page numbering starts at 1, and omitting the page parameter will return the first page. e.g. ?page=2
per_pagenumberQueryfalseNumber of records to return per page. Default limit is 25 and the maximum number that can be returned is 100. e.g. ?per_page=20
idsnumberQueryfalseComma-separated list of call IDs to be returned in request. e.g. ?ids=1,2,3
includesstringQueryfalseComma-separated list of one or more resources related to the collaboration. Not supported at the moment.
sort_bystringQueryfalseA field to sort by. Default ordering is ascending. If you want to change the sort ordering to descending, append :desc to the field e.g. sort_by=resource_type:desc.
creator_idnumberQueryfalseUnique identifier of the user. Returns all collaborations created by the user. e.g. ?creator_id=1
resource_idnumberQueryfalseUnique identifier of the resource calls are attached to. e.g. ?resource_id=7
resource_typenumberQueryfalseName of the type of resource calls are attached to. Possible valies: lead, contact, deal, sales_account. e.g. ?resource_type=lead

Allowed for

  • Agents

Using curl

curl -v -X GET https://api.getbase.com/v2/collaborations?resource_type=deals \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "items": [    {      "data": {        "id": 1,        "creator_id": 1,        "resource_type": "lead",        "resource_id": 1,        "collaborator_id": 2,        "created_at": "2014-08-27T16:32:56Z",        "updated_at": "2014-08-27T17:32:56Z"      },      "meta": {        "type": "collaboration"      }    }  ],  "meta": {    "type": "collection",    "count": 1,    "links": {      "self": "http://api.getbase.com/v2/collaborations.json"    }  }}

Create a Collaboration

POST /v2/collaborations

Create a new collaboration and associate it with one of the resources listed below:

Parameters

NameTypeInRequiredDescription
collaborator_idnumberBodytruee.g. "resource_type": "lead"
resource_idnumberBodytruee.g. "resource_id": "1"
resource_typenumberBodytruee.g. "collaborator_id": "2"

Allowed for

  • Agents

Using cURL

curl -v -X POST https://api.getbase.com/v2/collaborations \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN" \-d '{  "data": {    "resource_type": "lead",    "resource_id": 1,    "collaborator_id": 2  },  "meta": {    "type": "collaboration"  }}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 1,    "creator_id": 1,    "resource_type": "lead",    "resource_id": 1,    "collaborator_id": 2,    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T17:32:56Z"  },  "meta": {    "type": "collaboration"  }}

Retrieve a single Collaboration

GET /v2/collaborations/:id

Returns a single collaboration available to the user, according to the unique collaboration ID provided. If the collaboration ID does not exist, this request will return an error.

Parameters

NameTypeInRequiredDescription
idnumberQuerytrueUnique identifier of the collaboration.

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/collaborations/1 \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 1,    "creator_id": 1,    "resource_type": "lead",    "resource_id": 1,    "collaborator_id": 2,    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T17:32:56Z"  },  "meta": {    "type": "collaboration"  }}

Delete a Collaboration

DELETE /v2/collaborations/:id

Delete an existing collaboration. If the collaboration ID does not exist, this request will return an error. This operation cannot be undone.

Parameters

NameTypeInRequiredDescription
idnumberQuerytrueUnique identifier of the collaboration.

Using cURL

curl -v -X DELETE https://api.getbase.com/v2/collaborations/1 \-H "Authorization: Bearer $ACCESS_TOKEN"

Example Response

HTTP/1.1 204 No Content