{
  "openapi": "3.1.0",
  "info": {
    "title": "Pult API",
    "description": "Read-only access to your organization's users, groups, offices, workplace bookings, presence data and visits.",
    "version": "v1beta"
  },
  "servers": [
    {
      "url": "https://api.pult.com/v1beta"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    },
    {
      "oauth2": []
    }
  ],
  "tags": [
    {
      "name": "Visits",
      "description": "Visits of your organization's visitors product: who visited which office, when, whom they met and what they answered at sign-in. Requires the visitors feature."
    },
    {
      "name": "Groups",
      "description": "The groups of your organization."
    },
    {
      "name": "Presence",
      "description": "Where and when people were detected on site. Requires the presence feature."
    },
    {
      "name": "Offices",
      "description": "The bookable areas your organization set up (floors, buildings or sites). Requires the workplace or visitors feature."
    },
    {
      "name": "Bookings",
      "description": "Workplace bookings: where people work, or that they are absent, per day or half-day. Requires the workplace feature."
    },
    {
      "name": "Users",
      "description": "The members of your organization. Guests are never listed."
    }
  ],
  "paths": {
    "/visits": {
      "get": {
        "operationId": "listVisits",
        "summary": "List visits",
        "description": "Lists the visits whose stay overlaps a window of at most 31 days, read in each visit's own local dates, in every status. The order is stable while you follow `nextCursor` but otherwise unspecified and may change; sort by `date` or `startsAt` on your side. Each visitor is one visit: a group visit lists one visit per visitor. A visit with no end, or with an end at or before its start, counts as a one-day stay on its start date. Visits your retention setting deleted no longer appear. Moving a calendar meeting to another calendar cancels its visit and creates a new one with a new id. Visits from before 2026-10-27: no-shows were inferred later, and cancelled ones are missing. Re-read a recent window to see changes.",
        "tags": [
          "Visits"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "description": "The window's first day, inclusive (YYYY-MM-DD).",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's first day, inclusive (YYYY-MM-DD)."
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted."
          },
          {
            "in": "query",
            "name": "officeId",
            "schema": {
              "description": "Only visits at this office of your organization.",
              "type": "string"
            },
            "description": "Only visits at this office of your organization."
          },
          {
            "in": "query",
            "name": "hostId",
            "schema": {
              "description": "Repeatable. Only visits hosted by these users.",
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "description": "An opaque identifier: treat it as a string, compare it whole and never parse it; its format may change.",
                "type": "string"
              }
            },
            "description": "Repeatable. Only visits hosted by these users."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "description": "Repeatable. Only visits in these statuses.",
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "requested",
                  "expected",
                  "arrived",
                  "checked_in",
                  "checked_out",
                  "denied",
                  "cancelled",
                  "no_show"
                ]
              }
            },
            "description": "Repeatable. Only visits in these statuses."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisitList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/visits/{visitId}": {
      "get": {
        "operationId": "getVisit",
        "summary": "Get a visit",
        "description": "Gets one visit of your organization by id.",
        "tags": [
          "Visits"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "path",
            "name": "visitId",
            "schema": {
              "description": "The visit's id.",
              "type": "string"
            },
            "required": true,
            "description": "The visit's id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisitResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No resource with this id exists in your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemNotFound"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "not_found"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "not_found": "#/components/schemas/ProblemNotFound"
                    }
                  }
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "status": 404,
                      "code": "not_found",
                      "detail": "No resource with this id exists in your organization.",
                      "requestId": "4f8a6b1e-2c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "errors": [],
                      "data": {
                        "resource": "visit"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/groups": {
      "get": {
        "operationId": "listGroups",
        "summary": "List groups",
        "description": "Lists your organization's groups, with or without an active seat, sorted by id. Members: GET /users?groupId=<id>.",
        "tags": [
          "Groups"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/groups/{groupId}": {
      "get": {
        "operationId": "getGroup",
        "summary": "Get a group",
        "description": "Gets one group of your organization by id.",
        "tags": [
          "Groups"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "path",
            "name": "groupId",
            "schema": {
              "description": "The group's id.",
              "type": "string"
            },
            "required": true,
            "description": "The group's id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No resource with this id exists in your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemNotFound"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "not_found"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "not_found": "#/components/schemas/ProblemNotFound"
                    }
                  }
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "status": 404,
                      "code": "not_found",
                      "detail": "No resource with this id exists in your organization.",
                      "requestId": "4f8a6b1e-2c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "errors": [],
                      "data": {
                        "resource": "group"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/presence-locations": {
      "get": {
        "operationId": "listPresenceLocations",
        "summary": "List presence locations",
        "description": "Lists the places where presence can be detected, sorted by id. They are deliberately not offices.",
        "tags": [
          "Presence"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresenceLocationList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/presence-days": {
      "get": {
        "operationId": "listPresenceDays",
        "summary": "List presence days",
        "description": "Lists one row per person, day and presence location for a window of at most 31 days, sorted by date, user and presence location. Users with an active seat are included, archived users too; guests are not. firstSeenAt and lastSeenAt are first and last detected, never working hours. History is removed by a daily job after your organization's presence retention period, so data up to about a day past it can still appear; past days can change.",
        "tags": [
          "Presence"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "description": "The window's first day, inclusive (YYYY-MM-DD).",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's first day, inclusive (YYYY-MM-DD)."
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted."
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "description": "Repeatable. Only these users.",
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "description": "An opaque identifier: treat it as a string, compare it whole and never parse it; its format may change.",
                "type": "string"
              }
            },
            "description": "Repeatable. Only these users."
          },
          {
            "in": "query",
            "name": "groupId",
            "schema": {
              "description": "Only users whose current group is this group.",
              "type": "string"
            },
            "description": "Only users whose current group is this group."
          },
          {
            "in": "query",
            "name": "presenceLocationId",
            "schema": {
              "description": "Only this presence location.",
              "type": "string"
            },
            "description": "Only this presence location."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresenceDayList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/presence-location-counts": {
      "get": {
        "operationId": "listPresenceLocationCounts",
        "summary": "List presence location counts",
        "description": "Lists how many people were detected per presence location and day for a window of at most 31 days, sorted by date and presence location. Only pairs with at least one person appear. The people are those of presence days (active seat, archived included, no guests), so the two add up for the same window and filter. History is removed by a daily job after your organization's presence retention period, so data up to about a day past it can still appear; past days can change.",
        "tags": [
          "Presence"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "description": "The window's first day, inclusive (YYYY-MM-DD).",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's first day, inclusive (YYYY-MM-DD)."
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted."
          },
          {
            "in": "query",
            "name": "presenceLocationId",
            "schema": {
              "description": "Only this presence location.",
              "type": "string"
            },
            "description": "Only this presence location."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresenceLocationCountList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/presence-locations/{presenceLocationId}": {
      "get": {
        "operationId": "getPresenceLocation",
        "summary": "Get a presence location",
        "description": "Gets one presence location of your organization by id.",
        "tags": [
          "Presence"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "path",
            "name": "presenceLocationId",
            "schema": {
              "description": "The presence location's id.",
              "type": "string"
            },
            "required": true,
            "description": "The presence location's id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PresenceLocationResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No resource with this id exists in your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemNotFound"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "not_found"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "not_found": "#/components/schemas/ProblemNotFound"
                    }
                  }
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "status": 404,
                      "code": "not_found",
                      "detail": "No resource with this id exists in your organization.",
                      "requestId": "4f8a6b1e-2c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "errors": [],
                      "data": {
                        "resource": "presence_location"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offices": {
      "get": {
        "operationId": "listOffices",
        "summary": "List offices",
        "description": "Lists your organization's offices, sorted by id. Active offices by default; archived ones with `status=archived`.",
        "tags": [
          "Offices"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "description": "active (the default) or archived.",
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            },
            "description": "active (the default) or archived."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfficeList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/offices/{officeId}": {
      "get": {
        "operationId": "getOffice",
        "summary": "Get an office",
        "description": "Gets one office of your organization by id, archived or not.",
        "tags": [
          "Offices"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "path",
            "name": "officeId",
            "schema": {
              "description": "The office's id.",
              "type": "string"
            },
            "required": true,
            "description": "The office's id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfficeResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No resource with this id exists in your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemNotFound"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "not_found"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "not_found": "#/components/schemas/ProblemNotFound"
                    }
                  }
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "status": 404,
                      "code": "not_found",
                      "detail": "No resource with this id exists in your organization.",
                      "requestId": "4f8a6b1e-2c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "errors": [],
                      "data": {
                        "resource": "office"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bookings": {
      "get": {
        "operationId": "listBookings",
        "summary": "List bookings",
        "description": "Lists the bookings of a window of at most 31 days, sorted by date and stable within a date. Users with an active seat are included, archived users too; guests are not. A denied office request shows as a home booking, approved. Deleted and cancelled bookings no longer appear; re-read a recent window to see changes.",
        "tags": [
          "Bookings"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "startDate",
            "schema": {
              "description": "The window's first day, inclusive (YYYY-MM-DD).",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's first day, inclusive (YYYY-MM-DD)."
          },
          {
            "in": "query",
            "name": "endDate",
            "schema": {
              "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted.",
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
            },
            "required": true,
            "description": "The window's last day, inclusive (YYYY-MM-DD); the window spans at most 31 days, both ends counted."
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "description": "Repeatable. Only these users' bookings.",
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "description": "An opaque identifier: treat it as a string, compare it whole and never parse it; its format may change.",
                "type": "string"
              }
            },
            "description": "Repeatable. Only these users' bookings."
          },
          {
            "in": "query",
            "name": "groupId",
            "schema": {
              "description": "Only bookings of users whose current group is this group.",
              "type": "string"
            },
            "description": "Only bookings of users whose current group is this group."
          },
          {
            "in": "query",
            "name": "officeId",
            "schema": {
              "description": "Only office bookings at this office of your organization.",
              "type": "string"
            },
            "description": "Only office bookings at this office of your organization."
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "description": "Only bookings of this type.",
              "type": "string",
              "enum": [
                "office",
                "home",
                "remote",
                "coworking",
                "business_trip",
                "absent",
                "vacation",
                "sick"
              ]
            },
            "description": "Only bookings of this type."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{bookingId}": {
      "get": {
        "operationId": "getBooking",
        "summary": "Get a booking",
        "description": "Gets one booking of your organization by id. Bookings of guests and of users without an active seat are not found.",
        "tags": [
          "Bookings"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "path",
            "name": "bookingId",
            "schema": {
              "description": "The booking's id.",
              "type": "string"
            },
            "required": true,
            "description": "The booking's id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`feature_not_enabled`: The organization has no feature that enables this operation; `data.feature` names one that would. Ask Pult support to enable it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemFeatureNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "feature_not_enabled",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "feature_not_enabled": "#/components/schemas/ProblemFeatureNotEnabled",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No resource with this id exists in your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemNotFound"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "not_found"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "not_found": "#/components/schemas/ProblemNotFound"
                    }
                  }
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "status": 404,
                      "code": "not_found",
                      "detail": "No resource with this id exists in your organization.",
                      "requestId": "4f8a6b1e-2c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "errors": [],
                      "data": {
                        "resource": "booking"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users": {
      "get": {
        "operationId": "listUsers",
        "summary": "List users",
        "description": "Lists your organization's users, sorted by id. Active users by default; archived users are listed when `status` asks for them. Users in groups without an active seat are included; guests are not.",
        "tags": [
          "Users"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "description": "Repeatable (`status=active&status=archived`). Default: active.",
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              }
            },
            "description": "Repeatable (`status=active&status=archived`). Default: active."
          },
          {
            "in": "query",
            "name": "groupId",
            "schema": {
              "description": "Only users whose current group is this group.",
              "type": "string"
            },
            "description": "Only users whose current group is this group."
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "description": "Only the user with this email address (case-insensitive).",
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "description": "Only the user with this email address (case-insensitive)."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page.",
              "type": "string",
              "minLength": 1
            },
            "description": "Opaque cursor from `pagination.nextCursor` of the previous page; omit it for the first page."
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "description": "Page size, 1 to 500; default 100.",
              "default": 100,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "description": "Page size, 1 to 500; default 100."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserList"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.\n\n`invalid_cursor`: The cursor is invalid or was issued for other filters. Repeat the request without a cursor to start from the first page.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidCursor"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request",
                              "invalid_cursor"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest",
                      "invalid_cursor": "#/components/schemas/ProblemInvalidCursor"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/{userId}": {
      "get": {
        "operationId": "getUser",
        "summary": "Get a user",
        "description": "Gets one user of your organization by id, whatever their status. Guests and other organizations' users are not found.",
        "tags": [
          "Users"
        ],
        "x-stability-level": "beta",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "description": "The user's id.",
              "type": "string"
            },
            "required": true,
            "description": "The user's id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`: The request is invalid: `errors` lists each invalid parameter and how to fix it.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidRequest"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_request"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_request": "#/components/schemas/ProblemInvalidRequest"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "`invalid_api_key`: The API key is missing, malformed or unknown. Send a valid key in the Authorization header as Bearer <key>.\n\n`api_key_expired`: The API key has expired. Ask an admin of your organization for a new key.\n\n`api_key_revoked`: The API key was revoked. Ask an admin of your organization for a new key.\n\n`invalid_token`: The access token is unknown, expired, revoked or not for this API. Connect the app to Pult again.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInvalidApiKey"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyExpired"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyRevoked"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInvalidToken"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "invalid_api_key",
                              "api_key_expired",
                              "api_key_revoked",
                              "invalid_token"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "invalid_api_key": "#/components/schemas/ProblemInvalidApiKey",
                      "api_key_expired": "#/components/schemas/ProblemApiKeyExpired",
                      "api_key_revoked": "#/components/schemas/ProblemApiKeyRevoked",
                      "invalid_token": "#/components/schemas/ProblemInvalidToken"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "`organization_disabled`: The organization is disabled or suspended, so its API access is paused. Ask an admin of the organization to contact Pult support.\n\n`api_not_enabled`: The API is not enabled for this organization. Ask Pult support to enable it.\n\n`insufficient_scope`: The credential lacks the scope this operation requires (`data.scope`). Use one that holds it.\n\n`api_key_paused`: The API key is paused. Ask an admin of your organization to check the key in the Pult dashboard.\n\n`connection_paused`: The connection is paused because the person it acts as may not use it now. Ask an admin of your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "WWW-Authenticate": {
                "$ref": "#/components/headers/WwwAuthenticate"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemOrganizationDisabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiNotEnabled"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemInsufficientScope"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemApiKeyPaused"
                    },
                    {
                      "$ref": "#/components/schemas/ProblemConnectionPaused"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "organization_disabled",
                              "api_not_enabled",
                              "insufficient_scope",
                              "api_key_paused",
                              "connection_paused"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "organization_disabled": "#/components/schemas/ProblemOrganizationDisabled",
                      "api_not_enabled": "#/components/schemas/ProblemApiNotEnabled",
                      "insufficient_scope": "#/components/schemas/ProblemInsufficientScope",
                      "api_key_paused": "#/components/schemas/ProblemApiKeyPaused",
                      "connection_paused": "#/components/schemas/ProblemConnectionPaused"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`: No resource with this id exists in your organization.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemNotFound"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "not_found"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "not_found": "#/components/schemas/ProblemNotFound"
                    }
                  }
                },
                "examples": {
                  "not_found": {
                    "value": {
                      "status": 404,
                      "code": "not_found",
                      "detail": "No resource with this id exists in your organization.",
                      "requestId": "4f8a6b1e-2c3d-4e5f-8a9b-0c1d2e3f4a5b",
                      "errors": [],
                      "data": {
                        "resource": "user"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`: Too many requests. Retry after the number of seconds in `data.retryAfterSeconds`.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemRateLimited"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "rate_limited"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "rate_limited": "#/components/schemas/ProblemRateLimited"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "`internal_error`: An unexpected error occurred. Retry once; if it persists, contact Pult support with the requestId.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ProblemInternalError"
                    },
                    {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Problem"
                        }
                      ],
                      "properties": {
                        "code": {
                          "not": {
                            "enum": [
                              "internal_error"
                            ]
                          }
                        }
                      }
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "internal_error": "#/components/schemas/ProblemInternalError"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "minimum": 100,
            "maximum": 599
          },
          "code": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {}
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ],
        "description": "An error. `code` identifies it (an open set: handle unknown codes by `status`); `detail` says how to fix it; `data` is typed per code."
      },
      "ProblemIssue": {
        "type": "object",
        "properties": {
          "parameter": {
            "type": "string"
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "required",
                  "invalid_format",
                  "invalid_value",
                  "out_of_range",
                  "too_many_values",
                  "unknown_parameter"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "parameter",
          "code",
          "detail"
        ],
        "description": "One invalid parameter: its name, our issue code and how to fix it."
      },
      "ProblemInvalidRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 400
          },
          "code": {
            "type": "string",
            "const": "invalid_request"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemInvalidCursor": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 400
          },
          "code": {
            "type": "string",
            "const": "invalid_cursor"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemInvalidApiKey": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 401
          },
          "code": {
            "type": "string",
            "const": "invalid_api_key"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemApiKeyExpired": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 401
          },
          "code": {
            "type": "string",
            "const": "api_key_expired"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemApiKeyRevoked": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 401
          },
          "code": {
            "type": "string",
            "const": "api_key_revoked"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemInvalidToken": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 401
          },
          "code": {
            "type": "string",
            "const": "invalid_token"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemOrganizationDisabled": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 403
          },
          "code": {
            "type": "string",
            "const": "organization_disabled"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemApiNotEnabled": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 403
          },
          "code": {
            "type": "string",
            "const": "api_not_enabled"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemInsufficientScope": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 403
          },
          "code": {
            "type": "string",
            "const": "insufficient_scope"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "scope": {
                "type": "string"
              }
            },
            "required": [
              "scope"
            ]
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemFeatureNotEnabled": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 403
          },
          "code": {
            "type": "string",
            "const": "feature_not_enabled"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "feature": {
                "type": "string"
              }
            },
            "required": [
              "feature"
            ]
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemApiKeyPaused": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 403
          },
          "code": {
            "type": "string",
            "const": "api_key_paused"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemConnectionPaused": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 403
          },
          "code": {
            "type": "string",
            "const": "connection_paused"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemRateLimited": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 429
          },
          "code": {
            "type": "string",
            "const": "rate_limited"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "retryAfterSeconds": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "retryAfterSeconds"
            ]
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemInternalError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 500
          },
          "code": {
            "type": "string",
            "const": "internal_error"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemNotFound": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 404
          },
          "code": {
            "type": "string",
            "const": "not_found"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "resource": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "user",
                      "group",
                      "office",
                      "booking",
                      "presence_location",
                      "visit"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "resource"
            ]
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemRouteNotFound": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 404
          },
          "code": {
            "type": "string",
            "const": "route_not_found"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "ProblemPayloadTooLarge": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "const": 413
          },
          "code": {
            "type": "string",
            "const": "payload_too_large"
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProblemIssue"
            }
          },
          "data": {
            "type": "null"
          }
        },
        "required": [
          "status",
          "code",
          "detail",
          "requestId",
          "errors",
          "data"
        ]
      },
      "VisitList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Visit"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {
              "startDate": {
                "description": "The window's first day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "endDate": {
                "description": "The window's last day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              }
            },
            "required": [
              "startDate",
              "endDate"
            ]
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "Visit": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The visit's id (an opaque string).",
            "type": "string"
          },
          "status": {
            "description": "requested, expected, arrived, checked_in, checked_out, denied, cancelled or no_show; checked_out, denied, cancelled and no_show are final. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "requested",
                  "expected",
                  "arrived",
                  "checked_in",
                  "checked_out",
                  "denied",
                  "cancelled",
                  "no_show"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "date": {
            "description": "The visit's start date (YYYY-MM-DD): for a visit entered in Pult, the date it was entered for; for a calendar visit, the date of startsAt in timeZone.",
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "startsAt": {
            "description": "The planned start of the stay.",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "endsAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The planned end of the stay; null when none is stored."
          },
          "expectedArrivalAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "The expected arrival on the start date; null when none is set."
          },
          "checkedInAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the visitor was checked in; null before. When an approver admits a waiting visitor, this is the time of the decision."
          },
          "checkedOutAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the visitor was checked out; null before. An automatic checkout records the time of the nightly run; without automatic checkout a visit can stay checked in."
          },
          "timeZone": {
            "type": "string",
            "description": "The IANA time zone the visit's local times and date are read in: the zone it was entered in; for a calendar visit, its site's current zone; for a visit from before 2026-10-29, your organization's zone."
          },
          "office": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OfficeReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visit's office; null for a visit at a site without floors, an office that was deleted, or an office of a connected organization."
          },
          "host": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "The host, when the host is a user of your organization (GET /users/{userId} finds them); otherwise null."
          },
          "visitor": {
            "$ref": "#/components/schemas/VisitVisitor"
          },
          "visitorType": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VisitVisitorType"
              },
              {
                "type": "null"
              }
            ],
            "description": "The visitor's current type; null when none is set."
          },
          "answers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisitAnswer"
            },
            "description": "The sign-in form answers that apply to this visit, grouped by form in question order. A question asked once per visitor shows the visitor's newest answer on every visit, also one given on an earlier visit."
          }
        },
        "required": [
          "id",
          "status",
          "date",
          "startsAt",
          "endsAt",
          "expectedArrivalAt",
          "checkedInAt",
          "checkedOutAt",
          "timeZone",
          "office",
          "host",
          "visitor",
          "visitorType",
          "answers"
        ],
        "description": "One visitor's visit: a group visit is one visit per visitor."
      },
      "OfficeReference": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The office's id (an opaque string).",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The office's current name. Names may repeat."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "An office of your organization, current at response time."
      },
      "UserReference": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The user's id (an opaque string).",
            "type": "string"
          },
          "email": {
            "type": "string",
            "description": "The user's email address, lowercase."
          },
          "firstName": {
            "type": "string",
            "description": "The user's first name; an empty string for an invited user who has not set it."
          },
          "lastName": {
            "type": "string",
            "description": "The user's last name; an empty string for an invited user who has not set it."
          }
        },
        "required": [
          "id",
          "email",
          "firstName",
          "lastName"
        ],
        "description": "A user, current at response time."
      },
      "VisitVisitor": {
        "type": "object",
        "properties": {
          "firstName": {
            "description": "string or null",
            "type": [
              "string",
              "null"
            ]
          },
          "lastName": {
            "description": "string or null",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "string or null",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "string or null",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "string or null",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "firstName",
          "lastName",
          "company",
          "email",
          "phone"
        ],
        "description": "The visitor's current details, not as of the visit: editing a visitor changes every visit of theirs."
      },
      "VisitVisitorType": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The visitor type's name."
          }
        },
        "required": [
          "name"
        ],
        "description": "A visitor type, current at response time."
      },
      "VisitAnswer": {
        "type": "object",
        "properties": {
          "question": {
            "$ref": "#/components/schemas/VisitAnswerQuestion"
          },
          "value": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "free_text: the text as entered, or null. single_choice: the chosen option's current wording, or null when that option no longer exists. multiple_choice: the chosen options' current wordings in the order picked, without options that no longer exist. After a question changes from a choice to free text, the answers given before read as stored, which can be internal option ids."
          }
        },
        "required": [
          "question",
          "value"
        ],
        "description": "A sign-in form answer."
      },
      "VisitAnswerQuestion": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The question as it reads now. Rewording a question changes it on every answer, so matching answers by question text breaks when a question is reworded."
          },
          "type": {
            "description": "free_text, single_choice or multiple_choice: the question's current type. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "free_text",
                  "single_choice",
                  "multiple_choice"
                ]
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "text",
          "type"
        ],
        "description": "A sign-in form question."
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "nextCursor"
        ],
        "description": "Cursor pagination: `nextCursor` is null on the last page."
      },
      "VisitResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Visit"
          }
        },
        "required": [
          "data"
        ]
      },
      "GroupList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Group"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {}
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "Group": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The group's id (an opaque string).",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The group's name."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "A group of your organization. Its members: GET /users?groupId=<id>."
      },
      "GroupResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Group"
          }
        },
        "required": [
          "data"
        ]
      },
      "PresenceLocationList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PresenceLocation"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {}
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "PresenceLocation": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The presence location's id (an opaque string).",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The presence location's name."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "A place where presence can be detected. Deliberately not an office."
      },
      "PresenceDayList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PresenceDay"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {
              "startDate": {
                "description": "The window's first day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "endDate": {
                "description": "The window's last day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "timeZone": {
                "type": "string",
                "description": "Your organization's IANA time zone, which the dates are in."
              }
            },
            "required": [
              "startDate",
              "endDate",
              "timeZone"
            ]
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "PresenceDay": {
        "type": "object",
        "properties": {
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who was detected. Never null for an admin key."
          },
          "date": {
            "description": "The day in your organization's time zone (meta.timeZone).",
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "presenceLocation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresenceLocationReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where. Always set today; null is reserved for presence without a location."
          },
          "firstSeenAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "First detected (not the start of working hours). Null when your organization hides presence timestamps. A detection across midnight can carry a time of the day before."
          },
          "lastSeenAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last detected (not the end of working hours). Null when your organization hides presence timestamps."
          },
          "detectionMethods": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "wifi",
                    "agent"
                  ]
                },
                {
                  "type": "string"
                }
              ]
            },
            "description": "How the person was detected: wifi (the WiFi presence integration) or agent (Pult Agent sessions; legacy QR check-ins too). More values may be added."
          }
        },
        "required": [
          "user",
          "date",
          "presenceLocation",
          "firstSeenAt",
          "lastSeenAt",
          "detectionMethods"
        ],
        "description": "One person, one day, one presence location."
      },
      "PresenceLocationReference": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The presence location's id (an opaque string).",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The presence location's current name."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "A place where presence can be detected, current at response time."
      },
      "PresenceLocationCountList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PresenceLocationCount"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {
              "startDate": {
                "description": "The window's first day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "endDate": {
                "description": "The window's last day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "timeZone": {
                "type": "string",
                "description": "Your organization's IANA time zone, which the dates are in."
              }
            },
            "required": [
              "startDate",
              "endDate",
              "timeZone"
            ]
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "PresenceLocationCount": {
        "type": "object",
        "properties": {
          "date": {
            "description": "The day in your organization's time zone (meta.timeZone).",
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "presenceLocation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PresenceLocationReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where. Always set today."
          },
          "peopleCount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "How many people were detected there that day; at least 1 (missing rows mean nobody)."
          }
        },
        "required": [
          "date",
          "presenceLocation",
          "peopleCount"
        ],
        "description": "How many people were detected at one presence location on one day."
      },
      "PresenceLocationResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/PresenceLocation"
          }
        },
        "required": [
          "data"
        ]
      },
      "OfficeList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Office"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {
              "status": {
                "description": "The status this list shows: the request's `status`, or the default `active`.",
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "active",
                      "archived"
                    ]
                  },
                  {
                    "type": "string"
                  }
                ]
              }
            },
            "required": [
              "status"
            ]
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "Office": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The office's id (an opaque string).",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The office's name, as your organization set it up. Names may repeat."
          },
          "status": {
            "description": "active or archived. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              {
                "type": "string"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "description": "A bookable area your organization set up: a floor, a building or a site; its name carries the meaning."
      },
      "OfficeResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Office"
          }
        },
        "required": [
          "data"
        ]
      },
      "BookingList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {
              "startDate": {
                "description": "The window's first day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              "endDate": {
                "description": "The window's last day (YYYY-MM-DD), as requested.",
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              }
            },
            "required": [
              "startDate",
              "endDate"
            ]
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The booking's id (an opaque string).",
            "type": "string"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "Who booked. Never null for an admin key."
          },
          "date": {
            "description": "The booked day (YYYY-MM-DD).",
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "period": {
            "description": "full_day, first_half or second_half. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "full_day",
                  "first_half",
                  "second_half"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "type": {
            "description": "Where or whether the person works. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "office",
                  "home",
                  "remote",
                  "coworking",
                  "business_trip",
                  "absent",
                  "vacation",
                  "sick"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "category": {
            "description": "work or absence, so an unfamiliar type is still understood. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "work",
                  "absence"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "approvalStatus": {
            "description": "pending while an office booking or its request awaits review, otherwise approved. A denied office request shows as home, approved. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "approved",
                  "pending"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "office": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OfficeReference"
              },
              {
                "type": "null"
              }
            ],
            "description": "The booked office for office bookings; null otherwise, and null for an office of a connected organization."
          }
        },
        "required": [
          "id",
          "user",
          "date",
          "period",
          "type",
          "category",
          "approvalStatus",
          "office"
        ],
        "description": "A workplace booking: one person, one day or half-day, one type."
      },
      "BookingResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Booking"
          }
        },
        "required": [
          "data"
        ]
      },
      "UserList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "meta": {
            "type": "object",
            "properties": {
              "status": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "active",
                        "archived"
                      ]
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "The statuses this list shows: the request's `status`, or the default `[\"active\"]`."
              }
            },
            "required": [
              "status"
            ]
          }
        },
        "required": [
          "data",
          "pagination",
          "meta"
        ]
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The user's id (an opaque string).",
            "type": "string"
          },
          "email": {
            "type": "string",
            "description": "The user's email address, lowercase and unique."
          },
          "firstName": {
            "type": "string",
            "description": "The user's first name; an empty string for an invited user who has not set it."
          },
          "lastName": {
            "type": "string",
            "description": "The user's last name; an empty string for an invited user who has not set it."
          },
          "timeZone": {
            "description": "The user's IANA time zone, or null when the user has none.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "active or archived. More values may be added.",
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              {
                "type": "string"
              }
            ]
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
              },
              {
                "type": "null"
              }
            ],
            "description": "When the user was archived, or null."
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupReference"
            },
            "description": "The user's groups. Today every user has exactly one."
          },
          "createdAt": {
            "description": "When the user was created.",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          }
        },
        "required": [
          "id",
          "email",
          "firstName",
          "lastName",
          "timeZone",
          "status",
          "archivedAt",
          "groups",
          "createdAt"
        ],
        "description": "A member of your organization."
      },
      "GroupReference": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The group's id (an opaque string).",
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "The group's current name."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "description": "A group, current at response time."
      },
      "UserResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "data"
        ]
      }
    },
    "headers": {
      "RequestId": {
        "description": "The request's id, opaque; quote it to Pult support.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "WwwAuthenticate": {
        "description": "The Bearer challenge (RFC 6750). Always on a 401: Bearer error=\"invalid_token\", or, on an endpoint that is its own protected resource (the MCP endpoint, RFC 9728), Bearer resource_metadata=\"<the metadata URL>\", followed by , error=\"invalid_token\" when a bearer token was sent and refused. On a 403 only for insufficient_scope: Bearer error=\"insufficient_scope\", scope=\"<scope>\", the scope from data.scope.",
        "schema": {
          "type": "string"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying. The same value as the Problem's `data.retryAfterSeconds`.",
        "required": true,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        }
      }
    },
    "responses": {
      "RouteNotFound": {
        "description": "No operation exists at this path with this method. Check the path and the API version.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemRouteNotFound"
            }
          }
        }
      },
      "PayloadTooLarge": {
        "description": "The request body is too large. Send a smaller body.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemPayloadTooLarge"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "pult_<base62>",
        "description": "An API key created by an admin of your organization in the Pult dashboard, sent as `Authorization: Bearer <key>`. Keys start with `pult_`."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "An OAuth 2.0 access token Pult issued when a person connected an app, sent as `Authorization: Bearer <token>`.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth.pult.com/oauth/authorize",
            "tokenUrl": "https://auth.pult.com/oauth/token",
            "scopes": {
              "users:read": "Read the organization's users: names, emails, groups, time zones and status.",
              "groups:read": "Read the organization's groups.",
              "offices:read": "Read the organization's offices.",
              "bookings:read": "Read workplace bookings: where people work on which day.",
              "presence:read": "Read presence locations, presence days and presence counts.",
              "visitors:read": "Read visits: visitors, hosts, offices, times, statuses and sign-in answers."
            }
          }
        }
      }
    }
  }
}
