Skip to content

Preview a Google Contacts import

POST
/api/v1/google-contacts/import/preview
curl --request POST \
--url https://digize.com/api/v1/google-contacts/import/preview \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>'

Counts, in the background, how many of the Google account’s contacts an import would add, merge into contacts the duplicate rule matches, or skip, and which contact groups become tags. Changes nothing.

Needs the crm:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69

Done

Media typeapplication/json
object
account
required

The Google account the import reads.

string | null
connected
required

Whether Google Contacts is connected.

boolean
running
required
Any of:
object
mode
required
string
Allowed values: preview import
startedAt
required
string format: date-time
done
required

People read so far.

number
total
required
number | null
preview
required
Any of:
object
at
required
string format: date-time
people
required
number
add
required

New contacts it would add.

number
merge
required

People the duplicate rule matches to a contact already here.

number
skip
required
number
groups
required

Contact groups that become tags, the biggest first.

Array<object>
object
name
required
string
people
required
number
lastImport
required
Any of:
object
at
required
string format: date-time
full
required

Whether it read every contact, rather than what changed.

boolean
people
required

People read, less those deleted in Google.

number
created
required
number
updated
required
number
unchanged
required
number
skipped
required

People with no name, email or phone number to keep.

number
importedAt
required
Any of:
string format: date-time
error
required

Why the last run stopped.

string | null

Example

{
"running": {
"mode": "preview"
}
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}