Update certain configurable attributes of a sync. Note that though this endpoint is a PATCH
and top level attributes respect patch semantics, this does not apply to nested objects. Any nested objects that are changed must be sent in full, including any unchanged values.
curl --request PATCH \
--url https://app.getcensus.com/api/v1/syncs/{sync_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"label": "New Signups to Leads",
"operation": "mirror",
"destination_attributes": {
"connection_id": 15,
"object": "user_data"
},
"alert_attributes": [
{
"type": "FailureAlertConfiguration",
"send_for": "first_time",
"should_send_recovery": true,
"options": null
},
{
"type": "InvalidRecordPercentAlertConfiguration",
"send_for": "every_time",
"should_send_recovery": false,
"options": {
"threshold": 10
}
}
],
"mappings": [
{
"from": {
"type": "column",
"data": "hashed_email"
},
"to": "user_identifier.hashed_email_PREHASHED",
"is_primary_identifier": true
},
{
"from": {
"type": "column",
"data": "list_id"
},
"to": "list_id",
"lookup_object": "user_list",
"lookup_field": "name"
},
{
"from": {
"type": "constant_value",
"data": {
"value": "cohort_1",
"basic_type": "text"
}
},
"to": "cohort"
}
],
"advanced_configuration": {
"data_source_country": "US, GB",
"bulk_id_lookup": true
},
"mode": {
"type": "triggered",
"triggers": {
"schedule": {
"frequency": "daily",
"hour": 10,
"minute": 30
}
}
},
"paused": false,
"field_behavior": "sync_all_properties",
"field_normalization": "snake_case",
"field_order": "alphabetical_column_name",
"high_water_mark_attributes": {
"use_high_water_mark_diff_type": true,
"column_name": "updated_at"
},
"validate_only": true,
"failed_run_notifications_enabled": false,
"failed_record_notifications_enabled": false,
"failed_record_notifications_threshold_percent": 10,
"source_attributes": {
"connection_id": 12,
"object": {
"type": "model",
"name": "test_ads"
}
}
}'
{
"status": "updated",
"data": {
"id": 90967,
"email": "newuser@example.com",
"created_at": "2023-09-22T20:25:45.185Z",
"created_by_id": 13,
"claimed_at": "2023-09-22T20:25:45.185Z",
"claimed_by_id": 11,
"role": "admin",
"associated_workspace_invitations": [
{
"id": 90967,
"workspace_id": 1234,
"role": "Viewer"
}
]
}
}
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
ID of the sync
Successfully updated the sync
The response is of type object
.
Was this page helpful?
curl --request PATCH \
--url https://app.getcensus.com/api/v1/syncs/{sync_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"label": "New Signups to Leads",
"operation": "mirror",
"destination_attributes": {
"connection_id": 15,
"object": "user_data"
},
"alert_attributes": [
{
"type": "FailureAlertConfiguration",
"send_for": "first_time",
"should_send_recovery": true,
"options": null
},
{
"type": "InvalidRecordPercentAlertConfiguration",
"send_for": "every_time",
"should_send_recovery": false,
"options": {
"threshold": 10
}
}
],
"mappings": [
{
"from": {
"type": "column",
"data": "hashed_email"
},
"to": "user_identifier.hashed_email_PREHASHED",
"is_primary_identifier": true
},
{
"from": {
"type": "column",
"data": "list_id"
},
"to": "list_id",
"lookup_object": "user_list",
"lookup_field": "name"
},
{
"from": {
"type": "constant_value",
"data": {
"value": "cohort_1",
"basic_type": "text"
}
},
"to": "cohort"
}
],
"advanced_configuration": {
"data_source_country": "US, GB",
"bulk_id_lookup": true
},
"mode": {
"type": "triggered",
"triggers": {
"schedule": {
"frequency": "daily",
"hour": 10,
"minute": 30
}
}
},
"paused": false,
"field_behavior": "sync_all_properties",
"field_normalization": "snake_case",
"field_order": "alphabetical_column_name",
"high_water_mark_attributes": {
"use_high_water_mark_diff_type": true,
"column_name": "updated_at"
},
"validate_only": true,
"failed_run_notifications_enabled": false,
"failed_record_notifications_enabled": false,
"failed_record_notifications_threshold_percent": 10,
"source_attributes": {
"connection_id": 12,
"object": {
"type": "model",
"name": "test_ads"
}
}
}'
{
"status": "updated",
"data": {
"id": 90967,
"email": "newuser@example.com",
"created_at": "2023-09-22T20:25:45.185Z",
"created_by_id": 13,
"claimed_at": "2023-09-22T20:25:45.185Z",
"claimed_by_id": 11,
"role": "admin",
"associated_workspace_invitations": [
{
"id": 90967,
"workspace_id": 1234,
"role": "Viewer"
}
]
}
}
Update certain configurable attributes of a sync. Note that though this endpoint is a PATCH
and top level attributes respect patch semantics, this does not apply to nested objects. Any nested objects that are changed must be sent in full, including any unchanged values.
curl --request PATCH \
--url https://app.getcensus.com/api/v1/syncs/{sync_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"label": "New Signups to Leads",
"operation": "mirror",
"destination_attributes": {
"connection_id": 15,
"object": "user_data"
},
"alert_attributes": [
{
"type": "FailureAlertConfiguration",
"send_for": "first_time",
"should_send_recovery": true,
"options": null
},
{
"type": "InvalidRecordPercentAlertConfiguration",
"send_for": "every_time",
"should_send_recovery": false,
"options": {
"threshold": 10
}
}
],
"mappings": [
{
"from": {
"type": "column",
"data": "hashed_email"
},
"to": "user_identifier.hashed_email_PREHASHED",
"is_primary_identifier": true
},
{
"from": {
"type": "column",
"data": "list_id"
},
"to": "list_id",
"lookup_object": "user_list",
"lookup_field": "name"
},
{
"from": {
"type": "constant_value",
"data": {
"value": "cohort_1",
"basic_type": "text"
}
},
"to": "cohort"
}
],
"advanced_configuration": {
"data_source_country": "US, GB",
"bulk_id_lookup": true
},
"mode": {
"type": "triggered",
"triggers": {
"schedule": {
"frequency": "daily",
"hour": 10,
"minute": 30
}
}
},
"paused": false,
"field_behavior": "sync_all_properties",
"field_normalization": "snake_case",
"field_order": "alphabetical_column_name",
"high_water_mark_attributes": {
"use_high_water_mark_diff_type": true,
"column_name": "updated_at"
},
"validate_only": true,
"failed_run_notifications_enabled": false,
"failed_record_notifications_enabled": false,
"failed_record_notifications_threshold_percent": 10,
"source_attributes": {
"connection_id": 12,
"object": {
"type": "model",
"name": "test_ads"
}
}
}'
{
"status": "updated",
"data": {
"id": 90967,
"email": "newuser@example.com",
"created_at": "2023-09-22T20:25:45.185Z",
"created_by_id": 13,
"claimed_at": "2023-09-22T20:25:45.185Z",
"claimed_by_id": 11,
"role": "admin",
"associated_workspace_invitations": [
{
"id": 90967,
"workspace_id": 1234,
"role": "Viewer"
}
]
}
}
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
ID of the sync
Successfully updated the sync
The response is of type object
.
Was this page helpful?
curl --request PATCH \
--url https://app.getcensus.com/api/v1/syncs/{sync_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"label": "New Signups to Leads",
"operation": "mirror",
"destination_attributes": {
"connection_id": 15,
"object": "user_data"
},
"alert_attributes": [
{
"type": "FailureAlertConfiguration",
"send_for": "first_time",
"should_send_recovery": true,
"options": null
},
{
"type": "InvalidRecordPercentAlertConfiguration",
"send_for": "every_time",
"should_send_recovery": false,
"options": {
"threshold": 10
}
}
],
"mappings": [
{
"from": {
"type": "column",
"data": "hashed_email"
},
"to": "user_identifier.hashed_email_PREHASHED",
"is_primary_identifier": true
},
{
"from": {
"type": "column",
"data": "list_id"
},
"to": "list_id",
"lookup_object": "user_list",
"lookup_field": "name"
},
{
"from": {
"type": "constant_value",
"data": {
"value": "cohort_1",
"basic_type": "text"
}
},
"to": "cohort"
}
],
"advanced_configuration": {
"data_source_country": "US, GB",
"bulk_id_lookup": true
},
"mode": {
"type": "triggered",
"triggers": {
"schedule": {
"frequency": "daily",
"hour": 10,
"minute": 30
}
}
},
"paused": false,
"field_behavior": "sync_all_properties",
"field_normalization": "snake_case",
"field_order": "alphabetical_column_name",
"high_water_mark_attributes": {
"use_high_water_mark_diff_type": true,
"column_name": "updated_at"
},
"validate_only": true,
"failed_run_notifications_enabled": false,
"failed_record_notifications_enabled": false,
"failed_record_notifications_threshold_percent": 10,
"source_attributes": {
"connection_id": 12,
"object": {
"type": "model",
"name": "test_ads"
}
}
}'
{
"status": "updated",
"data": {
"id": 90967,
"email": "newuser@example.com",
"created_at": "2023-09-22T20:25:45.185Z",
"created_by_id": 13,
"claimed_at": "2023-09-22T20:25:45.185Z",
"claimed_by_id": 11,
"role": "admin",
"associated_workspace_invitations": [
{
"id": 90967,
"workspace_id": 1234,
"role": "Viewer"
}
]
}
}