- Success envelope for all successful requests
- Error object for anything that goes wrong
Success responses
All successful responses wrap their payload in a top-level envelope with two fields:- object - The requested resource or collection
- meta - Metadata about the request itself
Single resource
A request for a single resource — such as GET /v1/guests/ — returns data as an object.Collection
A request for a list of resources — such as GET /v1/rooms — returns data as an array, and meta includes a pagination object.The meta object
meta is present on every successful response, whether a single resource or a collection.- requestId - string (UUID) - A unique identifier for this request, generated by KYC. Use this when contacting support. It is also returned in the Kyc-Request-Id response header.
- timestamp - string (ISO 8601) - UTC timestamp of when the response was generated.
- pagination object - Present on collection responses only. See Pagination for details.
The object field
Every resource in the data payload includes an “object” field that identifies its type. This is present on top-level resources and on any nested sub-resources.Nested objects — sub-resources and value objects
Resources can contain nested objects of two kinds. Understanding the difference matters because they behave differently in the API. Sub-resources are nested objects that have their own identity — they carry an id and an object field. They can typically be read or updated through their own dedicated endpoint (now or in a future API version), even if they are also returned inline as part of a parent resource. Examples: phone, email, reservation, message. Value objects are pure attribute bundles with no identity of their own. They have no id and no object field, and they have no standalone endpoint — they only exist as part of their parent. To update a value object you replace it wholesale as part of a parent update. Examples: address, a money amount, a coordinate pair. A guest with both kinds of nested object looks like this:- address is a value object — no id, no object, replaced as a unit.
- phones and emails are arrays of sub-resources — each entry has its own id and object and can be referenced or updated individually.
Sub-resource
Nested arrays
Nested arrays (like phones and emails above) are plain JSON arrays — they are not wrapped in a data/meta envelope and they do not paginate. They represent a bounded set of items that belong to the parent resource. If a collection can grow large or needs independent pagination, it is exposed as its own endpoint (e.g. GET /v1/guests//messages) rather than embedded in the parent.Relations and the ?with= parameter
Sub-resources are not always included in the parent response by default. For example, a Guest will not include its phone numbers. Each endpoint documents which nested objects are returned intrinsically and which must be explicitly requested. To include an optional relation, use the ?with= query parameter:GET /v1/guests/{guestId}?with=phones,emails
When a relation is not requested, its field is omitted entirely from the response —
it will not appear as null or []. This is the only case where a field is absent from a response object.
See Absent and empty values below.
Absent and empty values
The KYC API uses consistent conventions for fields that have no value:- A scalar field (string, number, date) with no value - we return null — the key is always present
- An array field with no items - we return [] — the key is always present
- A related resource not requested via ?with= - Field is omitted entirely
Pagination
Collection endpoints use page-based pagination, controlled by two query parameters:
The meta.pagination object in the response tells you where you are and how much data exists:
To paginate through all results, increment page until page >= totalPages.
Error responses
When a request cannot be completed, the API returns an error object instead of the success envelope. Error responses use the application/problem+json content type, following RFC 9457.Error fields
All error fields are always present. You will never receive a partially-shaped error object.Error Codes
Error codes are provided for your logic to process, see Error CodesField-level errors
When a 400 or 422 response is caused by specific fields in the request, the errors array contains one entry per invalid field:HTTP status codes
The KYC API uses HTTP status codes precisely and consistently.Client errors
Server errors
Codes 403 vs. 404
Note that we will often return a 403, unauthorized, instead of a 404, for data that exists but that you do not have access to. This is done to help find bugs and other issues, such as cross-property data problems, that would be hard to find if 404s are always returned. This may change over time.Redirects
Redirects are not currently used, but may be used in the future, usually for endpoints that move. Your code should support them, if possible.Response Headers
The API will return specific headers:E-Tags
E-Tags are not currently used, and thus conditional requests such as last-modified or if-modified-since are not supported, i.e. they will be processed without reading or using those headers.Handling errors in your code
A few recommendations for robust error handling:- Always branch on code, not title or detail. The code field is stable across API versions. Human-readable fields can be reworded without notice.
- Log requestId on every error. It is the fastest way to get support — we can quickly locate the exact request in our systems..
- Tolerate unknown error codes. We may add new code values over time. Your handler should have a catch-all path for codes it does not recognise, rather than treating them as fatal.
- Do not parse detail programmatically. It is a human string intended for developers and support workflows, not for machine logic.
Compatibility notes
The KYC API evolves additively within a version. When consuming responses:- Ignore fields you do not recognise. We may add new fields to any response object without a version bump. Strict deserialization that rejects unknown fields will break.
- Handle new enum values gracefully. If a field can grow new values over time, your code should have a safe default for unrecognised values.
- Handle new error codes gracefully. Same principle — new code values may appear as new error conditions are introduced.
- See API Versioning & Compatibility for the full policy on what we consider a breaking change.
