CRM

On this page

HubSpot

A test-only CRM v3 subset for contacts, companies, deals, search and record associations. Create HubSpot under Systems → CRM, alongside Salesforce. No HubSpot portal, real customer, workflow or notification is changed.

Testlie is independent of HubSpot. The name identifies compatibility, not affiliation or certification.

Connect

Replace https://api.hubapi.com with your system's base URL. Send Authorization: Bearer <accessToken> using its generated test private-app token. Rotation immediately invalidates the previous token. Public-app OAuth consent, scopes and token endpoints are unsupported.

CRM records

Use /crm/v3/objects/contacts, /companies or /deals:

  • POST { "properties": { ... } } creates a record (201).
  • GET the collection lists records; GET /{id} reads one.
  • PATCH /{id} with properties updates supported values.
  • DELETE /{id} archives the test record (204); subsequent reads return 404. Restoring/reading archived records is unsupported.

Contact properties: email, firstname, lastname, phone, mobilephone, company, website, jobtitle, address, city, state, country, zip. Provide email, first name or last name. Duplicate contact emails are refused on sequential create/update. GET/PATCH a contact by URL-encoded email with ?idProperty=email.

Company properties: required name; optional domain, industry, phone, city, state, country, description, website.

Deal properties: required dealname, dealstage; optional amount, pipeline, closedate, description. Use the default pipeline. Amounts are nonnegative decimal strings. Supported stages are appointmentscheduled, qualifiedtobuy, presentationscheduled, decisionmakerboughtin, contractsent, closedwon, closedlost. GET /crm/v3/pipelines/deals reads this fixed fixture. Custom pipelines, property definitions, lifecycle-stage transitions, owners and workflows are unsupported.

Values are strings up to 4,000 characters. Unknown properties and non-string values are rejected. Creation/update responses include supported stored properties and timestamps. Reads select the provider's default properties; use comma-separated properties to select additional supported fields. hs_object_id, createdate, lastmodifieddate and hs_lastmodifieddate are read-only.

Search and pagination

POST /crm/v3/objects/{type}/search:

json
{
  "filterGroups": [{ "filters": [{ "propertyName": "firstname", "operator": "EQ", "value": "Sam" }] }],
  "properties": ["firstname", "email"],
  "limit": 10
}

Five groups of up to six filters are supported. Groups are ORed; filters within a group are ANDed. Operators: EQ, NEQ, IN, NOT_IN, HAS_PROPERTY, NOT_HAS_PROPERTY, CONTAINS_TOKEN. IN/NOT_IN use values (up to 100 strings). Equality is literal and case-sensitive; CONTAINS_TOKEN matches a complete whitespace-separated token case-insensitively, without wildcards. query searches string values case-insensitively (255 characters maximum). sorts accepts one property string with optional - for descending; ordering is lexical.

List/search limit is 1–100 (default 10). Return the supplied paging.next.after value on the next request. Keep search/filter/sort options unchanged when paging; search links are informational and searches still require POST. Cursors reference the next record ID, so fixture edits may change pagination. No cross-record snapshot or full-text index is simulated.

Associations

For existing records, PUT or DELETE /crm/v3/objects/{from}/{id}/associations/{to}/{id}/{associationTypeId}. Supported directed primary types: contact→company 1, company→contact 2, deal→contact 3, contact→deal 4, deal→company 5, company→deal 6.

Associations are visible in both directions. GET /{id}/associations/{to} returns IDs/types; add ?associations=contacts,companies to record/list reads to include them. Archived targets are omitted. Creation-time associations, v4, custom labels, batch operations, association paging and more than 500 stored pairs are unsupported.

Limits and scenarios

At most 500 active records per type, with the shared store scanning the newest 1,000 record objects across types; requests are limited to 128 KB. Keep fixtures small. Concurrent updates use compare-and-swap and return a conflict instead of silently overwriting another change. Cross-record uniqueness/association operations are not transactional.

Rate-limit, server-error and delay scenarios apply. Decline rejects creates, updates and association changes. There are no native webhooks, automation or interactive Require action flows in this subset. Captured calls and stored objects are available through the existing Testlie UI/API.

Contracts: CRM contacts v3, CRM search and associations.