Documentation

Years

Create new OKR year

Creates a new OKR year. Each user can only have one OKR per calendar year.

ProductionStagingUAT
POSThttps://ankiren.com/api/me/okr

Request Body

Bắt buộc.

  • yearintegerRequired

    Calendar year (2000-2100)

    min: 2000max: 2100
  • themestring

    Optional theme for the year

application/json
{
  "year": 2025,
  "theme": "Year of Execution"
}

Responses

201 · Year created successfully

  • yearOkrYear
    • idinteger
    • userIdstring
    • yearinteger

      Calendar year

    • themestring?

      Optional theme for the year

    • status"active" | "completed" | "cancelled"

      Status of the OKR item

    • createdAtstring<date-time>
      format: date-time
    • updatedAtstring<date-time>
      format: date-time
application/json
{
  "year": {
    "id": 0,
    "userId": "string",
    "year": 0,
    "theme": "string",
    "status": "active",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z"
  }
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X POST 'https://ankiren.com/api/me/okr' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "year": 2025,
  "theme": "Year of Execution"
}'