New JuneDevelopers
API reference

plans

A practice plan for one of your priorities.

View .md
EndpointsScope plans:read
  • GET/v1/plansList plans
  • GET/v1/plans/{id}Get a plan

A plan works on one priority. Its steps are practice milestones; only its criterion decides when the plan graduates.

The plan object

FieldTypeDescription
objectstringAlways "plan".
idstringUnique id of the plan.
priority_idstringThe priority this plan works on.
statusstringCandidate (proposed), active (being worked on), graduated (done), or cancelled. One of: candidate, active, graduated, cancelled.
criterionobject or nullHow the plan is judged complete. Null while the plan is still being drafted.
criterion.rubricstring or nullWhat finishing the plan looks like.
criterion.measurable_signalstring or nullWhat is measured from your rounds.
criterion.thresholdstring or nullThe level that counts as done.
stepsarray of objectsSteps in order. Archived steps are not included.
steps[].idstringUnique id of the step.
steps[].titlestringWhat to do.
steps[].descriptionstring or nullMore detail about the step.
steps[].statusstringOpen until you mark it done. One of: open, done.
steps[].positionintegerOrder within the plan, ascending.
steps[].completed_atstring (timestamp) or nullWhen the step was marked done. Null while open.
created_from_report_idstring or nullThe report the plan came from, when any.
graduated_atstring (timestamp) or nullWhen the plan was completed. Null otherwise.
cancelled_atstring (timestamp) or nullWhen the plan was cancelled. Null otherwise.
cancel_reasonstring or nullWhy the plan was cancelled, when it was.
created_atstring (timestamp)When the plan was created.
updated_atstring (timestamp)When the plan itself was last changed. Marking a step done or open does not change it, so compare steps to catch step progress.

Example plan:

{
  "object": "plan",
  "id": "245f4a1a-cbd7-4444-9d09-4752871cfeb6",
  "priority_id": "ecbf0900-77cd-472a-b692-76faa0b4f462",
  "status": "active",
  "criterion": {
    "rubric": "Two-putt or better from outside 30 feet on most holes.",
    "measurable_signal": "Three-putts per round from outside 30 feet.",
    "threshold": "One or fewer in two straight rounds."
  },
  "steps": [
    {
      "id": "fb2f2182-69fd-432a-8625-feff4a555c7f",
      "title": "Ladder drill, 20 balls",
      "description": "Putt to 20, 30, and 40 feet, stopping each ball past the hole.",
      "status": "done",
      "position": 1,
      "completed_at": "2026-05-24T16:20:05.000Z"
    },
    {
      "id": "2f9ad778-7c24-431d-85e9-5b2e60343d86",
      "title": "Lag to a tee from 40 feet",
      "description": "Ten putts from 40 feet; count how many finish inside three feet.",
      "status": "done",
      "position": 2,
      "completed_at": "2026-06-02T17:45:10.000Z"
    },
    {
      "id": "345f8094-b1a6-4232-af1d-cfe8077c059b",
      "title": "Play nine holes counting three-putts",
      "description": "On the course, note the length of every first putt and every three-putt.",
      "status": "open",
      "position": 3,
      "completed_at": null
    }
  ],
  "created_from_report_id": "03d09dc8-617f-45e0-92fd-a76822838da0",
  "graduated_at": null,
  "cancelled_at": null,
  "cancel_reason": null,
  "created_at": "2026-05-17T21:12:03.000Z",
  "updated_at": "2026-05-17T21:14:40.000Z"
}

Endpoints

Responses carry Request-Id, RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, and a 429 adds Retry-After. See Headers.

List plans

Your practice plans with their steps, newest first: ordered by created_at descending, then id descending. Needs a key with the plans:read scope.

GET/v1/plans
AuthorizationBearer <token>

A personal API key (nj_live_...), sent as a bearer token. Create one on the Developer page at https://newjune.co/golf/developer. The scopes listed on each operation are the key scopes it needs.

In: header

Scope: plans:read

Query Parameters

limit?integer

How many items to return, 1 to 100. Defaults to 25.

Default25
Range1 <= value <= 100
cursor?string

The next_cursor value from the previous page, passed back unchanged with the same filters.

status?string

Only plans with this status.

Value in"candidate" | "active" | "graduated" | "cancelled"
priority_id?string

Only plans for this priority.

Formatuuid
updated_after?string

Only plans whose own updated_at is strictly after this time (ISO 8601, with Z or an offset). Use it to sync changes since your last run; the list order does not change. Marking a step done or open does not change it, so compare steps to catch step progress.

Formatdate-time

Response Body

