Toshl Developer

Create tag

Create a new tag.

Some related data is updated asynchronously. Clients can set an additional GET parameter immediate_update which dictates that those values should be updated immediately in current request. Such a request may take longer to complete.

POST /tags

Required scope:

Parameters

name
required
string

Tag name.

Max length: 255
type
required
string

Tag type.

Possible values: expense, income
category
optional
string

Primary category id of the tag.

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.

Request

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

Response

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