Skip to content
The Bookwise guidev1.1.0Read as Markdown
Documentation menu
Docs/Booking management
Booking management

recover_booking_access

Recover a lost booking access token in two calls. request_code requires the existing booking contact; the response does not reveal whether it matches. verify_code requires the returned recoveryId and customer's 6-digit code. Success rotates the token, invalidating the old one. Codes expire in 10 minutes and allow at most 5 guesses.

Scope & access

Directory + businessWrites data

Follow the credential fields below. Public discovery does not require a login; private booking operations require the indicated token.

This operation is not advertised as idempotent. Do not assume repeating it has no further effects.

Parameters

These are the directory endpoint parameters. Business endpoints scope public discovery to the published business; owner calls still require businessId. Inspect tools/list on your endpoint for the exact schema.

bookingIdRequired
string

Parent booking ID from create_hold (holdId), confirm_booking, or list_bookings. Never pass a child allocation ID.

actionRequired
"request_code" | "verify_code"

request_code sends a code to an existing matching contact; verify_code exchanges that code for a replacement accessToken.

contactOptional
string

For request_code: existing booking email address or E.164 phone number.

recoveryIdOptional
string

For verify_code: recoveryId from request_code.

codeOptional
string | integer

For verify_code: 6-digit code supplied by the customer. Expires after 10 minutes; at most 5 attempts.

Example call

Pass this object to the MCP client's callTool method. Replace placeholders with returned IDs, saved credentials and the customer's details; use future dates appropriate to their request.

recover_booking_access · MCP client arguments
json
{
  "name": "recover_booking_access",
  "arguments": {
    "bookingId": "<bookingId>",
    "action": "request_code",
    "contact": "asha@example.com"
  }
}

JSON schemas

Nested fields, formats, enums and constraints are included in the complete schemas. Successful data is returned in structuredContent. SDK input validation and domain errors use different error shapes.

Input schemaJSON Schema
Input JSON Schema
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string",
      "minLength": 1,
      "description": "Parent booking ID from create_hold (holdId), confirm_booking, or list_bookings. Never pass a child allocation ID."
    },
    "action": {
      "type": "string",
      "enum": [
        "request_code",
        "verify_code"
      ],
      "description": "request_code sends a code to an existing matching contact; verify_code exchanges that code for a replacement accessToken."
    },
    "contact": {
      "description": "For request_code: existing booking email address or E.164 phone number.",
      "type": "string",
      "minLength": 3,
      "maxLength": 254
    },
    "recoveryId": {
      "description": "For verify_code: recoveryId from request_code.",
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "code": {
      "description": "For verify_code: 6-digit code supplied by the customer. Expires after 10 minutes; at most 5 attempts.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      ]
    }
  },
  "required": [
    "bookingId",
    "action"
  ]
}
Output schemaJSON Schema
Output JSON Schema
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string"
    },
    "recoveryId": {
      "type": "string"
    },
    "accessToken": {
      "type": "string"
    },
    "nextStep": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "bookingId",
    "nextStep",
    "message"
  ],
  "additionalProperties": false
}
Behavior annotationsMCP
Tool annotations
json
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": false,
  "openWorldHint": true
}

Errors & next steps

Check isError before reading a success response. Follow nextStep where supplied, and never treat a pending booking as confirmed. See Errors and retries and the booking lifecycle for recovery paths.

Back to all tools