curl "https://data.newjune.co/v1/plans" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
{
  "object": "list",
  "data": [
    {
      "object": "plan",
      "id": "245f4a1a-cbd7-4444-9d09-4752871cfeb6",
      "priority_id": "ecbf0900-77cd-472a-b692-76faa0b4f462",
      "status": "active",
      "criterion": {
        "rubric": "Two-putt or better from outside 30 feet on most holes.",
        "measurable_signal": "Three-putts per round from outside 30 feet.",
        "threshold": "One or fewer in two straight rounds."
      },
      "steps": [
        {
          "id": "fb2f2182-69fd-432a-8625-feff4a555c7f",
          "title": "Ladder drill, 20 balls",
          "description": "Putt to 20, 30, and 40 feet, stopping each ball past the hole.",
          "status": "done",
          "position": 1,
          "completed_at": "2026-05-24T16:20:05.000Z"
        },
        {
          "id": "2f9ad778-7c24-431d-85e9-5b2e60343d86",
          "title": "Lag to a tee from 40 feet",
          "description": "Ten putts from 40 feet; count how many finish inside three feet.",
          "status": "done",
          "position": 2,
          "completed_at": "2026-06-02T17:45:10.000Z"
        },
        {
          "id": "345f8094-b1a6-4232-af1d-cfe8077c059b",
          "title": "Play nine holes counting three-putts",
          "description": "On the course, note the length of every first putt and every three-putt.",
          "status": "open",
          "position": 3,
          "completed_at": null
        }
      ],
      "created_from_report_id": "03d09dc8-617f-45e0-92fd-a76822838da0",
      "graduated_at": null,
      "cancelled_at": null,
      "cancel_reason": null,
      "created_at": "2026-05-17T21:12:03.000Z",
      "updated_at": "2026-05-17T21:14:40.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJ2IjoxLCJrIjpbIjIwMjYtMDUtMTdUMjE6MTI6MDMuMDAwMDAwWiIsIjI0NWY0YTFhLWNiZDctNDQ0NC05ZDA5LTQ3NTI4NzFjZmViNiJdfQ"
}

{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_cursor",
    "message": "The cursor is not valid. Use the next_cursor value from a previous response.",
    "param": "cursor",
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#invalid_cursor"
  }
}

{
  "error": {
    "type": "authentication_error",
    "code": "api_key_expired",
    "message": "This API key has expired. Create a new key on the Developer page at newjune.co/golf/developer.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#api_key_expired"
  }
}

{
  "error": {
    "type": "permission_error",
    "code": "account_suspended",
    "message": "API access is suspended for this account.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#account_suspended"
  }
}

{
  "error": {
    "type": "rate_limit_error",
    "code": "daily_limit_exceeded",
    "message": "This account has reached its daily request limit. It resets at midnight UTC.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#daily_limit_exceeded"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "Something went wrong on our side. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#internal_error"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "service_unavailable",
    "message": "The API is temporarily unavailable. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#service_unavailable"
  }
}

Get a plan

One plan by id, with its steps. Needs a key with the plans:read scope.

GET/v1/plans/{id}
AuthorizationBearer <token>

A personal API key (nj_live_...), sent as a bearer token. Create one on the Developer page at https://newjune.co/golf/developer. The scopes listed on each operation are the key scopes it needs.

In: header

Scope: plans:read

Path Parameters

idstring

The plan's id.

Response Body

curl "https://data.newjune.co/v1/plans/245f4a1a-cbd7-4444-9d09-4752871cfeb6" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
{
  "object": "plan",
  "id": "245f4a1a-cbd7-4444-9d09-4752871cfeb6",
  "priority_id": "ecbf0900-77cd-472a-b692-76faa0b4f462",
  "status": "active",
  "criterion": {
    "rubric": "Two-putt or better from outside 30 feet on most holes.",
    "measurable_signal": "Three-putts per round from outside 30 feet.",
    "threshold": "One or fewer in two straight rounds."
  },
  "steps": [
    {
      "id": "fb2f2182-69fd-432a-8625-feff4a555c7f",
      "title": "Ladder drill, 20 balls",
      "description": "Putt to 20, 30, and 40 feet, stopping each ball past the hole.",
      "status": "done",
      "position": 1,
      "completed_at": "2026-05-24T16:20:05.000Z"
    },
    {
      "id": "2f9ad778-7c24-431d-85e9-5b2e60343d86",
      "title": "Lag to a tee from 40 feet",
      "description": "Ten putts from 40 feet; count how many finish inside three feet.",
      "status": "done",
      "position": 2,
      "completed_at": "2026-06-02T17:45:10.000Z"
    },
    {
      "id": "345f8094-b1a6-4232-af1d-cfe8077c059b",
      "title": "Play nine holes counting three-putts",
      "description": "On the course, note the length of every first putt and every three-putt.",
      "status": "open",
      "position": 3,
      "completed_at": null
    }
  ],
  "created_from_report_id": "03d09dc8-617f-45e0-92fd-a76822838da0",
  "graduated_at": null,
  "cancelled_at": null,
  "cancel_reason": null,
  "created_at": "2026-05-17T21:12:03.000Z",
  "updated_at": "2026-05-17T21:14:40.000Z"
}

{
  "error": {
    "type": "authentication_error",
    "code": "api_key_expired",
    "message": "This API key has expired. Create a new key on the Developer page at newjune.co/golf/developer.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#api_key_expired"
  }
}

{
  "error": {
    "type": "permission_error",
    "code": "account_suspended",
    "message": "API access is suspended for this account.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#account_suspended"
  }
}

{
  "error": {
    "type": "not_found_error",
    "code": "resource_not_found",
    "message": "No such plan.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#resource_not_found"
  }
}

{
  "error": {
    "type": "rate_limit_error",
    "code": "daily_limit_exceeded",
    "message": "This account has reached its daily request limit. It resets at midnight UTC.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#daily_limit_exceeded"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "Something went wrong on our side. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#internal_error"
  }
}

{
  "error": {
    "type": "api_error",
    "code": "service_unavailable",
    "message": "The API is temporarily unavailable. Try again later.",
    "param": null,
    "request_id": "req_5f0c6e2a9b1d4c7e8f3a2b10",
    "doc_url": "https://developers.newjune.co/errors#service_unavailable"
  }
}