POST /routines/create

POST /routines/create

Create routine

application/json

Body Required

Responses

POST /routines/create
curl \
 -X POST https://api.cosmily.com/api/v1/routines/create \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"routine_type":"AM","routine_steps":[{"category_id":42}]}'
Request example
{
  "routine_type": "AM",
  "routine_steps": [
    {
      "category_id": 42
    }
  ]
}
Response examples (201)
{
  "data": {
    "id": 1,
    "user_id": 1,
    "routine_type": "AM",
    "title": "Daily Routine",
    "routine_steps": [
      {
        "id": 1
      }
    ],
    "status": "published",
    "created_at": "2021-10-04T13:24:22.000Z",
    "updated_at": "2021-11-13T20:23:18.000Z"
  }
}