Skip to content
← Back to home

Build with Gjestfri

REST API, MCP server, webhooks, and an AI agent. Build your own integrations, connect your AI agents to your properties, or build on top of the platform.

This is a courtesy translation. The Norwegian version prevails.

1. Get started in 60 seconds

  1. Sign in at app.gjestfri.com → Settings → API keys
  2. Click “New API key”. Pick a name and scopes (or use the “MCP server (everything)” preset for full access).
  3. You see the plaintext key once - copy it right away and store it in a password manager or env variables.
  4. Test it:
curl https://api.gjestfri.com/v1/properties \
  -H "Authorization: Bearer gf_live_..."

2. Auth + scopes

All endpoints under /v1/* use Bearer authentication. The auth layer checks the prefix:

  • gf_live_… / gf_test_… → API key (rate-limited per key, scope-enforced)
  • Anything else → JWT (internal web/iOS, full access)

Available scopes

properties:read    properties:write
bookings:read      bookings:write
messages:read      messages:write
pricing:read       pricing:write
availability:read  availability:write
cleaning:read      cleaning:write
analytics:read
webhooks:manage
agent:chat

:write automatically implies :read.

Rate limit

60 requests per minute per key by default. Headers are returned on every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 47
Retry-After: 23  (only on 429)

3. REST API endpoints

Properties

  • GET /v1/properties
  • GET /v1/properties/:id
  • PATCH /v1/properties/:id
  • GET /v1/properties/:id/calendar?from&to

Bookings

  • GET /v1/bookings?propertyId&status&from&to&limit
  • GET /v1/bookings/:id
  • POST /v1/bookings - manual direct booking
  • PATCH /v1/bookings/:id

Messages

  • GET /v1/messages/unread
  • GET /v1/messages/by-booking/:id
  • POST /v1/messages/by-booking/:id - send to guest

Pricing

  • GET /v1/pricing/recommendations?propertyId&from&to
  • POST /v1/pricing/overrides
  • DELETE /v1/pricing/overrides
  • GET/PUT /v1/pricing/config

Availability

  • POST /v1/availability/block
  • POST /v1/availability/unblock

Cleaning

  • GET /v1/cleaning-tasks?status
  • PATCH /v1/cleaning-tasks/:id

Analytics

  • GET /v1/analytics/occupancy?from&to&propertyId
  • GET /v1/analytics/revenue?from&to&propertyId

Webhooks + API keys

  • GET/POST/DELETE /v1/webhooks
  • GET/POST/DELETE /v1/api-keys

Example - list bookings

curl 'https://api.gjestfri.com/v1/bookings?from=2026-06-01&limit=20' \
  -H "Authorization: Bearer gf_live_..."

# →
# {
#   "data": [
#     {
#       "id": 408,
#       "propertyId": 12,
#       "status": "confirmed",
#       "guest": { "name": "Anna M.", "country": "NO" },
#       "checkin": "2026-06-15",
#       "checkout": "2026-06-18",
#       "pricing": { "totalPrice": "4200", ... }
#     }
#   ]
# }

4. AI agent (chat API)

The agent has full access to the host's data and 60+ tools (CRUD on properties, bookings, cleaning, rates, quick replies, channels, ...). Talk to it naturally - the agent picks the right tool on its own.

Endpoints

  • POST /v1/agent/chat - send a message
  • POST /v1/agent/confirm/:actionLogId - confirm a pending action
  • GET /v1/agent/conversations
  • GET /v1/agent/conversations/:id/messages
  • GET/PATCH /v1/agent/settings

Example

curl https://api.gjestfri.com/v1/agent/chat \
  -H "Authorization: Bearer gf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "message": "What needs my attention today?",
    "channel": "ios"
  }'

# →
# {
#   "conversationId": 42,
#   "reply": "3 things: Anna checks in at 4 PM - welcome message not sent. ...",
#   "toolCalls": [
#     { "name": "list_unread_messages", "result": { ... } }
#   ]
# }

5. MCP: connect your AI assistant to Gjestfri

Not a developer? See the simple guide for all hosts.

Gjestfri runs a remote MCP server at https://api.gjestfri.com/mcp. Claude, ChatGPT, VS Code, Cursor and other MCP clients connect with your normal Gjestfri login and a consent screen where you pick the access level. No API key, nothing to install. FullPeiling AS publishes Gjestfri MCP. Choose “See the demo” at sign-in to try it with sample data.

The assistant only sees and does what you yourself can do. Cancellations and deletions require your confirmation. You handle card charges and refunds directly in Gjestfri. You can revoke the access at any time under Settings, AI assistants.

Three access levels at consent

  • Read only: the assistant can look, but not change anything.
  • Daily operations: read everything, and write to messages, bookings, pricing, cleaning, tasks and properties. No money, owner management or account.
  • Full access: everything you can do in Gjestfri yourself.

Claude.ai and Claude Desktop

Settings, Connectors, “Add custom connector”. Paste the address, sign in and approve:

https://api.gjestfri.com/mcp

Claude Code

Run the command below, then type /mcp in Claude Code to sign in:

claude mcp add --transport http gjestfri https://api.gjestfri.com/mcp

ChatGPT

Open chatgpt.com/plugins, press the plus sign and choose Add custom MCP server. Paste the same address, choose OAuth and press Create as a plugin. ChatGPT uses the same login and consent.

VS Code and GitHub Copilot

Put this in .vscode/mcp.json in the project, or in the global mcp.json:

{
  "servers": {
    "gjestfri": { "type": "http", "url": "https://api.gjestfri.com/mcp" }
  }
}

Cursor and other clients

Cursor reads .cursor/mcp.json with the key mcpServers. Any client that supports Streamable HTTP and OAuth 2.1 with dynamic registration or client metadata documents (CIMD) can connect:

{
  "mcpServers": {
    "gjestfri": { "url": "https://api.gjestfri.com/mcp" }
  }
}

The tools (excerpt)

list_properties / update_propertyproperties
list_bookings / get_booking_detailsbookings
list_unread_messages / send_messageguest messages
get_pricing_for_date / set_price_overridepricing
block_datesavailability
list_cleaning_tasks / create_cleaning_taskcleaning
create_task / complete_tasktasks
get_finance_overviewfinance
get_analytics_overviewanalytics
create_payment_linkpayment link, needs confirmation
cancel_bookingcancellation, needs confirmation
list_owner_statementsowners and management
whoamiwho you are signed in as
confirm_action / cancel_actionconfirm or discard high-risk actions

Gjestfrid has 202 tools, and 195 of them are available over MCP for an owner with full access, plus whoami, confirm_action and cancel_action. The catalog is filtered by role and access level, so a cleaner or an owner only sees their part. Your client shows the full list.

For client builders

  • Transport: Streamable HTTP with JSON responses, POST only. Login: OAuth 2.1 with PKCE (S256), dynamic registration at /oauth/register and client metadata documents (CIMD) as client id.
  • Discovery: /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server on api.gjestfri.com. Access tokens last one hour, refresh tokens 90 days.
  • If the token lacks a scope, the server answers 403 with insufficient_scope so the client can ask for new consent. Resources and prompts come later. The scopes:
properties:read   properties:write
bookings:read     bookings:write
messages:read     messages:write
pricing:read      pricing:write
cleaning:read     cleaning:write
payments:read     payments:write
finance:read
owners:read       owners:write
tasks:read        tasks:write
account:read      account:write
admin:read        admin:write

6. Webhooks

Get push notifications when something happens. HMAC-SHA256 signed payloads. Up to 3 retries with exponential backoff.

Register a subscription

curl https://api.gjestfri.com/v1/webhooks \
  -H "Authorization: Bearer gf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhook",
    "events": ["booking.created", "message.received"]
  }'

# The response includes the secret only on creation:
# { "id": 12, "secret": "whsec_...", "events": [...] }

Available events

  • booking.created, booking.updated, booking.cancelled
  • message.received, message.sent
  • cleaning.scheduled, cleaning.completed
  • pricing.recommendation_changed
  • agent.action_pending_confirmation

Verify the signature

// Header: X-Gjestfri-Signature: t=1234567890,v1=abc123...
const expected = crypto
  .createHmac("sha256", secret)
  .update(`${timestamp}.${rawBody}`)
  .digest("hex");

7. Messaging channels (host ↔ agent)

You can talk to the agent over iMessage/RCS/SMS, Telegram, or WhatsApp. Endpoints for connecting and managing channels:

  • GET /v1/host-channels
  • POST /v1/host-channels - body: {channel, phoneNumber?}
  • DELETE /v1/host-channels/:id

POST returns a deep link (Telegram/WhatsApp) or sends an iMessage with a 6-character code. The host verifies by opening the deep link or replying with the code.

8. Guest MCP (coming)

A separate MCP entry point for travelers' assistants, which search, book and follow up on the stay, is planned as a remote service with an access code per booking. The @gjestfri/mcp-guest package is not published, and there is no recipe yet. Write to utviklere@gjestfri.com if you want early access.

Help and contact