Destinations
Create a new destination
Introduction
Organization APIs
- Users
- Invitations
- Workspaces
Workspace APIs
- Syncs
- Sync Management Links
- Sync Runs
- Destination Types
- Destinations
- Destination Connect Links
- Source Types
- Sources
- Source Connect Links
- Segment Management Links
- Webhooks
Destinations
Create a new destination
This endpoint can be used to create destinations in Census. Each destination requires a different set of credentials in the request payload.
The credentials needed to create each type of connection can be found in the GET /connectors
API for most destinations. For OAuth destinations, see this Notion doc.
POST
/
destinations
curl --request POST \
--url https://app.getcensus.com/api/v1/destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"service_connection": {
"name": "Google Sheets",
"credentials": {},
"type": "<string>"
}
}'
{
"status": "created",
"data": {
"id": 12,
"name": "Google Sheets",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_results": {
"steps": [
{
"step": "Verify connectivity",
"error": {
"message": "<string>"
},
"status": "success"
}
]
},
"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,
"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"
}
]
}
]
}
}
Authorizations
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
Body
application/json
Response
201 - application/json
Destination created successfully
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://app.getcensus.com/api/v1/destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"service_connection": {
"name": "Google Sheets",
"credentials": {},
"type": "<string>"
}
}'
{
"status": "created",
"data": {
"id": 12,
"name": "Google Sheets",
"created_at": "2023-07-22T23:42:47.239Z",
"last_test_results": {
"steps": [
{
"step": "Verify connectivity",
"error": {
"message": "<string>"
},
"status": "success"
}
]
},
"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,
"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"
}
]
}
]
}
}