AI Connections Developer Setup
Use AI Connections to enable the connection, register your app, and obtain any required approvals. Ask the site administrator for the URLs shown in Advanced details. Use them exactly as published, including any subdirectory, mapped domain, port, or rest_route query string.
REST and OAuth
Section titled “REST and OAuth”Download the OpenAPI contract. Its referenced JSON Schemas are served alongside it, including the shared types. The contract uses synthetic examples and the daytidy-agent/v1 REST namespace.
After the site opts into public booking access, you can list published offerings, query availability, and create price quotes without a customer grant. Booking creation, a customer’s booking details, cancellations, and owner data require the applicable delegated grant. A quote does not reserve capacity.
Connect an app
Section titled “Connect an app”- Register the app’s exact HTTPS callback and the scopes it will request. Public clients use a client ID. Confidential clients also authenticate at token and revocation endpoints with
client_secret_basic. Store that secret on the app’s server. - Discover the OAuth endpoints through the site’s authorization server and protected resource metadata. Start the authorization code flow in the browser with a PKCE
S256challenge, unpredictablestate, the registered callback, requested scopes, and the exactresourceURL for this connection. - Check the returned
stateand issuer. Exchange the one-use code with the PKCE verifier, registered callback, and the same resource URL. Supply the client ID in the form body for a public client. A confidential client supplies its identity in the HTTP Basic credentials. - Send access tokens only in the
Authorization: Bearer …header over HTTPS. Keep REST, A2A, and MCP grants separate. Refresh with the same resource and replace the refresh token with the returned token.
Customer scopes include bookings.create, bookings.read.own, and bookings.cancel.own. A grant allows an app to ask for a specific booking or cancellation. To complete the action, send the approval request, open its first_party_url for the user, and submit the approved command with the required idempotency key. Poll the returned operation if pending. Follow Retry-After when present.
A2A discovery
Section titled “A2A discovery”In Customer Booking, enable public booking access and publish the discovery link. Copy the generated Agent Card URL under Advanced details. Dedicated domains may also expose /.well-known/agent-card.json. Shared-domain Multisite blogs use their generated Card URLs.
- Fetch the Card from the verified business site and use the interface URL it advertises.
- Send JSON-RPC requests with
A2A-Version: 1.0. ForSendMessage, send oneROLE_USERmessage with one JSON data part and a stable message ID. Use the DayTidy A2A command schema for offering, availability, quote, and booking inputs. - To book, obtain an A2A grant with
bookings.createusing the A2A interface URL as the OAuth resource. Open the approval link in the customer’s browser. Continue the same task with the returned task ID, approval ID, original booking input, and idempotency key. Keep the message ID for an exact retry. - If the operation is pending, poll the original task. A completed task can include a checkout link for an unpaid booking.
Use Check discovery link to check the Card, metadata, and a read-only request. Client support for A2A and DayTidy’s commands determines whether the assistant can use the connection.
Owner REST and MCP
Section titled “Owner REST and MCP”Owner access requires active DayTidy Pro, a current WordPress user with the relevant permissions, and an approved owner grant. Owner REST runs independently of MCP. MCP requires WordPress 6.9 or later with the Abilities API and WordPress MCP Adapter 0.7.1. Enable it in Owner Access (Pro) if your client uses MCP.
| Approved scope | REST endpoint | MCP tool |
|---|---|---|
schedule.read | GET /owner/schedule | daytidy-owner-schedule |
reports.read | GET /owner/reports/summary | daytidy-owner-report |
bookings.manage.cancel | POST /owner/bookings/{booking_id}/cancellation-preview, then approval and cancellation | daytidy-preview-admin-cancellation, then approval and cancellation tools |
Use a separate OAuth grant for each interface. Treat an owner’s offering and resource restrictions as the maximum allowed access. Use the site’s timezone to calculate schedule and report intervals. To cancel a single booking, create a fresh preview, obtain the owner’s approval for that preview, then submit the approved cancellation. The OpenAPI contract lists the REST request shapes and MCP tool mappings.
For stale or rejected credentials, check the resource URL and whether the site administrator or user revoked access. If the public endpoints fail, ask the administrator to verify HTTPS, metadata routing, and the status in AI Connections.