connectionId always refers to a UUID that PartnerOS assigns when you authorize a CRM integration through the web application.
Get connection status
Returns the current health and metadata of a CRM connection, along with a summary of the cached schema discovery state.GET /api/integrations/{connectionId}/status
Path parameters
string
required
UUID of the CRM connection.
Response fields
string
required
UUID of the connection.
string
required
CRM platform:
"salesforce" or "hubspot".string
required
Connection status:
"active", "error", "disconnected", or "reauth_required".string
For Salesforce, the instance URL (e.g.
https://myorg.my.salesforce.com). Null for HubSpot.string
ISO 8601 timestamp of the most recent successful schema sync.
string
ISO 8601 timestamp of the most recent sync error, if any.
string
Human-readable error message from the most recent failure.
string
ISO 8601 timestamp when the connection was first created.
object
Example
Get CRM schema
Returns the cached field schema for a connection. Use the optionalobjectType query parameter to fetch detailed field metadata for a single CRM object (e.g. Opportunity or Account). Omit it to get a summary listing all discovered objects.
GET /api/integrations/{connectionId}/schema
Responses from this endpoint carry a Cache-Control: private, max-age=60 header. Clients may cache them for up to 60 seconds.
Path parameters
string
required
UUID of the CRM connection.
Query parameters
string
CRM object type name (e.g.
"Opportunity", "Account", "Contact"). When omitted, returns a summary of all cached objects.Response — all objects (no objectType)
object[]
required
Array of object summaries.
Response — single object (with objectType)
string
required
CRM object name.
object[]
required
Full field metadata array.
string
required
SHA-256 hash of the field list.
string
required
ISO 8601 timestamp of discovery.
string
required
ISO 8601 timestamp of cache expiry.
boolean
required
Whether the cache is stale.
Example
Refresh CRM schema
Triggers a live schema discovery from the CRM and updates the cache. Use this endpoint when you know the CRM schema has changed or the cached schema is expired. If the connection’s OAuth token has expired, the server automatically attempts a token refresh before retrying the schema pull.POST /api/integrations/{connectionId}/schema/refresh
Path parameters
string
required
UUID of the CRM connection.
Response fields
boolean
required
true when refresh completed successfully.object[]
required
Updated list of discovered object types and their field counts.
number
required
Total number of fields discovered across all objects.
object[]
Any schema drift events detected — fields that were added, removed, or changed since the previous discovery.
Example
Get AI field mapping suggestions
Uses AI-assisted vector similarity to suggest PartnerOS-to-CRM field mappings for a given object pair. You must have a cached schema for the specified CRM object before calling this endpoint. If no embeddings exist for the CRM fields yet, they are generated automatically before the mapping runs.POST /api/integrations/{connectionId}/mapping/ai-suggest
Path parameters
string
required
UUID of the CRM connection.
Body parameters
string
required
A string identifying the PartnerOS object and CRM object to map, separated by
--. For example: "deal_registration--Opportunity" or "partner--Account". Valid PartnerOS object types include "deal_registration" and "partner".Response
Returns the AI mapping result including suggested field pairs, confidence scores, and recommended sync directions.object[]
Array of field mapping suggestions.
Example
Run a schema refresh (
POST /api/integrations/{connectionId}/schema/refresh) before requesting AI suggestions if the schema has not been discovered yet or is expired.Disconnect a CRM
Marks a CRM connection as disconnected and writes an audit log entry. The connection record is retained for historical reference; no data is deleted.POST /api/integrations/{connectionId}/disconnect
Path parameters
string
required
UUID of the CRM connection to disconnect.
Response fields
boolean
required
true when the connection was marked as disconnected.