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
The customer ID that uniquely identifies the customer in your application
The provider name
- application/json
Body
required
record objectrequired
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.
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.
The name of the account to upsert on. Supported for Outreach, Salesloft, and Apollo.
The domain of the account to upsert on. Only supported for Outreach and Salesloft.
Responses
- 201
Account upserted
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- ]
errors object[]
A unique identifier for the instance of the error. Provide this to support when contacting Supaglue.
A detailed description of the error.
The Supaglue error code associated with the error.
A brief description of the error. The schema and type of message will vary by Provider.
The Supaglue error code associated with the error.
The HTTP status code associated with the error.
meta objectrequired
Additional metadata about the error.
The cause of the error. Usually the underlying error from the remote Provider.
Possible values: [remote-provider
, supaglue
]
The origin of the error.
The name of the application that generated the error.
Additional metadata about the error.
record object
warnings object[]
{
"errors": [
[
{
"meta": {
"cause": {
"code": 400,
"body": {
"status": "error",
"message": "Property values were not valid: [{\"isValid\":false,\"message\":\"Property \\\"__about_us\\\" does not exist\",\"error\":\"PROPERTY_DOESNT_EXIST\",\"name\":\"__about_us\",\"localizedErrorMessage\":\"Property \\\"__about_us\\\" does not exist\"}]",
"correlationId": "ac94252c-90b5-45d2-ad1d-9a9f7651d7d2",
"category": "VALIDATION_ERROR"
},
"headers": {
"access-control-allow-credentials": "false",
"cf-cache-status": "DYNAMIC",
"cf-ray": "8053d17b9dae9664-SJC",
"connection": "close",
"content-length": "361",
"content-type": "application/json;charset=utf-8",
"date": "Mon, 11 Sep 2023 23:51:22 GMT",
"nel": "{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}",
"report-to": "{\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v3?s=FgwuXObO%2Fz6ahUJKsxjDLaXTWjooJ8tB0w4%2B%2BKaulGStx0FGkn1PoJoOx2KrFMfihzNdfAqikq7CmgbdlmwKB8hkmp3eTb68qpg10LXFlRgiSqRhbWM7yYSfo8CXmPBc\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
"server": "cloudflare",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"vary": "origin, Accept-Encoding",
"x-content-type-options": "nosniff",
"x-envoy-upstream-service-time": "91",
"x-evy-trace-listener": "listener_https",
"x-evy-trace-route-configuration": "listener_https/all",
"x-evy-trace-route-service-name": "envoyset-translator",
"x-evy-trace-served-by-pod": "iad02/hubapi-td/envoy-proxy-6c94986c56-9xsh2",
"x-evy-trace-virtual-host": "all",
"x-hubspot-correlation-id": "ac94252c-90b5-45d2-ad1d-9a9f7651d7d2",
"x-hubspot-ratelimit-interval-milliseconds": "10000",
"x-hubspot-ratelimit-max": "100",
"x-hubspot-ratelimit-remaining": "99",
"x-hubspot-ratelimit-secondly": "10",
"x-hubspot-ratelimit-secondly-remaining": "9",
"x-request-id": "ac94252c-90b5-45d2-ad1d-9a9f7651d7d2",
"x-trace": "2B1B4386362759B6A4C34802AD168B803DDC1BE770000000000000000000"
}
}
},
"detail": "Property values were not valid: [{\"isValid\":false,\"message\":\"Property \\\"__about_us\\\" does not exist\",\"error\":\"PROPERTY_DOESNT_EXIST\",\"name\":\"__about_us\",\"localizedErrorMessage\":\"Property \\\"__about_us\\\" does not exist\"}]",
"problem_type": "MISSING_REQUIRED_FIELD",
"title": "Property values were not valid\n",
"code": "MISSING_REQUIRED_FIELD",
"status": "400",
"id": "9366efb4-8fb1-4a28-bfb0-8d6f9cc6b5c5"
}
]
],
"record": {
"id": "string"
},
"warnings": [
{
"detail": "string",
"problem_type": "string",
"title": "string"
}
]
}