Skip to content

Workspace API

Follow

Follow and unfollow accounts and projects with POST /workspace/follow and /workspace/unfollow, and read follow status.

Following an account or project adds it to the workspace’s Following View for its dataset: “Following · Projects” or “Following · Accounts”. Each is a watched Static View, created the first time anyone in the workspace follows a record of that kind and favorited for the member who created it. Following is shared by the workspace. Every route costs 0 credits and works with a user JWT or an API key.

Any other Static View can be watched too (watched: true on Upsert View), so a record is followed when it is in at least one watched View. Unfollow removes a record from the Following View only; watched Views you made keep it, and the response names them.

Follow or unfollow

Endpoints
POST https://api.parcelengineering.com/api/v1/workspace/follow
POST https://api.parcelengineering.com/api/v1/workspace/follow/batch
POST https://api.parcelengineering.com/api/v1/workspace/unfollow
POST https://api.parcelengineering.com/api/v1/workspace/unfollow/batch

Body (single)

FieldTypeRequiredDescription
datasetproject | accountYesContacts cannot be followed.
record_idstring (UUID)YesThe project or account id.

The batch routes take { "inputs": [ { "dataset", "record_id" }, ... ] } with 1-100 items; accounts and projects may mix. Results come back per item in input order, and one failure never aborts the rest. See Batch Writes.

Example

Follow a project
curl -X POST "https://api.parcelengineering.com/api/v1/workspace/follow" \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"dataset":"project","record_id":"p1e2f3a4-0001-4b7c-9e5d-000000000001"}'

Response

Response
{
"data": {
"view": {
"id": "a1b2c3d4-0001-4e8d-bf6a-000000000009",
"dataset": "project",
"view_type": "static",
"name": "Following · Projects",
"watched": true,
"system_kind": "following_projects"
},
"results": [
{ "index": 0, "record_id": "p1e2f3a4-0001-4b7c-9e5d-000000000001", "status": "ok" }
],
"changed": 1
},
"metadata": { "credits": 0, "succeeded": 1, "failed": 0 }
}

The View object is abbreviated here; it is the full View resource. Following is idempotent: a record that is already followed answers ok, and changed counts only the records this call followed (or, for unfollow, removed). A batch response carries data.views (the Following Views it touched) and per-item results that echo dataset. Unfollow responses add still_followed: each record that stays followed through another watched View, with those Views. Unfollow answers view: null when the workspace never followed anything of that kind.

Errors

CodeStatusWhen
bad_request400dataset is not project or account, or a batch item is malformed (per item).
record_not_found200 (per item)The id is not a project or account.
view_name_conflict409One of your Views already uses the name “Following · Projects” or “Following · Accounts”. Rename it, then follow again.

Follow status

Endpoint
GET https://api.parcelengineering.com/api/v1/workspace/follow/status?dataset=project&record_id={id}

Lists every watched View the record is in, the Following View first. followed is true when there is at least one; system_view_id is the Following View when the record is in it.

Response
{
"data": {
"followed": true,
"system_view_id": "a1b2c3d4-0001-4e8d-bf6a-000000000009",
"via": [
{ "view_id": "a1b2c3d4-0001-4e8d-bf6a-000000000009", "name": "Following · Projects", "system_kind": "following_projects" },
{ "view_id": "a1b2c3d4-0001-4e8d-bf6a-000000000002", "name": "Open Deals", "system_kind": null }
]
},
"metadata": { "credits": 0 }
}