Menu
Create a new collection
Create a new collection
POST
/collectionsUse it in a workflow
- Add a step and choose the Typesense connector.
- Pick the Create a new collection action (under collections).
- Fill in the fields below, then reference the result from later steps as
{{createANewCollection.response.data}}.
Request
Request body
Enter the body as JSON in the step's Body field.
{
"name": "companies",
"fields": [
{
"name": "num_employees",
"type": "int32",
"facet": false
},
{
"name": "company_name",
"type": "string",
"facet": false
},
{
"name": "country",
"type": "string",
"facet": true
}
],
"default_sorting_field": "num_employees",
"token_separators": [],
"synonym_sets": [
"synonym_set_1"
],
"enable_nested_fields": true,
"symbols_to_index": [],
"voice_query_model": {
"model_name": "ts/whisper/base.en"
},
"metadata": {}
}
Response
Returns 201 with a any. Read it in later steps with {{createANewCollection.response.data.<field>}}.
Need more? See the Typesense guide for connection setup and behaviour shared by every action.
Was this page helpful?