Authorizations
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
Path Parameters
ID of the source
Body
application/json
Response
Topic created successfully
The response is of type object
.
curl --request POST \
--url https://app.getcensus.com/api/v1/sources/{source_id}/topics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "NewAppUsers",
"sample_message": {
"name": "Jill",
"id": "1",
"email": "Jill@foo.com"
},
"description": "Users that have signed up for our product in the last week."
}'
{
"status": "created",
"data": {
"id": 18,
"name": "NewAppUsers",
"description": "Users that have signed up for our product in the last week.",
"created_at": "2021-10-20T02:43:07.120Z",
"updated_at": "2021-10-20T02:50:35.477Z",
"schema": {
"name": "string",
"id": "number",
"email": "string"
}
}
}
curl --request POST \
--url https://app.getcensus.com/api/v1/sources/{source_id}/topics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "NewAppUsers",
"sample_message": {
"name": "Jill",
"id": "1",
"email": "Jill@foo.com"
},
"description": "Users that have signed up for our product in the last week."
}'
{
"status": "created",
"data": {
"id": 18,
"name": "NewAppUsers",
"description": "Users that have signed up for our product in the last week.",
"created_at": "2021-10-20T02:43:07.120Z",
"updated_at": "2021-10-20T02:50:35.477Z",
"schema": {
"name": "string",
"id": "number",
"email": "string"
}
}
}
Bearer token for the current workspace. Can be retrieved from the Workspace's settings page.
ID of the source
Topic created successfully
The response is of type object
.
Was this page helpful?