{
  "openapi": "3.1.0",
  "info": {
    "title": "VRelay Commerce Integration API",
    "version": "1.0.0",
    "description": "Server-to-server VRelay contract for Shopify and WooCommerce plugins. Integration keys and upstream StreamDaddy credentials must never be delivered to a browser."
  },
  "servers": [
    {
      "url": "https://api.vrelay.io",
      "description": "Configurable VRelay Worker API origin"
    }
  ],
  "paths": {
    "/v1/integrations/me": {
      "get": {
        "summary": "Get the authenticated merchant and store",
        "operationId": "getIntegrationIdentity",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Integration identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationIdentityResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/VRelayVersion"
          }
        ]
      }
    },
    "/v1/integrations/calls": {
      "post": {
        "summary": "Provision a call and receive an expiring hosted customer URL",
        "operationId": "createIntegrationCall",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Stable operation UUID/retry key scoped to organization and store",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "^[A-Za-z0-9._:~-]+$"
            }
          },
          {
            "$ref": "#/components/parameters/VRelayVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCallRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Call provisioned; identical operation replays use the same status and response shape",
            "headers": {
              "Idempotency-Replayed": {
                "description": "true when the result was safely replayed or reconciled",
                "schema": {
                  "type": "string",
                  "enum": ["false", "true"]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCallResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/SubscriptionRequired"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyConflict"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/UpstreamError"
          }
        }
      }
    },
    "/v1/integrations/calls/{callId}/cancel": {
      "post": {
        "summary": "Cancel an attributable call",
        "operationId": "cancelIntegrationCall",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Call cancelled (status cancelled if nobody answered, otherwise ended). Safe to repeat.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["data"],
                  "properties": {
                    "data": {
                      "type": "object",
                      "required": ["callId", "status"],
                      "properties": {
                        "callId": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v1/integrations/calls/{callId}/tickets": {
      "post": {
        "summary": "Issue a fresh one-time ticket to rejoin a call after navigation",
        "operationId": "createIntegrationCallTicket",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "description": "The plugin must authorize the shopper (e.g. a per-call secret kept in the shopper session). The new ticket is bound to the origin of pageUrl.",
        "parameters": [
          {
            "name": "callId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": ["pageUrl"],
                "properties": {
                  "pageUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048,
                    "pattern": "^https:"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "New one-time ticket",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateCallResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "CALL_ENDED: the call is ended, cancelled or failed"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v1/integrations/discounts": {
      "put": {
        "summary": "Replace the store's Agent can share discount allowlist",
        "operationId": "replaceDiscounts",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": ["discounts"],
                "properties": {
                  "discounts": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["code"],
                      "properties": {
                        "code": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "summary": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "endsAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "minimumSpend": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Integer minor units (e.g. paise)"
                        },
                        "usageRemaining": {
                          "type": ["integer", "null"],
                          "minimum": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stored (duplicates by code, case-insensitive, are dropped)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v1/integrations/orders": {
      "post": {
        "summary": "Report an order for call and agent attribution (upsert per store order)",
        "operationId": "reportOrder",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "orderId",
                  "callId",
                  "status",
                  "currency",
                  "subtotal",
                  "total",
                  "createdAt"
                ],
                "properties": {
                  "orderId": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "integer",
                        "minimum": 0
                      }
                    ],
                    "description": "Platform ID; send strings (integers are accepted and stored as strings)."
                  },
                  "callId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "orderName": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "created",
                      "paid",
                      "cancelled",
                      "refunded",
                      "partially_refunded"
                    ]
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "subtotal": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Integer minor units (e.g. paise)"
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Integer minor units (e.g. paise)"
                  },
                  "discountTotal": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Integer minor units (e.g. paise)"
                  },
                  "refundedTotal": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Integer minor units (e.g. paise)"
                  },
                  "discountCodes": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "maxLength": 64
                    }
                  },
                  "items": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": ["productId", "quantity", "total"],
                      "properties": {
                        "productId": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "integer",
                              "minimum": 0
                            }
                          ],
                          "description": "Platform ID; send strings (integers are accepted and stored as strings)."
                        },
                        "variantId": {
                          "oneOf": [
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            {
                              "type": "integer",
                              "minimum": 0
                            }
                          ],
                          "description": "Platform ID; send strings (integers are accepted and stored as strings)."
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "total": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "Integer minor units (e.g. paise)"
                        },
                        "categoryIds": {
                          "type": "array",
                          "maxItems": 10,
                          "items": {
                            "oneOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              },
                              {
                                "type": "integer",
                                "minimum": 0
                              }
                            ],
                            "description": "Platform ID; send strings (integers are accepted and stored as strings)."
                          }
                        }
                      }
                    }
                  },
                  "createdAt": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Attribution result. Attributed only if the call belongs to this store, was answered, and the order falls within the store attribution window.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "required": [
                        "orderId",
                        "attributed",
                        "callId",
                        "agentId"
                      ],
                      "properties": {
                        "orderId": {
                          "type": "string"
                        },
                        "attributed": {
                          "type": "boolean"
                        },
                        "callId": {
                          "type": "string"
                        },
                        "agentId": {
                          "type": ["string", "null"]
                        },
                        "reason": {
                          "type": "string",
                          "enum": [
                            "CALL_NOT_ANSWERED",
                            "OUTSIDE_WINDOW",
                            "FOREIGN_CALL"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v1/integrations/verifications": {
      "post": {
        "summary": "Create (or return) an identity verification for order gating",
        "operationId": "createVerification",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            },
            "description": "Used when no orderId is sent."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": ["subjectId", "expectedName"],
                "properties": {
                  "subjectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Stable pseudonymous customer id; must equal participant.id on the call."
                  },
                  "orderId": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      {
                        "type": "integer",
                        "minimum": 0
                      }
                    ],
                    "description": "String or integer; stored as a string."
                  },
                  "expectedName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Name the agent checks against the ID (1–120 characters after trimming); redacted after the retention period."
                  },
                  "expectedNameSource": {
                    "type": "string",
                    "enum": ["order", "self_entered"],
                    "default": "order",
                    "description": "order: from the store's existing records (order billing or shipping name, customer account name). self_entered: typed by the customer for this check; agents then see \"Name entered by the customer\"."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Existing verification for this order or key, or a reused VERIFIED result (reused: true)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Verification"
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Verification"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "get": {
        "summary": "Poll verifications changed since a cursor",
        "operationId": "listVerifications",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "parameters": [
          {
            "name": "updatedSince",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "An ISO timestamp or the previous nextCursor."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "subjectId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ordered by updatedAt. Always keep nextCursor; it repeats your cursor when nothing changed. A page shorter than limit means you are caught up.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Verification"
                      }
                    },
                    "nextCursor": {
                      "type": ["string", "null"]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v1/integrations/verifications/{verificationId}": {
      "get": {
        "summary": "Read one verification",
        "operationId": "getVerification",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "parameters": [
          {
            "name": "verificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Verification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Verification"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "Unknown or another store's verification"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/v1/integrations/verifications/{verificationId}/cancel": {
      "post": {
        "summary": "Cancel a verification (e.g. the order was cancelled)",
        "operationId": "cancelVerification",
        "security": [
          {
            "IntegrationKey": []
          }
        ],
        "parameters": [
          {
            "name": "verificationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled (idempotent); a ringing call is ended",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Verification"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "Unknown or another store's verification"
          },
          "409": {
            "description": "VERIFICATION_DECIDED: already VERIFIED or REJECTED"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "IntegrationKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "vrl_live_ key"
      }
    },
    "schemas": {
      "CreateCallRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["medium", "participant", "source"],
        "properties": {
          "medium": {
            "type": "string",
            "enum": ["audio", "video"]
          },
          "participant": {
            "type": "object",
            "additionalProperties": false,
            "required": ["id", "name"],
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "email": {
                "type": "string",
                "format": "email"
              }
            }
          },
          "source": {
            "type": "object",
            "additionalProperties": false,
            "required": ["channel"],
            "properties": {
              "channel": {
                "type": "string",
                "enum": ["shopify", "woocommerce"]
              },
              "shopId": {
                "type": "string"
              },
              "storeId": {
                "type": "string"
              },
              "productId": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  {
                    "type": "integer",
                    "minimum": 0
                  }
                ],
                "description": "String or integer; stored as a string."
              },
              "orderId": {
                "oneOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 160
                  },
                  {
                    "type": "integer",
                    "minimum": 0
                  }
                ],
                "description": "String or integer; stored as a string."
              },
              "pageUrl": {
                "type": "string",
                "format": "uri",
                "maxLength": 2048,
                "description": "Absolute storefront page URL. VRelay stores origin + path only. An https origin is required for embedUrl and becomes the only origin allowed to frame it."
              }
            }
          },
          "consent": {
            "type": "object",
            "additionalProperties": false,
            "required": ["textVersion", "recording"],
            "properties": {
              "textVersion": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "recording": {
                "type": "boolean",
                "description": "Agents get recording controls only when true (and the media plan allows recording)."
              },
              "call": {
                "type": "boolean",
                "enum": [true]
              }
            }
          },
          "routing": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "topic": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "language": {
                "type": "string",
                "maxLength": 16,
                "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$"
              }
            }
          },
          "catalog": {
            "type": "object",
            "additionalProperties": false,
            "required": ["url", "token"],
            "description": "Optional per-call read-only catalog capability. VRelay keeps it only in the call Durable Object and calls GET {url}/products?query=&first=10 and GET {url}/discounts with Authorization: Bearer {token}.",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "maxLength": 512,
                "pattern": "^https://.*/api/vrelay/v1/?$"
              },
              "token": {
                "type": "string",
                "minLength": 32,
                "maxLength": 200
              }
            }
          },
          "purpose": {
            "type": "string",
            "enum": ["consultation", "identity_verification"],
            "default": "consultation",
            "description": "identity_verification requires medium video, consent.recording true and the store use case enabled."
          },
          "verificationId": {
            "type": "string",
            "format": "uuid",
            "description": "A PENDING verification from POST /v1/integrations/verifications. Without it, an identity_verification call creates one from participant.id, participant.name and source.orderId."
          }
        }
      },
      "CreateCallResponse": {
        "type": "object",
        "required": ["data"],
        "properties": {
          "data": {
            "type": "object",
            "required": ["callId", "status", "joinUrl", "expiresAt"],
            "properties": {
              "callId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "example": "waiting"
              },
              "joinUrl": {
                "type": "string",
                "format": "uri",
                "description": "One-time full-page VRelay call page (15 minutes); never frameable. Shares its ticket with embedUrl."
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time"
              },
              "embedUrl": {
                "type": ["string", "null"],
                "format": "uri",
                "description": "With VRelay-Version 2026-11-27 only: one-time in-page panel URL, frameable only by the origin of source.pageUrl. null without an https pageUrl."
              }
            }
          },
          "verificationId": {
            "type": "string",
            "format": "uuid",
            "description": "Present for identity verification calls."
          }
        }
      },
      "IntegrationIdentityResponse": {
        "type": "object",
        "required": ["data"],
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "organization": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "store": {
                "type": "object",
                "properties": {
                  "coShopping": {
                    "type": ["object", "null"],
                    "description": "With VRelay-Version 2026-11-27 only.",
                    "properties": {
                      "cartMode": {
                        "type": "string",
                        "enum": ["ASK", "DIRECT"]
                      },
                      "maxDiscountCodesPerCall": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 5
                      },
                      "attributionDays": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      }
                    }
                  },
                  "identityVerification": {
                    "type": "object",
                    "description": "With VRelay-Version 2026-11-27 only.",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "validForDays": {
                        "type": "integer"
                      },
                      "pendingDays": {
                        "type": "integer"
                      }
                    }
                  }
                }
              },
              "credential": {
                "type": "object",
                "properties": {
                  "prefix": {
                    "type": "string"
                  },
                  "lastFour": {
                    "type": "string"
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Verification": {
        "type": "object",
        "required": [
          "verificationId",
          "reference",
          "status",
          "subjectId",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "verificationId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string",
            "example": "IDV-7KQ2M9XA"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "IN_PROGRESS",
              "NEEDS_REVIEW",
              "VERIFIED",
              "REJECTED",
              "EXPIRED",
              "CANCELLED"
            ],
            "description": "EXPIRED is also computed at read time: PENDING/IN_PROGRESS past pendingDays, or VERIFIED past expiresAt. Release order holds only on VERIFIED. A merchant can reopen an EXPIRED, CANCELLED or REJECTED check in VRelay; it then returns to PENDING with the same verificationId and callId null."
          },
          "subjectId": {
            "type": "string"
          },
          "orderId": {
            "type": ["string", "null"]
          },
          "callId": {
            "type": ["string", "null"]
          },
          "reasonCode": {
            "type": ["string", "null"],
            "enum": [
              "DOCUMENT_UNREADABLE",
              "DOCUMENT_INVALID",
              "FACE_MISMATCH",
              "NAME_MISMATCH",
              "SUBJECT_ABSENT",
              "OTHER",
              null
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "decidedAt": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "expiresAt": {
            "type": ["string", "null"],
            "format": "date-time"
          },
          "reused": {
            "type": "boolean",
            "description": "true when an existing VERIFIED result for the same subject was returned."
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing, expired, revoked, or invalid bearer key"
      },
      "Forbidden": {
        "description": "Key scope or store channel does not permit the operation"
      },
      "NotFound": {
        "description": "The call does not exist within the key's tenant boundary"
      },
      "ValidationError": {
        "description": "JSON or field validation failed"
      },
      "RateLimited": {
        "description": "The independent integration-key rate limit was exceeded"
      },
      "IdempotencyConflict": {
        "description": "The key is already processing or was used with different canonical request data"
      },
      "SubscriptionRequired": {
        "description": "`SUBSCRIPTION_REQUIRED`: the merchant has no active paid subscription or unexpired trial. `TRIAL_ALLOWANCE_EXHAUSTED`: a complimentary trial's cap for this medium is used up (details: medium, allowanceMinutes, usedMinutes, trialEndsAt). Neither is retryable until the entitlement changes."
      },
      "UpstreamError": {
        "description": "StreamDaddy provisioning failed; no successful join URL was returned"
      }
    },
    "parameters": {
      "VRelayVersion": {
        "name": "VRelay-Version",
        "in": "header",
        "required": false,
        "description": "Opt in to the 2026-11-27 contract: create responses then include embedUrl. Without it, responses are unchanged.",
        "schema": {
          "type": "string",
          "enum": ["2026-11-27"]
        }
      }
    }
  }
}
