Skip to content

Workspace API

Upsert Account

Add or update a workspace account with POST /workspace/accounts/upsert.

Endpoint
POST https://api.parcelengineering.com/api/v1/workspace/accounts/upsert

Adds an account to your workspace or updates its custom fields if it is already saved. Accepts either an explicit account UUID or a domain-based match to identify the target account.

Upsert costs 0 credits.

Request body

Provide exactly one of account_id or match to identify the account. All annotation fields are optional.

FieldTypeRequiredDescription
account_idstring (UUID)One of account_id or matchThe UUID from a Data API account record.
matchobjectOne of account_id or matchDomain-based lookup. Provide { "domain": "example.com" }.
workspace_statusstring | nullNoYour workflow state (any string). null clears the value.
notesstring | nullNoFree-text notes. null clears the value.
tagsstring[]NoFull-replace tag set. Sending [] clears all tags.

Match resolution rules

When using match: { domain }, Parcel looks up the domain against the canonical account registry:

Domain matchesResult
Exactly 1 accountUpsert proceeds
0 accounts404 not_found
More than 1 account409 ambiguous_match

A 409 ambiguous_match means the domain is associated with more than one canonical account. Resolve the ambiguity by fetching the candidate accounts from the Data API and providing an explicit account_id instead.

Partial update semantics

  • Omitted fields are left unchanged. You can update workspace_status without touching notes or tags.
  • Explicit null clears a field. Sending "notes": null removes the existing note.
  • tags is full-replace. Sending "tags": ["boston"] replaces the entire tag set, not merges it with the existing one.

Example

Upsert account by domain
curl -X POST https://api.parcelengineering.com/api/v1/workspace/accounts/upsert \
-H "Authorization: Bearer pcl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"match": { "domain": "acmedev.com" },
"workspace_status": "active",
"notes": "Met at BuildBoston 2025",
"tags": ["boston", "developer"]
}'

Response

Response
{
"data": {
"account_id": "8a1f3c2e-0001-4b7d-9e5a-000000000001",
"workspace_status": "active",
"notes": "Met at BuildBoston 2025",
"tags": ["boston", "developer"],
"updated_at": "2026-10-28T12:00:00.000Z"
},
"metadata": { "credits": 0 }
}

Upsert costs 0 credits. The response is your overlay row after the write. An account’s ICP Score comes from the workspace’s scoring criteria, not from the overlay; read it with Get an Account.