Skip to content

Contact activity

GET
https://api.getsitecontrol.com/v1/sites/{site_id}/contacts/{contact_id}/activity
curl --request GET \
--url 'https://api.getsitecontrol.com/v1/sites/1/contacts/1/activity?limit=50&order=oldest' \
--header 'Authorization: Bearer <token>'

Events of one contact, oldest first (order=newest for the latest first): widget events, e-mails received, bounced and unsubscribed, clicks, automation runs, the e-mail confirmation and the creation of the contact. Call it to see what a contact did and received. E-mail opens are not listed.

For e-mail events source_id is the broadcast or the automation that sent the message and source_name is its subject. The URL of a click is given without its query string. response_id is the form submission for get_response.

A page holds up to limit events; while next_cursor is set, pass it as cursor for the next page. occurred_since includes events at that moment. Merge repeated reads by id: occurred_at is given to the second, so it does not order events within one second; the cursor keeps the exact order.

FieldDescription
site_id
required
Site Id
integer
contact_id
required
Contact Id

Contact id from list_contacts

integer

Contact id from list_contacts

FieldDescription
cursor
Cursor

next_cursor of the previous page, sent with the same order; omit for the first

string

next_cursor of the previous page, sent with the same order; omit for the first

limit
Limit

Events per page

integer
default: 50 >= 1 <= 100

Events per page

order

Order of the events: oldest first (default) or newest first

string
Allowed values: oldest newest

Order of the events: oldest first (default) or newest first

occurred_since
Occurred Since

Only events at or after this moment; without an offset, taken as UTC; a plain date means its start

string format: date-time

Only events at or after this moment; without an offset, taken as UTC; a plain date means its start

type
Type

Only events of these types; repeat for several. contactCreate and emailConfirmed are the contact’s own, widget* widget events, email* e-mails and their clicks, automationStart and automationEnd the start and the end of automation runs

Array<string>
<= 50 items
Allowed values: contactCreate emailConfirmed widgetAddToCart widgetApplyCoupon widgetCopyToClipboard widgetOpenUrl widgetShow widgetShowWidget widgetSubmit emailReceive emailBounce emailUnsubscribe emailClick emailViewProduct emailContinueCheckout emailViewOrder emailBuyNow emailAddToCart emailApplyDiscount automationStart automationEnd

Only events of these types; repeat for several. contactCreate and emailConfirmed are the contact’s own, widget* widget events, email* e-mails and their clicks, automationStart and automationEnd the start and the end of automation runs

Successful Response

Media typeapplication/json
ContactActivityPage

One page of a list; next_cursor is null on the last page.

object
FieldDescription
items
required
Items
Array<object>
ContactActivity
object
FieldDescription
id
required
Id

Stable across pages: the same event keeps its id

string
type
required
Type

One of: contactCreate, emailConfirmed, widgetAddToCart, widgetApplyCoupon, widgetCopyToClipboard, widgetOpenUrl, widgetShow, widgetShowWidget, widgetSubmit, emailReceive, emailBounce, emailUnsubscribe, emailClick, emailViewProduct, emailContinueCheckout, emailViewOrder, emailBuyNow, emailAddToCart, emailApplyDiscount, automationStart, automationEnd

string
occurred_at
required
Occurred At

When it happened, UTC

string format: date-time
source_type
required
Source Type

What the event came from: contact the contact itself (its creation, the e-mail confirmation), widget a widget, broadcast a broadcast, automation an automation

string
Allowed values: contact widget broadcast automation
source_id
Source Id

The widget, the broadcast or the automation; for e-mails the broadcast or the automation that sent it

integer
nullable
source_name
Source Name

The widget or automation name; for e-mails the subject of the message

string
nullable
label
Label

The button or link of a click, without the query string of its URL; the link, coupon or copied text of a widget event

string
nullable
response_id
Response Id

The form submission for get_response, when it is listed there

integer
nullable
trigger_type

For automationStart and automationEnd: the trigger of the automation as it is now, as in get_automation

string
Allowed values: widget_submit manual email_click webhook segment_join shopify_order_paid shopify_order_fulfilled shopify_checkout_abandoned shopify_customer_winback shopify_customer_subscribed other
next_cursor
Next Cursor
string
nullable

Example

{
"items": [
{
"source_type": "contact",
"trigger_type": "widget_submit"
}
]
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Unsupported GSC-Version

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Missing or invalid API key or access token

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

WWW-Authenticate
string

Authentication scheme: Bearer

Access denied

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

contact_not_found: no contact with this id on the site, or it is deleted

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Media typeapplication/problem+json

invalid_cursor: cursor was not issued here or was issued for another order. validation_failed: a parameter is invalid

Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

rate_limited: a request limit is spent; this request also spends the heavy request limit

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Retry-After
integer

Seconds until the bucket refills

Media typeapplication/problem+json

temporarily_unavailable: the request took too long, or limits or idempotency keys cannot be enforced; narrow the filters or retry later

Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds