# priorities

Source: https://developers.newjune.co/api-reference/priorities

> An area of your game that your rounds point to.

An area of your game that your rounds point to.

Scope: `plans:read`. Base URL: `https://data.newjune.co`.

A priority is a lasting theme across reports. Plans point to a priority with priority_id.

## Endpoints

- `GET /v1/priorities`: List priorities
- `GET /v1/priorities/{id}`: Get a priority

Responses carry `Request-Id`, `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, and a `429` adds `Retry-After`. See [Headers](https://developers.newjune.co/conventions#headers).

## The prioritie object

| Field | Type | Description |
| --- | --- | --- |
| `object` | string | Always "priority". |
| `id` | string | Unique id of the priority. |
| `title` | string | Short name of the area to work on. |
| `description` | string or null | What the priority is about. |
| `status` | string | Active while it is still a focus; inactive once set aside. One of: `active`, `inactive`. |
| `first_seen_report_id` | string or null | The report that first raised this priority. |
| `last_seen_report_id` | string or null | The most recent report that raised this priority. |
| `created_at` | string (timestamp) | When the priority was created. |
| `updated_at` | string (timestamp) | When the priority was last changed. |

Example prioritie:

```json
{
  "object": "priority",
  "id": "ecbf0900-77cd-472a-b692-76faa0b4f462",
  "title": "Lag putting",
  "description": "Leave long putts inside three feet to cut three-putts.",
  "status": "active",
  "first_seen_report_id": "03d09dc8-617f-45e0-92fd-a76822838da0",
  "last_seen_report_id": "791a868a-8cfc-48db-8690-70421a68ee7c",
  "created_at": "2026-05-17T21:10:44.000Z",
  "updated_at": "2026-06-14T20:02:51.000Z"
}
```

### List priorities

`GET /v1/priorities`

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

Scope: `plans:read`. Operation id: `listPriorities`.

#### Query parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer | no | How many items to return, 1 to 100. Defaults to 25. |
| `cursor` | string | no | The next_cursor value from the previous page, passed back unchanged with the same filters. |
| `status` | string | no | Only priorities with this status. One of: `active`, `inactive`. |
| `updated_after` | string (timestamp) | no | Only priorities 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. |

#### Example request

curl:

```bash
curl "https://data.newjune.co/v1/priorities" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
```

TypeScript:

```ts
const response = await fetch('https://data.newjune.co/v1/priorities', {
  headers: { Authorization: `Bearer ${process.env.NEW_JUNE_API_KEY}` },
});
const body = await response.json();
console.log(body);
```

Python:

```python
import os
import requests

response = requests.get(
    "https://data.newjune.co/v1/priorities",
    headers={"Authorization": f"Bearer {os.environ['NEW_JUNE_API_KEY']}"},
    timeout=30,
)
print(response.json())
```

#### Responses

- `200`: A page of results.
- `400`: A query parameter is unknown, missing, or has an invalid value.
- `401`: The API key is missing, not valid, revoked, or expired.
- `403`: The key lacks the scope this endpoint needs, or the account is suspended.
- `429`: Too many requests. See the RateLimit and Retry-After headers.
- `500`: Something went wrong on our side.
- `503`: The API is temporarily unavailable.

### Get a priority

`GET /v1/priorities/{id}`

One priority by id. Needs a key with the plans:read scope.

Scope: `plans:read`. Operation id: `getPriority`.

#### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The priority's id. |

#### Example request

curl:

```bash
curl "https://data.newjune.co/v1/priorities/ecbf0900-77cd-472a-b692-76faa0b4f462" \
  -H "Authorization: Bearer $NEW_JUNE_API_KEY"
```

TypeScript:

```ts
const response = await fetch('https://data.newjune.co/v1/priorities/ecbf0900-77cd-472a-b692-76faa0b4f462', {
  headers: { Authorization: `Bearer ${process.env.NEW_JUNE_API_KEY}` },
});
const body = await response.json();
console.log(body);
```

Python:

```python
import os
import requests

response = requests.get(
    "https://data.newjune.co/v1/priorities/ecbf0900-77cd-472a-b692-76faa0b4f462",
    headers={"Authorization": f"Bearer {os.environ['NEW_JUNE_API_KEY']}"},
    timeout=30,
)
print(response.json())
```

#### Responses

- `200`: The item.
- `401`: The API key is missing, not valid, revoked, or expired.
- `403`: The key lacks the scope this endpoint needs, or the account is suspended.
- `404`: No such resource for this account.
- `429`: Too many requests. See the RateLimit and Retry-After headers.
- `500`: Something went wrong on our side.
- `503`: The API is temporarily unavailable.
