# Kirken ACTS Vejle API and documentation

Public documentation for developers and AI agents reading the church calendar and website.

[OpenAPI](https://actsvejle.dk/openapi.json) · [API](https://actsvejle.dk/api) · [API v1](https://actsvejle.dk/api/v1) · [JSON events](https://actsvejle.dk/api/v1/events) · [llms.txt](https://actsvejle.dk/llms.txt)

## Access and authentication

The documented read operations are public. No login, API key or cookies are required. Use HTTPS and GET. HEAD retrieves headers only, and OPTIONS reports allowed methods.

## API and OpenAPI

GET /api and /api/v1 return JSON directories linking to public resources. /api/v1 also includes the machine-readable version and rate policy. The OpenAPI 3.0.4 specification includes unique operationId values, descriptions, typed parameters and JSON response schemas for function-calling tools.

```sh
curl -H "Accept: application/json" https://actsvejle.dk/api
```

## Versions and deprecation

The stable JSON API uses a major version in the URL: /api/v1. API-Version: 1 confirms the response version. Breaking changes get a new URL, such as /api/v2; additions may remain in v1, so clients must ignore unknown response fields. No version or calendar subscription is scheduled for retirement. Before retiring a version we publish at least 90 days notice here and send Deprecation as an RFC 9745 date (@<unix-seconds>), Sunset as an RFC 8594 HTTP-date, and a Link with rel=deprecation on affected responses. A notice does not change behavior before the announced date.

## Calendar as JSON

GET /api/v1/events returns public, concrete occurrences with id, localized title and description, date, time, location and categories. Recurrence, cancellations and date overrides follow the website calendar. Times are local to Europe/Copenhagen. lang is da, en, de or es (default da); missing translations fall back to English, then Danish. from and to are inclusive start dates in YYYY-MM-DD, years 1970 through 9998; defaults are today's Copenhagen date through 90 days later. The range is at most 366 days. limit is 1–100 (default 50), offset is a nonnegative safe integer (default 0); continue with pagination.nextOffset until null. Calendar data may change between pages. category and type use the subscription filters below. Other parameters, duplicate scalar parameters and invalid languages return 400. /api/calendar also supports JSON with Accept: application/json; otherwise iCalendar is preserved, including */* and equal preferences.

```sh
curl -i -H "Accept: application/json" "https://actsvejle.dk/api/v1/events?lang=en&limit=10"
```

## Calendar

GET /api/calendar returns the existing iCalendar feed as UTF-8 text/calendar. Use an RFC 5545 parser that handles recurrence, exceptions and the Europe/Copenhagen timezone. The feed contains current public events; an empty calendar is different from an outage.

lang is da, en, de or es; the default and fallback for unsupported languages is da. Repeat category=<id> or type=<value> to combine selections. Get category IDs from the public calendar's subscription links. At most 64 category and type values combined. type accepts service, kids, groups, worship or special and only matches uncategorized events. Omit both filters for all events. Unknown valid category IDs return an empty selection. Other query parameters are ignored.

```sh
curl -H "Accept: text/calendar" "https://actsvejle.dk/api/calendar?lang=en"
```

## Website content as Markdown

Read public pages with Accept: text/markdown, or append .md to their address. Use /index.md for the homepage. Danish has no locale prefix; English, German and Spanish use /en, /de and /es. The calendar's Markdown page is an introduction; use the feed for current dates. Unknown Markdown pages retain their Markdown response with HTTP 404.

```sh
curl -H "Accept: text/markdown" https://actsvejle.dk/en/om-os
```

## Errors and recovery

Calendar failures, unknown API paths and rejected write methods on the documented APIs return RFC 9457 JSON with Content-Type: application/problem+json. Fields are type, title, status, detail, instance, code and hint. code is a stable error code; hint describes the next step. Use the HTTP status and code in your integration.

400 INVALID_CALENDAR_SELECTION: Fix empty or invalid filters, or reduce the selection to at most 64 values.

400 INVALID_EVENT_QUERY: Correct the JSON calendar language, date range, pagination or filters using /openapi.json.

404 API_NOT_FOUND: Find an existing endpoint through /api or /openapi.json.

405 METHOD_NOT_ALLOWED: Use GET, HEAD or OPTIONS. The Allow header lists supported methods.

429 RATE_LIMITED: Wait the seconds specified by Retry-After. RateLimit reports remaining quota (r) and seconds until reset (t).

503 CALENDAR_UNAVAILABLE: Wait 300 seconds, as specified by Retry-After, before retrying. Do not cache error responses.

```sh
curl -i "https://actsvejle.dk/api/calendar?type=invalid"
```

## Caching and usage

JSON routes /api, /api/v1 and /api/v1/events, and JSON responses from /api/calendar, allow a burst of 120 requests per 60 seconds per client IP, route and server instance. GET, HEAD, OPTIONS and rejected methods count on the JSON routes. RateLimit-Policy: "instance-read";q=120;w=60 and RateLimit: "instance-read";r=<remaining>;t=<seconds> follow IETF draft-ietf-httpapi-ratelimit-headers-11, which is not yet an RFC. A 429 includes Retry-After, which takes precedence. JSON responses and quota metadata must not be cached. Counters reset on restart and are not shared between instances; this is not a global quota. At high client counts, new clients may share a conservative overflow quota on an instance. The hosting platform may impose further limits. Reuse retrieved data between questions. iCalendar subscriptions retain their 300-second cache and are outside the JSON burst limit. Authentication and internal administrative APIs retain their existing protocols.

## Actions and contact

The API provides read access to public information. Registrations, messages and donations require the visitor's decision and an actual confirmation from the service. There is no public agent API for payments, bookings, sensitive personal data or administration.

[Kontakt / Contact](https://actsvejle.dk/kontakt)
