• VillaSlotDocumentation
  • Introduction
  • Getting Started
  • Agents
    • Claude Code
    • Codex
    • OpenClaw
    • Hermes
  • API
    • Discovery
      • GETGet my context
    • Villas
      • GETList villas
      • POSTCreate a villa
      • GETGet a villa
      • PATCHRename a villa
      • POSTArchive a villa
      • POSTUpload a villa photo
      • GETGet opening hours
      • PUTReplace opening hours
      • GETGet the rate grid
      • PUTReplace the rate grid
      • GETGet availability
    • Bookings
      • GETList bookings over a period
      • POSTCreate a booking
      • GETGet a booking
      • POSTConfirm a booking
      • POSTComplete a booking
      • POSTCancel a booking
      • POSTReschedule a booking
    • Customers
      • GETList customers
      • POSTCreate a customer
      • POSTImport a batch of customers
      • GETGet a customer
      • PATCHUpdate a customer
    • Booking settings
      • GETGet booking settings
      • PATCHUpdate booking settings
  1. Documentation
  2. Agents
  3. Codex
Buydocschangelogsdemocommunity

Codex

PreviousClaude CodeNextOpenClaw
On this page
Install the skill for CodexCreate your VillaSlot API keyReview your listings firstPrepare a customer importManage bookingsResolve a refused operation

Connect Codex to VillaSlot to review villa listings, work with customer records and manage hourly reservations from your agent workspace. The skill supplies the API contract and operational rules, including timezones, pricing and organization boundaries.

Install the skill for Codex

Run the installer from the workspace you use with Codex:

bash
npx skills add https://github.com/mikecodeur/skills --skill villaslot

Choose Codex when prompted. To select it explicitly:

bash
npx skills add https://github.com/mikecodeur/skills --skill villaslot --agent codex

Open a new Codex session in that workspace and ask it to use the villaslot skill. The skill describes the integration; your runtime still needs network access and a VillaSlot API key.

Create your VillaSlot API key

Open VillaSlot → Account → API Keys and generate a key for the organization to manage. Provide it securely to Codex's runtime as VILLASLOT_API_KEY, then set:

bash
export VILLASLOT_BASE_URL="https://www.villaslot.io"

The key is for VillaSlot, not an OpenAI API key. Keep it out of committed files. A hosted agent environment must receive its own secret configuration; it does not automatically inherit your local shell variables.

Review your listings first

Use the villaslot skill. Read the organization context with the API key
in my environment. List my active villas, their opening hours and
priced durations. Identify missing rate grids without changing data.

Codex can compare the results and tell you which villas are ready for hourly bookings. A villa needs both opening hours and a rate for the requested duration.

Prepare a customer import

Review this customer file for a VillaSlot import. Match existing
customers by email, list duplicates and invalid rows, and show me
what you would create before making any changes.

When you authorize the import, customer batches can contain up to 200 rows. Some rows can succeed while others fail. Ask Codex to save the returned IDs and report failed rows separately, so a retry does not recreate successful records.

Importing a customer or booking is a write. API v1 has no email-suppression flag and no payment-import endpoint. If an import must be silent, configure delivery settings in the application before starting it.

Manage bookings

Find the booking for Garden Villa on 2026-10-15 at 10:00 local time.
Check whether it can move to 14:00 on the same day. Preserve its
current price and show me the proposed change before applying it.

Once authorized, Codex can use the booking's UUID to reschedule it. The server rechecks availability, permissions and the booking state. Confirming or completing a booking does not record a payment; use the application for cash, transfer or Stripe payment operations.

Resolve a refused operation

Ask Codex to report the HTTP status and reason, without printing the secret. A 401 points to key access; a 409 can indicate a slot conflict or plan limit. After a network timeout during creation, read back and reconcile the result before retrying: API v1 has no public idempotency-key contract.

Continue with Agents, the API reference, or OpenAI's skill documentation.