Create or upsert a person
Adds a Person to a Company.
- Name the Company with
accountIdoraccountExternalId. - A Person who already exists at a different Company gets a new record at this one. Matching is by
externalId, thenemail. That does not count against your People limit. - A Person who already exists at this Company fails with
409, unless you sendupsert: true. Then the record is updated and returned with200, andtraitsare merged. - A new Person counts against your People limit (
402when it is reached). - With
accountExternalId, an unknown Company is created for you and counts against your Company limit. It fires thecompany.createdwebhook withsourceset toapi. It does not start Company-created Flows. - A new Person fires
contact.created, and an upsert that updates a Person firescontact.updated, both withsourceset toapi.
This is the same operation as POST /contacts.
Scope: write:contacts
Authorizations
Bearer API key. Secret server keys start with gt_live_; client-safe browser keys start with gt_pub_ (write-only, origin-pinned). Create and scope keys in Settings → API Keys.
Body
- Option 1
- Option 2
Create a Person at a Company, or with upsert: true create or update. Name the Company with accountId or accountExternalId. name is required unless upsert is true and an email is supplied, or the Person already exists at another Company.
The Company id. It must belong to your workspace.
The Company externalId, used when you do not hold the Company id. If no Company has this externalId, GainTrace creates one, and that counts against your Company limit. The new Company fires the company.created webhook but does not start Company-created Flows. Ignored when accountId is a string.
100The name for a Company created through accountExternalId. Defaults to the externalId.
When true, a Person who already exists at this Company is updated and returned with 200, instead of failing with 409. traits are merged into the stored traits, not replaced.
1 - 25525525550100decision_maker, champion, end_user, billing, influencer, executive_sponsor, technical, other 20002000Response
The Person already existed at this Company and upsert was true. The updated record.
One Person at one Company. A Person who belongs to several Companies is returned as one record per Company, each with its own id and accountId.