Habits

Properties

This table describes all properties of a Habit object.

Name

Type

Required

Description

id

String

required

name

String

required

is_archived

Boolean

required

start_date

Date

required

remind

String[]

optional

time_of_day

required

time_of_day

required

recurrence

String

required

created_date

Date

required

goal

optional

goal_history_items

optional

log_method

required

priority

Double

required

status

optional

Only exist when fetching from Journal

progress

Object

optional

Only exist when the status is in_progress, completed

Available Methods

List Habits

GET https://api.habitify.me/habits

This endpoint allows you to get habits.

Headers

NameTypeDescription

Authorization

string

API Key

{
    "message": "Success",
    "data": [
        {
            "id": "-MaRzj4a1xYCzSUvwD8Y",
            "name": "Read Books",
            "is_archived": false,
            "start_date": "2021-05-24T06:10:11.397Z",
            "time_of_day": [
                "any_time"
            ],
            "goal": {
                "unit_type": "min",
                "value": 30,
                "periodicity": "daily"
            },
            "goal_history_items": [
                {
                    "unit_type": "min",
                    "value": 30,
                    "periodicity": "daily"
                }
            ],
            "log_method": "manual",
            "recurrence": "DTSTART:20210524T061011Z\nRRULE:FREQ=DAILY",
            "remind": [
                "21:30"
            ],
            "area": {
                "id": "-MaSRmdoNq9k3JjtvDjh",
                "name": "Productivity",
                "priority": "U"
            },
            "created_date": "2021-05-24T06:10:11.397Z",
            "priority": -6.338253001141147e+29
        }
    ],
    "version": "v1.2",
    "status": true
}

Get Habit

GET https://api.habitify.me/habits/:habit_id

The endpoint allows you to get the detail of habit

Path Parameters

NameTypeDescription

habit_id

string

The id of the habit.

Headers

NameTypeDescription

Authorization

string

API Key

{
    "message": "Success",
    "data": {
        "id": "17F3839F-D596-4AA5-87D5-C799AF424A4A",
        "name": "9. Masking 🌈",
        "is_archived": false,
        "start_date": "2020-08-25T17:00:00.000Z",
        "time_of_day": [
            "evening"
        ],
        "goal": {
            "unit_type": "min",
            "value": 20,
            "periodicity": "daily"
        },
        "goal_history_items": [
            {
                "unit_type": "min",
                "value": 20,
                "periodicity": "daily"
            }
        ],
        "log_method": "manual",
        "recurrence": "DTSTART:20200825T170000Z\nRRULE:FREQ=DAILY",
        "remind": [],
        "area": null,
        "created_date": "2020-08-25T17:00:00.000Z",
        "priority": -1.266412660188944e+30
    },
    "version": "v1.2",
    "status": true
}

Last updated