Skip to main content

Upsert account

POST 

/accounts/_upsert

Upsert an account. If the account matching the given criteria does not exist, it will be created. If the account does exist, it will be updated. Upsert by name is supported for Outreach, Salesloft, and Apollo. Upsert by domain is supported for Outreach and Salesloft. If both are specified, it will perform an AND operation.

Request

Header Parameters

    x-customer-id stringrequired

    The customer ID that uniquely identifies the customer in your application

    Example: my-customer-1
    x-provider-name stringrequired

    The provider name

    Example: salesforce

Body

required
    record objectrequired
    name stringnullable
    domain stringnullable
    owner_id stringnullable
    account_id stringnullable
    custom_fields object

    Custom properties to be inserted that are not covered by the common object. Object keys must match exactly to the corresponding provider API.

    property name* any

    Custom properties to be inserted that are not covered by the common object. Object keys must match exactly to the corresponding provider API.

    upsert_on objectrequired

    The criteria to upsert on. If both name and domain are specified, it would perform an AND operation. If more than one account is found that matches, then an error will be thrown.

    name string

    The name of the account to upsert on. Supported for Outreach, Salesloft, and Apollo.

    domain string

    The domain of the account to upsert on. Only supported for Outreach and Salesloft.

Responses

Account upserted

Schema
    errors object[]
  • Array [
  • id stringrequired

    A unique identifier for the instance of the error. Provide this to support when contacting Supaglue.

    detail stringrequired

    A detailed description of the error.

    problem_type stringdeprecated

    The Supaglue error code associated with the error.

    title stringrequired

    A brief description of the error. The schema and type of message will vary by Provider.

    code stringrequired

    The Supaglue error code associated with the error.

    status stringrequired

    The HTTP status code associated with the error.

    meta objectrequired

    Additional metadata about the error.

    cause object

    The cause of the error. Usually the underlying error from the remote Provider.

    origin stringrequired

    Possible values: [remote-provider, supaglue]

    The origin of the error.

    application_name string

    The name of the application that generated the error.

    property name* any

    Additional metadata about the error.

  • ]
  • record object
    id stringrequired
    warnings object[]
  • Array [
  • detail string
    problem_type string
    title string
  • ]
Loading...