maton hubspot associations create

maton hubspot associations create [flags]

Link two HubSpot CRM records via the v4 associations API.

Without –type, uses the default (built-in) association for the object pair (PUT /crm/v4/objects/{from}/{id}/associations/default/{to}/{id}).

With –type, creates a typed association (PUT /crm/v4/objects/{from}/{id}/associations/{to}/{id} with an associationCategory + associationTypeId body).

Options

--category <string> (default "HUBSPOT_DEFINED")
Association category: HUBSPOT_DEFINED or USER_DEFINED
--connection <string>
Connection ID to route through (Maton-Connection header)
--dry-run
Print the request that would be sent without executing it
--format <string>
Output format: 'json' (default) or 'text' on supported commands
--from <string>
Source object as type:id (required, e.g. contacts:12345)
-q, --jq <expression>
Filter JSON output using a jq expression
--paginate
Follow next_cursor and concatenate all pages (list commands only)
--template <string>
Format JSON output using a Go template; see "maton help formatting"
--to <string>
Target object as type:id (required, e.g. companies:67890)
--type <int> (default 0)
associationTypeId (omit to use the default association for this object pair)

Options inherited from parent commands

-p, --profile <string>
Profile to use for this invocation (overrides the active profile; also reads MATON_PROFILE)

Examples

$ maton hubspot associations create --from contacts:12345 --to companies:67890
$ maton hubspot associations create --from contacts:12345 --to deals:99999 --type 4

See also