Upsert an account
POST/v2/account_upserts
Upserts an account record. The upsert_key dictates how the upsert will be performed. The create and update behavior is exactly the same as the individual create and update endpoints.
Request
- multipart/form-data
Body
required
Name of the parameter to upsert on. The field must be provided in the input parameters, or the request will fail. The request will also fail if there are multiple records matched by the upsert field.
If upsert_key is not provided, this endpoint will not update an existing record.
Valid options are: id, crm_id, domain. If crm_id is provided, then a valid crm_id_type must be provided, as documented for the account create and update endpoints.
ID of the account to update. Used if the upsert_key=id. When id and another upsert_key are provided, the request will fail if the upsert record id and id parameter don't match.
Account Full Name
Website domain, not a fully qualified URI
Conversational name of the Account
Description
Phone number without formatting
Website
Full LinkedIn url
Twitter handle, with @
Street name and number
City
State
Postal code
Country
Time locale
Industry
Type of the Account's company
Date or year of founding
Estimated revenue range
Estimated number of people in employment
Whether this company can not be contacted. Values are either true or false. Setting this to true will remove all associated people from all active communications
Custom fields are defined by the user's team. Only fields with values are presented in the API.
All tags applied to this Account
ID of the User that owns this Account
ID of the CompanyStage assigned to this Account
ID of the Account Tier for this Account
The CRM that the provided crm_id is for. Must be one of: salesforce
Requires Salesforce.
ID of the person in your external CRM. You must provide a crm_id_type if this is included.
Validations will be applied to the crm_id depending on the crm_id_type. A "salesforce" ID must be exactly 18 characters. A "salesforce" ID must be either an Account (001) object. The type will be validated using the 18 character ID.
This field can only be used if your application or API key has the "account:set_crm_id" scope.
Responses
- 200
Success
- application/json
- Schema
- Example (from schema)
Schema
The type of upsert. One of: create, update
account object
ID of Account
Datetime of when the Account was created
Datetime of when the Account was last updated
Datetime of when the Account was archived, if archived
Account Full Name
Website domain, not a fully qualified URI
Conversational name of the Account
Description
Phone number without formatting
Website
Full LinkedIn url
Twitter handle, with @
Street name and number
City
State
Postal code
Country
Time locale
Industry
Type of the Account's company
Date or year of founding
Estimated revenue range
Estimated number of people in employment
CRM ID
CRM url
CRM object type
Mapped owner field from the CRM
Datetime this Account was last contacted
The type of the last touch to this Account. Can be call, email, other
Whether this company has opted out of communications. Do not contact someone at this company when this is set to true
Custom fields are defined by the user's team. Only fields with values are presented in the API.
Filters by accounts matching all given user relationship fields, _is_null or _unmapped can be passed to filter accounts with null or unmapped user relationship values
All tags applied to this Account
counts object
Number of people in SalesLoft associated with this Account
owner object
User that is marked as the owner of this Account
creator object
User that created this Account
last_contacted_by object
User that last contacted this Account
last_contacted_person object
Person who was last contacted at this Account
company_stage object
Company Stage that this Account has set. This is referred to as Account Stage in other parts of the API. When sorting by account_stage, the company stage's order is used
account_tier object
Account Tier that this Account has set
{
"upsert_type": "string",
"account": {
"id": 1,
"created_at": "2024-01-01T00:00:00.000000+00:00",
"updated_at": "2024-01-01T00:00:00.000000+00:00",
"archived_at": "2024-01-01T00:00:00.000000+00:00",
"name": "Hogwarts School of Witchcraft and Wizardry",
"domain": "salesloft.com",
"conversational_name": "Hogwarts",
"description": "British school of magic for students",
"phone": "+1 444 555 6666",
"website": "https://salesloft.com",
"linkedin_url": "https://www.linkedin.com/company/2296178/",
"twitter_handle": "@kyleporter",
"street": "4 Picket Drive",
"city": "Dufftown",
"state": "Mortlach",
"postal_code": "55555",
"country": "Scotland",
"locale": "Europe/London",
"industry": "Education",
"company_type": "Private",
"founded": "March 1st, 1820",
"revenue_range": "1,000,000-2,000,000",
"size": "1500",
"crm_id": "003i000001mnhpD",
"crm_url": "https://na15.salesforce.com/003i000001mnhpD",
"crm_object_type": "account",
"owner_crm_id": "003i000001mnhpD",
"last_contacted_at": "2024-01-01T00:00:00.000000+00:00",
"last_contacted_type": "call",
"do_not_contact": true,
"custom_fields": {
"MyField": "A Value",
"Other": "Field"
},
"user_relationships": {
"bff": "0037h00000d78aAAAQ",
"Other": "_is_null"
},
"tags": [
"7-23-2017",
"dreamforce"
],
"counts": {
"people": 15
},
"owner": {
"id": 1,
"_href": "https://api.salesloft.com/v2/users/1"
},
"creator": {
"id": 1,
"_href": "https://api.salesloft.com/v2/users/1"
},
"last_contacted_by": {
"id": 1,
"_href": "https://api.salesloft.com/v2/users/1"
},
"last_contacted_person": {
"id": 1,
"_href": "https://api.salesloft.com/v2/people/1"
},
"company_stage": {
"id": 1,
"_href": "https://api.salesloft.com/v2/account_stages/1"
},
"account_tier": {
"id": 1,
"_href": "https://api.salesloft.com/v2/account_tiers/1"
}
}
}