Skip to content

Examples ​

Set your token and API address once:

sh
export FELLESLY_TOKEN=fly_...
export FELLESLY=https://api.fellesly.no/v1

Find your family ​

sh
curl -s -H "Authorization: Bearer $FELLESLY_TOKEN" $FELLESLY/me \
  | jq '.families[] | {id: .family.id, name: .family.name, role: .member.role}'

Use the id as {fid} below.

Today's plan ​

sh
curl -s -H "Authorization: Bearer $FELLESLY_TOKEN" "$FELLESLY/families/$FID/briefing"

Add ?date=2026-10-05 for another day.

Upcoming events ​

sh
curl -s -H "Authorization: Bearer $FELLESLY_TOKEN" \
  "$FELLESLY/families/$FID/events?from=2026-10-01T00:00:00Z&to=2026-10-08T00:00:00Z"

Add an event (write token) ​

sh
curl -s -X POST -H "Authorization: Bearer $FELLESLY_TOKEN" -H 'content-type: application/json' \
  "$FELLESLY/families/$FID/events" \
  -d '{"title":"Football practice","startsAt":"2026-10-06T16:30:00+02:00","endsAt":"2026-10-06T18:00:00+02:00"}'

Put milk on the shopping list (write token) ​

sh
LIST=$(curl -s -H "Authorization: Bearer $FELLESLY_TOKEN" "$FELLESLY/families/$FID/lists" \
  | jq -r '[.[] | select(.type=="shopping")][0].id')
curl -s -X POST -H "Authorization: Bearer $FELLESLY_TOKEN" -H 'content-type: application/json' \
  "$FELLESLY/families/$FID/lists/$LIST/items" -d '{"text":"Milk"}'

TypeScript ​

ts
const api = async (path: string, init: RequestInit = {}) => {
  const res = await fetch(`${process.env.FELLESLY}${path}`, {
    ...init,
    headers: {
      authorization: `Bearer ${process.env.FELLESLY_TOKEN}`,
      'content-type': 'application/json',
      ...init.headers,
    },
  });
  if (!res.ok) throw new Error((await res.json()).error);
  return res.status === 204 ? null : res.json();
};

const { families } = await api('/me');
const lists = await api(`/families/${families[0].family.id}/lists`);

Check exact body fields in the reference or the OpenAPI spec.

Fellesly: the family, in one place.