curl --request PATCH \
--url https://app.getcensus.com/api/v1/destinations/{destination_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"service_connection": {
"name": "Google Sheets",
"credentials": {},
"type": "<string>"
}
}
'{
"status": "updated",
"data": {
"id": 12,
"name": "Google Sheets",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_results": {
"steps": [
{
"step": "Verify connectivity",
"status": "success",
"error": {
"message": "<string>"
}
}
]
},
"last_test_succeeded": true,
"last_tested_at": "2023-11-07T05:31:56Z",
"connection_details": {
"account_id": "7515011393,",
"account_name": "Manager Account Test"
},
"objects": [
{
"label": "User",
"full_name": "user",
"supported_operations": [
"insert",
"update",
"upsert"
],
"allow_custom_fields": true,
"allow_case_sensitive_fields": true,
"advanced_configuration_field_definitions": [
{
"name": "http_endpoint",
"type": "string",
"label": "HTTP Endpoint",
"input_type": "text",
"placeholder": "/users",
"sort_order": 1,
"required": true
},
{
"name": "batch_size",
"type": "integer",
"label": "Batch Size",
"input_type": "textarea",
"placeholder": "",
"default": 1,
"sort_order": 2
},
{
"name": "http_method",
"type": "string",
"label": "HTTP Method",
"input_type": "dropdown",
"default": "POST",
"sort_order": 3,
"supported_values": [
"POST",
"PUT",
"PATCH",
"DELETE",
"GET"
]
}
],
"supports_field_ordering": false,
"can_be_sync_destination": true,
"fields": [
{
"label": "External User ID",
"full_name": "external_id",
"createable": true,
"updateable": true,
"operations": [
"overwrite"
],
"array": true,
"preserve_values_supported": true,
"required_for_mapping": true,
"can_be_upsert_key": true,
"can_be_update_key": true,
"can_be_insert_key": true,
"can_be_reference_key": true,
"lookup_object": "company",
"type": "string"
}
],
"configurable_field_definitions": {
"http_endpoint": "string",
"batch_size": "integer"
}
}
]
}
}Update certain values of a destination
curl --request PATCH \
--url https://app.getcensus.com/api/v1/destinations/{destination_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"service_connection": {
"name": "Google Sheets",
"credentials": {},
"type": "<string>"
}
}
'{
"status": "updated",
"data": {
"id": 12,
"name": "Google Sheets",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_results": {
"steps": [
{
"step": "Verify connectivity",
"status": "success",
"error": {
"message": "<string>"
}
}
]
},
"last_test_succeeded": true,
"last_tested_at": "2023-11-07T05:31:56Z",
"connection_details": {
"account_id": "7515011393,",
"account_name": "Manager Account Test"
},
"objects": [
{
"label": "User",
"full_name": "user",
"supported_operations": [
"insert",
"update",
"upsert"
],
"allow_custom_fields": true,
"allow_case_sensitive_fields": true,
"advanced_configuration_field_definitions": [
{
"name": "http_endpoint",
"type": "string",
"label": "HTTP Endpoint",
"input_type": "text",
"placeholder": "/users",
"sort_order": 1,
"required": true
},
{
"name": "batch_size",
"type": "integer",
"label": "Batch Size",
"input_type": "textarea",
"placeholder": "",
"default": 1,
"sort_order": 2
},
{
"name": "http_method",
"type": "string",
"label": "HTTP Method",
"input_type": "dropdown",
"default": "POST",
"sort_order": 3,
"supported_values": [
"POST",
"PUT",
"PATCH",
"DELETE",
"GET"
]
}
],
"supports_field_ordering": false,
"can_be_sync_destination": true,
"fields": [
{
"label": "External User ID",
"full_name": "external_id",
"createable": true,
"updateable": true,
"operations": [
"overwrite"
],
"array": true,
"preserve_values_supported": true,
"required_for_mapping": true,
"can_be_upsert_key": true,
"can_be_update_key": true,
"can_be_insert_key": true,
"can_be_reference_key": true,
"lookup_object": "company",
"type": "string"
}
],
"configurable_field_definitions": {
"http_endpoint": "string",
"batch_size": "integer"
}
}
]
}
}Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
ID of the destination to update
Contains the information for the connection.
Show child attributes
The name of this destination.
"Google Sheets"
The credentials needed to create each type of connection. These can be found in the GET /connectors API for most destinations. For OAuth destinations, see this Notion doc.
The type of connection to be used for this destination. A valid type is the service_name of a connector returned from the /connectors endpoint, where the connector is marked as creatable_via_api.
Successfully updated the destination
Outcome of the operation.
success, updated, created, not_found, error "updated"
Show child attributes
The id of this destination.
12
The name of this destination.
"Google Sheets"
When the connection was created
"2023-07-22T23:42:47.239Z"
Show child attributes
An ordered array of steps representing the results of the last connection test. If one step fails then we won't surface details on later steps.
Show child attributes
The name of the step in the connection test process.
"Verify connectivity"
The status of the step.
running, success, failed, warning "success"
Indicates if the last connection test to this destination was successful.
true
Timestamp of when the last connection test was conducted on this destination.
Connection details associated with this destination.
{
"account_id": "7515011393,",
"account_name": "Manager Account Test"
}A list of objects associated with this destination.
Show child attributes
The label for this object.
"User"
The full name for this object. This is used to identify the object in the API.
"user"
A list of the operations this object supports when being synced to.
append, insert, mirror, update, upsert ["insert", "update", "upsert"]Whether or not you can define custom fields on this object.
true
Whether or not field names and labels are case sensitive on this object.
true
An array of advanced configuration options for this object. Returns an empty array for destinations that don't support advanced configuration. Configuration options should be defined when creating syncs to this object via the advanced_configuration attribute in the create sync payload.
Show child attributes
The unique identifier for this field.
The data type of this field.
string, integer, boolean, object The human-readable label for this field.
The type of input control to use for this field.
text, radio, toggle, checkbox, dropdown, textarea The order in which this field should be displayed.
Placeholder text for the input field.
The default value for this field. Type varies based on the field type.
Whether this field is required to be provided.
Valid values for this field (typically used with dropdown input_type). Array items can be strings, integers, or other types.
Whether this field cannot be changed after the initial creation.
Conditional logic for when to show this field based on other field values.
{ "file_format": ["CSV", "TSV"] }URL to documentation providing more information about this field.
Operations where this field is applicable (e.g., merge, overwrite).
[
{
"name": "http_endpoint",
"type": "string",
"label": "HTTP Endpoint",
"input_type": "text",
"placeholder": "/users",
"sort_order": 1,
"required": true
},
{
"name": "batch_size",
"type": "integer",
"label": "Batch Size",
"input_type": "textarea",
"placeholder": "",
"default": 1,
"sort_order": 2
},
{
"name": "http_method",
"type": "string",
"label": "HTTP Method",
"input_type": "dropdown",
"default": "POST",
"sort_order": 3,
"supported_values": ["POST", "PUT", "PATCH", "DELETE", "GET"]
}
]Whether or not you can set the field_order attribute on a sync to this object. Valid field_order configurations are alphabetical_column_name and mapping_order.
false
Whether or not you can create a sync to this object. This will be false if the object has been deleted.
true
A list of fields associated with this destination.
Show child attributes
The label for this field.
"External User ID"
The full name for this field. This is used to identify the field in the API.
"external_id"
Whether or not this field can be created in the destination if it doesn't exist.
true
Whether or not this field can be updated in the destination.
true
For an array type, what operations are supported on this field. One of the following types:
overwrite: Overwrite existing values with inputted valuesmerge: Merge inputted values with existing valuesoverwrite, merge Whether or not this field is an array type.
If a value exists in the destination for this field, whether or not it can be overwritten by Census.
true
Whether or not this field is required.
true
Whether or not this field can be the primary identifier for an upsert sync.
true
Whether or not this field can be the primary identifier for an update only sync.
true
Whether or not this field can be the primary identifier for a create only sync.
true
Whether or not this field can be the identifier for a lookup on its containing object.
true
What object, if any, that this field references.
"company"
The type of this field.
"string"
DEPRECATED: A simplified map of configurable field definitions for this object, containing only the field types (e.g., {"http_endpoint": "string", "batch_size": "integer"}). This field is deprecated in favor of advanced_configuration_field_definitions, which provides complete field definitions including all attributes such as label, input_type, placeholder, sort_order, validation rules, and inclusion constraints. Please use advanced_configuration_field_definitions for new integrations.
Show child attributes
{
"http_endpoint": "string",
"batch_size": "integer"
}Was this page helpful?