StaySignals
Risk API

POST /v1/risk

Score a booking attempt and get back a decision.

Score one booking attempt. Call this from your server right before you commit the reservation.

MethodPOST
URLhttps://api.staysignals.com/v1/risk
AuthX-StaySignals-Key: sk_abc123def456…
Content-Typeapplication/json

Request body

Send as much of this payload as you can. Only the fields marked required are strictly needed, but more context helps StaySignals make a sharper decision.

collectionId

The browser collection ID from staysignals.js.

FieldTypeRequiredDescription
collectionIdstringThe collection ID for the current browser tab, when available (e.g. col_9f2a1c7b2e8d4a1f). Read it with window.StaySignals.getCollectionId() on the client and forward it to your server.

booker (required)

The person placing the booking.

FieldTypeRequiredDescription
booker.referenceIdstringYour own internal identifier for this booker, if you have one (e.g. usr_8a21).
booker.firstNamestringyesGiven name (e.g. Grace).
booker.lastNamestringyesFamily name (e.g. Hopper).
booker.emailstringyesEmail address (e.g. grace@example.com).
booker.phonestringyesPhone number in E.164 format (e.g. +15125550125).

guests

The named guests staying at the hotel. Always an array, even for a single guest.

If you collect only the primary guest's name, send that one guest here. Use booking.groupSize for the full party size when the search or reservation includes more adults, children, or infants. Omit any zero-count group size fields. If booking.groupSize is omitted, StaySignals uses guests.length as the displayed group size.

FieldTypeRequiredDescription
guests[].firstNamestringGiven name (e.g. Alan).
guests[].lastNamestringFamily name (e.g. Kay).

billing

The billing address used at checkout.

FieldTypeRequiredDescription
billing.addressLinestringStreet address (e.g. 221 Congress Ave).
billing.countrystringISO 3166-1 alpha-2 country code (e.g. US).

hotel (required)

The property being booked.

FieldTypeRequiredDescription
hotel.referenceIdstringYour own internal identifier for the property (e.g. hot_4fd1).
hotel.giataIdstringThe GIATA property ID. Strongly recommended for property matching (e.g. 123456).
hotel.namestringyesProperty name (e.g. The Gravel House).
hotel.addressstringStreet address of the property (e.g. 501 E 6th St, Austin, TX).
hotel.countrystringyesISO 3166-1 alpha-2 country code (e.g. US).

booking (required)

The reservation details.

FieldTypeRequiredDescription
booking.checkInstringyesCheck-in date, YYYY-MM-DD (e.g. 2026-06-15).
booking.checkOutstringyesCheck-out date, YYYY-MM-DD (e.g. 2026-06-17).
booking.groupSize.adultCountintegerNumber of adults in the party (e.g. 1). Omit when zero.
booking.groupSize.childCountintegerNumber of children in the party (e.g. 2). Omit when zero.
booking.groupSize.infantCountintegerNumber of infants in the party (e.g. 1). Omit when zero.

requestId (required)

FieldTypeRequiredDescription
requestIdstringyesYour own correlation id for this call. Echoed back in errors and stored on the decision record for tracing.

Response

FieldTypeDescription
decisionIdstringUnique identifier for this decision, prefixed with dec_. Store it on the order record to look up the decision later in the Dashboard.
riskScoreintegerInteger from 0 to 99. Higher means more suspicious.
riskLevelstringOne of low, medium, high. Derived from riskScore via a fixed mapping — not affected by your risk setting.
suggestedActionstringOne of allow, deny. How to route the checkout. See Handling the response.
riskSettingstringWhich risk setting was active at the time of the decision — one of maximizeProtection, balanced, maximizeRevenue.
decidedAtstringISO 8601 timestamp of when StaySignals scored the booking.

Example

Request

curl https://api.staysignals.com/v1/risk \
  -H "X-StaySignals-Key: sk_abc123def456…" \
  -H "Content-Type: application/json" \
  -d '{
    "collectionId": "col_9f2a1c7b2e8d4a1f",
    "booker": {
      "referenceId": "usr_8a21",
      "firstName": "Grace",
      "lastName": "Hopper",
      "email": "grace@example.com",
      "phone": "+15125550125"
    },
    "guests": [
      { "firstName": "Alan", "lastName": "Kay" }
    ],
    "billing": {
      "addressLine": "221 Congress Ave",
      "country": "US"
    },
    "hotel": {
      "referenceId": "hot_4fd1",
      "giataId": "123456",
      "name": "The Gravel House",
      "address": "501 E 6th St, Austin, TX",
      "country": "US"
    },
    "booking": {
      "checkIn": "2026-06-15",
      "checkOut": "2026-06-17",
      "groupSize": {
        "adultCount": 1
      }
    },
    "requestId": "req_8a21"
  }'

Response

{
  "decisionId": "dec_8f2a1c7b2e8d",
  "riskScore": 18,
  "riskLevel": "low",
  "suggestedAction": "allow",
  "riskSetting": "balanced",
  "decidedAt": "2026-04-24T08:27:33.000Z"
}

On this page