Toshl Developer

Create category

Create a new category. Some related data is updated asynchronously.

POST /categories

Required scope:

Parameters

name *
required
string

Category name.

Max length: 255
type *
required
string

Category type.

Possible values: expense, income
extra
optional
object

A custom JSON object that you can use to extend Toshl API. Whatever you save into this field you will get back whenever you fetch it later.

* denotes required field/parameter.

Request

$ curl https://api.toshl.com/categories \
  -H "Authorization: Bearer T9cE5asGnuyYCCqIZFoWjFHvNbvVqHjl" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{json}'

Response

HTTP/1.1 201 Created
Location: https://api.toshl.com/categories/42